We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

Dynamically loading charts

Hi all, very simple question here - or at least I think it should be, but hours of googling and experimenting have got me nowhere!

I know that it is possible to load chart data into an essentials chart control using ScriptManager and AJAX. What I would like to do though is to dynamically (using AJAX) create and display different charts based on user input.

As an example - say I have 3 html buttons. When the page loads button 1 is pressed and chart 1 displays. How can the user press button 2 in order to display chart 2? I want it to generate and load it onclick, not at page load. Currently my solution is to generate all charts at page load and hide most of them in divs, swapping which div is shown. This is inefficient though - can't make the user load 20+ charts on page load!

If anyone's able to point me in the right direction, I'd be extremely grateful! Thanks for reading.


1 Reply

SD Sivakumar D Syncfusion Team January 23, 2012 08:42 AM UTC

Hi Chris,

Thanks for using Syncfusion products.

We have created the sample for displaying chart in button click event.The chartcontrol is placed in UpdatePanel(AJAX),So it will updated dynamically without refreshing the whole page.The sample can be downloaded from below link.

F1023452080336423.zip

Please let me know if you have any other questions or concerns.

Regards,
Siva


Loader.
Live Chat Icon For mobile
Up arrow icon