I would like to adjust the charts height after it has been drawn. For example, if I output a chart and the user decided that the x axis labels were making the chart unreadable. Then I want to offer a text box that resizes the containing div and then gets the chart repainted into it. However the best I can get is that the chart is created as I want it however an old chart pane is visible but empty.
You can post now and register later.
If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.
Question
PhilHannent
Hi,
I would like to adjust the charts height after it has been drawn. For example, if I output a chart and the user decided that the x axis labels were making the chart unreadable. Then I want to offer a text box that resizes the containing div and then gets the chart repainted into it. However the best I can get is that the chart is created as I want it however an old chart pane is visible but empty.
This is the code I am currently using:
function setHeightOfChart() {
document.getElementById("ChartDiv1").style.height = ($(window).innerHeight() * (document.getElementById("CHARTDEPTH").value / 100)) + "px";
chart1.updateSizeNow();
chart1.create(document.getElementById("ChartDiv1"));
}
Link to comment
Share on other sites
9 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.