Jan 4, 2017 Replies: 23 Hi, attached you can find a little project which shows the basic integration of a BarChart with Chart.js. Jan Spoiler: Picture More examples: Multibar: https://www.b4x.com/android/forum/threads/chart-with-js-webview.74850/#post-512322 in B4A: https://www.b4x.com/android/forum/threads/chart-with-js-webview.74850/#post-478777 gradient: https://www.b4x.com/android/forum/threads/chart-with-js-webview.74850/page-2#post-513066 Attachments BarChartExample.zip BarChartExample.zip 72.1 KB · Views: 834 BarChart.png 98.1 KB · Views: 2,288 Last edited: Jun 23, 2017 Click to expand...
Hi, attached you can find a little project which shows the basic integration of a BarChart with Chart.js. Jan Spoiler: Picture More examples: Multibar: https://www.b4x.com/android/forum/threads/chart-with-js-webview.74850/#post-512322 in B4A: https://www.b4x.com/android/forum/threads/chart-with-js-webview.74850/#post-478777 gradient: https://www.b4x.com/android/forum/threads/chart-with-js-webview.74850/page-2#post-513066
tufanv Expert Licensed User Longtime User Jun 23, 2017 #21 JanPRO said: Hi, @Descartex You can use the yAxisID property of datasets.The IDs must be defined under options-->scales-->yAxes. I have attached an example. @tufanv For which type of chart? LineChart? Jan Click to expand... Dear Jan, Yes Line Chart
JanPRO said: Hi, @Descartex You can use the yAxisID property of datasets.The IDs must be defined under options-->scales-->yAxes. I have attached an example. @tufanv For which type of chart? LineChart? Jan Click to expand... Dear Jan, Yes Line Chart
JanPRO Well-Known Member Licensed User Longtime User Jun 23, 2017 #22 Hi, you can set the gradient to the BackgroundColor property. I have attached an example. More information about gradients in JS: https://www.w3schools.com/tags/canvas_createlineargradient.asp Jan Attachments Charts-Gradient.zip Charts-Gradient.zip 72.1 KB · Views: 664
Hi, you can set the gradient to the BackgroundColor property. I have attached an example. More information about gradients in JS: https://www.w3schools.com/tags/canvas_createlineargradient.asp Jan
tufanv Expert Licensed User Longtime User Jun 26, 2017 #23 JanPRO said: Hi, you can set the gradient to the BackgroundColor property. I have attached an example. More information about gradients in JS: https://www.w3schools.com/tags/canvas_createlineargradient.asp Jan Click to expand... Thanks Jan ! It is working Great ! I just couldnt adjust the look of the gradient well but i hope i will =)
JanPRO said: Hi, you can set the gradient to the BackgroundColor property. I have attached an example. More information about gradients in JS: https://www.w3schools.com/tags/canvas_createlineargradient.asp Jan Click to expand... Thanks Jan ! It is working Great ! I just couldnt adjust the look of the gradient well but i hope i will =)
tufanv Expert Licensed User Longtime User Jun 29, 2017 #24 JanPRO said: Hi, you can set the gradient to the BackgroundColor property. I have attached an example. More information about gradients in JS: https://www.w3schools.com/tags/canvas_createlineargradient.asp Jan Click to expand... Dear Jan, I change the values in a very different ways but i cant catch a real looking gradient. With your sample code for example , it is only a slight transition in the orange , what do i have to do to make it a good transition from white to orange for example , I change the second color to 255,255,255,1 for example but couldnt get anything. I also checked the website you wrote but couldnt figure it out.
JanPRO said: Hi, you can set the gradient to the BackgroundColor property. I have attached an example. More information about gradients in JS: https://www.w3schools.com/tags/canvas_createlineargradient.asp Jan Click to expand... Dear Jan, I change the values in a very different ways but i cant catch a real looking gradient. With your sample code for example , it is only a slight transition in the orange , what do i have to do to make it a good transition from white to orange for example , I change the second color to 255,255,255,1 for example but couldnt get anything. I also checked the website you wrote but couldnt figure it out.