Chimera Khadeer
Chimera Khadeer

Reputation: 3

Chart Maximizing

I want to the render the chart in bigger size as popup in another container. I tried changing the innerHTML using javascript but the chart is not functioning and I tried to redraw the chart after setting the innerHTML.

Intially chart will be rendered to "SmallContainer" on button click,

document.getElementById("LargeContainer").innerHTML = document.getElementById("SmallContainer").innerHTML 
document.getElementById("SmallContainer").innerHTML = "";
chartobj.redraw();

Here I am rendering the "LargeContainer" as I want to the display larger container as popup along with some other text.

Can any help me in fixing this? Thanks in advance.

Upvotes: 0

Views: 924

Answers (1)

Sebastian Bochan
Sebastian Bochan

Reputation: 37588

In case when chart is rendered you cannot modify size by innerHTML, because paths in SVG are calculated. But you can use setSize function which allows to resizing chart.

http://api.highcharts.com/highcharts#Chart.setSize()

Obivuosly you can use also highslide to generate popup like in the example http://jsfiddle.net/roadrash/GqhEX/

Upvotes: 1

Related Questions