title: chart is not rendering properly, canvasjs
body: <p>I'm trying to render two dynamic charts using <code>canvasJS</code>, Chart one is rendering properly, in fact second chart is populating properly, please see the <code>inspect element</code> image, but it's not displaying on the page.</p>
  
  <p>This is interface, just one chart is displaying 
  <a href="https://i.stack.imgur.com/1vSiZ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/1vSiZ.png" alt="enter image description here"></a></p>
  
  <p>and here is inspect elem.<a href="https://i.stack.imgur.com/xAdqW.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/xAdqW.png" alt="enter image description here"></a></p>
  
  <p><code>#adverts</code> is rendering, but not displayed here.</p>
  
  <pre><code>.chartContainer{
      height: 400px;
      width: 100%; 
  }
  </code></pre>
  
  <p><strong>PS</strong> I tried to commented out first chart rendering code, but not working at all, still displaying the first one only.</p>
  
  <p><strong>EDIT</strong></p>
  
  <p>Here is <code>console log</code> about what I'm getting back to render chart</p>
  
  <p><a href="https://i.stack.imgur.com/3FHTY.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/3FHTY.png" alt="enter image description here"></a></p>
  
  <p>here is snippet</p>
  
  <pre><code>function drawChart(obj, placeholder, From, To){
  var legendFrom;
  var legendTo;
  if(From != 'undefined'){
      legendFrom = From;
  }
  if(To != 'undefined'){
      legendTo = To;
  }
  var dataPoints = [];
  var from = [];
  var to = [];
  var advertFrom = [];
  var advertTo = [];
  for (var i = 0; i &lt;= obj.length - 1; i++) {
      if(obj[i].typeOf != 'undefined' || obj[i].typeOf != ''){
          if(obj[i].typeOf == 'from'){
              from.push({label:obj[i].year+"-"+obj[i].month+"-"+obj[i].day,y:Math.round(obj[i].avgPrice * 1000) / 1000});
              advertFrom.push({label:obj[i].year+"-"+obj[i].month+"-"+obj[i].day,y:obj[i].adverts});
          }else{
              to.push({label:obj[i].year+"-"+obj[i].month+"-"+obj[i].day,y:Math.round(obj[i].avgPrice * 1000) / 1000});
              advertTo.push({label:obj[i].year+"-"+obj[i].month+"-"+obj[i].day,y:obj[i].adverts});
          }
      }
      else
          from.push({label:obj[i].year+"-"+obj[i].month+"-"+obj[i].day,y:Math.round(obj[i].avgPrice * 1000) / 1000});
  }
  var chart = new CanvasJS.Chart("chartContainer",
  {
      animationEnabled: true,
      //theme: "theme1",
      zoomEnabled: true,
      title:{
          text: placeholder
      },
      data: [
          {
              type: "spline",  //change type to bar, line, area, pie, etc
              showInLegend: true,
              legendText: "From "+legendFrom, 
              dataPoints: from
          },
          {
              type: "spline",  
              showInLegend: true,
              legendText: "From "+legendTo, 
              dataPoints: to
          }
      ],
      legend: {
          cursor: "pointer",
          itemclick: function (e) {
              if (typeof(e.dataSeries.visible) === "undefined" || e.dataSeries.visible) {
                  e.dataSeries.visible = false;
              } else {
                  e.dataSeries.visible = true;
          }
          chart.render();
          }
      }
  });
  
  chart.render();
  var adverts = new CanvasJS.Chart("adverts",
  {
      animationEnabled: true,
      zoomEnabled: true,
      title:{
          text: placeholder
      },
      data: [
          {
              type: "column",  //change type to bar, line, area, pie, etc
              showInLegend: true,
              legendText: "From "+legendFrom, 
              dataPoints: advertFrom
          },
          {
              type: "column",  
              showInLegend: true,
              legendText: "From "+legendTo, 
              dataPoints: advertTo
          }
      ]
  });
  adverts.render();
  }
  </code></pre>