Home › forums › Using CanvasJS › Switching to Line Chart – Bar Chart – Pie Chart vice versa
Tagged: Switching to Line Chart - Bar Chart - Pie Chart vice versa
This topic contains 5 replies, has 2 voices, and was last updated by yansonalvin97 4 months, 2 weeks ago.
Good Day Canvasjs developers. I really need your help guys particularly in switching to line chart – bar chart – pie chart like vice versa.
So here is the scenario, Im getting my datapoints in json format, I have a dropdown wherein it presents the chart type, if the user selects on the pie chart the chart will automatically be pie chart, if line chart then it would be line chart depends on the user selection.
All of the datapoints of the chart comes from only one json file. Please help me Canvasjs Developers.
This is my second time asking a question and I really love you answer right away…
You can change chart-type whenever there is change in dropdown. Please take a look at this jsfiddle.
Oh man! This drives me crazy!!! WOW! Thank you very much. You just made my day. Continue supporting the members of this forum. This is why I love CanvasJS and its developers…
Can I ask one more question if its okay for you. How about if my datapoints comes from the json. Not from the fixed datapoints? Thank you very much again Vishwas R
Irrespective of data-source, CanvasJS supports dynamic updates of chart-options. So updating chart-type from dropdown should work fine even incase of json. Please take a look at this jsfiddle.
thank you vishwas
You must be logged in to reply to this topic.