Rendering Chart in Two Container - Javascript highcharts

Javascript examples for highcharts:Chart Configuration

Description

Rendering Chart in Two Container

Demo Code

ResultView the demo in separate window

<html>
   <head> 
      <title>Highcharts Demo</title> 
      <meta name="viewport" content="width=device-width, initial-scale=1"> 
      <script type="text/javascript" src="https://code.jquery.com/jquery-1.7.1.js"></script> 
      <script type="text/javascript">
$(function() {/*w  w w .j  a v  a2  s.c o m*/
    $('.render_here').each(function(){
    var chart = new Highcharts.Chart({
        chart: {
            renderTo: this,
            type: 'column',
            plotBorderWidth: 1
        },
        yAxis: {
            title: {
                text: 'useHTML = true',
                useHTML: true
            }
        },
        series: [{
            data: [23,45,12,89,123,12,5]}]
    });
   });
});

      </script> 
   </head> 
   <body> 
      <script src="https://code.highcharts.com/highcharts.js"></script> 
      <div id="container" class="render_here" style="height: 300px"></div> 
      <div id="container2" class="render_here" style="height: 300px"></div>  
   </body>
</html>

Related Tutorials