javascript - Highcharts: Decide on charts placement after generation -


Is there any possibility of applying a high charge chart after it's ready?

The background is that I have a dedicated container (i.e.

-node) where the user will select one of the two potential charts. So I want to generate two charts, where users can go back and forth from one side to another

as two (or possibly even more) charts, I have to generate them once in the beginning Want to

I have always used all the examples and documents related to and

gt; & Lt; Div & gt; -node:

  $ has created a high chart chart beginning with ('# container'). High Charters ({Series: [[Data: [29.9, 106.4, 12 9.2, 144.0, 135.6, 148.5, 216.4, 95.6, 54.4]}]}); Perhaps, you can use  rendereTo  to assign a chart: 

  var myChart = new highcharts. Chart ({chart: {RenderTo: 'container'}, series: [[Data: [29.9, 106.4, 12 9.2, 144.0, 135.6, 148.5, 216.4, 95.6, 54.4]}]});  

But: what I see is something like this:

  // First, define the chart (without any lieutenant; div & gt; ;;): My mychart = new highcharts.Chart ({Series: [[Data: [29.9, 106.4, 12 9.2, 144.0, 135.6, 148.5, 216.4, 95.6, 54.4]}] / 'without render' work does not do) ; // Then, it's a & lt; Div>: mychart.renderTo ('container'); // does not work :-(  

I have found that the only option is generate a new chart with new hyperts. {{}} >, But as the chart can be quite big, switching between them will take considerable time, while the desired chart is already available in memory ...

Thank you very much for your reply! >

new highchart charts () You can define options quickly, and then when you are ready to use them, you set rendereTo and create your Hightext object.

For example ( ):

  // set option initial var option = {title: {text: 'My chart'}, chart: {renderTo: null}, ...}; when you are ready settime (Function () {options.chart.RenderTo = 'container'; new highchart charts (options);}, 2000);  

Comments

Popular posts from this blog

java - org.apache.http.ProtocolException: Target host is not specified -

c# - Create dynamic LINQ query expression at runtime which translates into a parameterized SQL query for nullable types -

cmake - cpack generates RPMs with %files entries that conflict with the RPM spec. How to fix? -