emurray100
Posts: 5
Joined: Sat Feb 26, 2011 10:13 pm

adding series to a hidden div

Sorry if this is redundant:

I had the issue when adding multiple new series to a hidden div only the first series would show up when the div was displayed. It took me a little bit to figure out that the first addSeries call was failing thus aborting subsequent addSeries.

I fixed this by turning off the redraw when adding the series:

chart.addSeries(data,false)

...and then redrawing the chart when displaying the div:

chart.redraw()


NOTE: Perhaps the addSeries could detect whether the target div is "displayed" and circumvent the failure. In any case, it's probably a good practice to do what I did to minimize unnecessary chart drawing. (I posted this mainly in case someone else was having similar issues.)

AWESOME tool BTW
Thanks,
Ed

Return to “Highcharts Usage”