PDA

View Full Version : How to change Chart dynamically



bevara.siva
17 Oct 2014, 3:53 AM
Hi,

We are using Ext js 4.
We need to change the chart dynamically based on the drop down change.
Drop down having the "Line, Bar, Column and Stacked Column" options.
Based on the selection I need to load the corresponding chart with the same store.
I wanted to do this in many pages.
Can we make a generic function to add the Chart Axes and Series dynamically to the chart?

Please advice and post me if you have any samples.

Regards,
SivaPrasad.B

scottmartin
17 Oct 2014, 4:33 PM
You should be able to just call store.load() using the same store. As for the different types, create a card layout with each type and change to that page.

bevara.siva
19 Oct 2014, 11:14 PM
Thank you for the response.

I wanted this feature in all my grid pages.
I have almost 10 pages with grids. In these in top panel I am displaying grid and in the bottom panel I am displaying the graphs. In place of single graph, I wanted to give an option to the user to change the graphs. I believe I cant use the Card layout in all the pages to display the graphs.

Is there anyway to add the Axes and Series to the chart to display different charts when we change the Chart type?

Please help!!!

Regards,
SivaPrasad.B

scottmartin
20 Oct 2014, 3:51 AM
If you want to display 1 graph at a time, you can either create/destroy the chart or use the card layout.

There is not an option to change the axis types dynamically.