Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

set initial graphs on highcharts

Tags:

highcharts

believe me when i say, I have looked for a solution for this simple problem in here and online in general.

i have installed an highchart solution on my site. The users in highcharts can show/hide graphs dynamically afer the chart has loaded. I want to load, let's say, 3 sets of graph data but to hide (the user can show afterwards if he wants) 1 of them.

so I want to load the 3 graphs but to display only 2 of them.

 chart1 = new Highcharts.Chart({ chart: {renderTo: "graphDiv2", zoomType: "xy"
like image 1000
devmonster Avatar asked Mar 05 '26 10:03

devmonster


1 Answers

Try to display your 3 charts and hide theire div content. Then when user want's to see the second chart for example, you show the div which it's placed.
You can do it using jQuery.hide() and jQuery.show().

like image 95
Ricardo Alvaro Lohmann Avatar answered Mar 07 '26 19:03

Ricardo Alvaro Lohmann



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!