title: Chart.js - Multiple Line Charts - [2]
body: <p>This question was asked, and seemingly answered <a href="https://stackoverflow.com/questions/24673622/chart-js-multiple-line-charts-only-show-last-chart">HERE</a>. Though it did not help me, or seem to even work slightly at all.</p>
  
  <p>(<em>Using <a href="http://www.chartjs.org/" rel="nofollow noreferrer">Chart.js</a></em>)</p>
  
  <p>I use the <em>exact</em> same code as the linked post, looking like this;</p>
  
  <pre><code>&lt;script src="includes/Chart.js"&gt;&lt;/script&gt;
  
  
  
  &lt;div class="labeled-chart-container"&gt;
      &lt;div class="canvas-holder"&gt;
          &lt;canvas id="canvas1" width="250" height="250"&gt;
          &lt;/canvas&gt;
      &lt;/div&gt;
      &lt;div class="canvas-holder"&gt;
          &lt;canvas id="canvas2" width="250" height="250"&gt;
          &lt;/canvas&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  
  
  
  
  
  &lt;script type="text/javascript"&gt;
  
      var lineChartData = {
          labels : ["January","February","March","April","May","June","July","August","September","October","November","December"],
          datasets : [
              {
                  label: "Target",
                  fillColor : "rgba(220,220,220,0.2)",
                  strokeColor : "rgba(220,220,220,1)",
                  pointColor : "rgba(220,220,220,1)",
                  pointStrokeColor : "#fff",
                  pointHighlightFill : "#fff",
                  pointHighlightStroke : "rgba(220,220,220,1)",
                  data : [160000,175000,185000,180000,185000,185000,185000,195000,200000,0,0]
              },
              {
                  label: "Sales",
                  fillColor : "rgba(151,187,205,0.2)",
                  strokeColor : "rgba(151,187,205,1)",
                  pointColor : "rgba(151,187,205,1)",
                  pointStrokeColor : "#fff",
                  pointHighlightFill : "#fff",
                  pointHighlightStroke : "rgba(151,187,205,1)",
                  data : [&lt;?php echo $stockJanuary ?&gt;,&lt;?php echo $stockFebruary ?&gt;,&lt;?php echo $stockMarch ?&gt;,&lt;?php echo $stockApril ?&gt;,&lt;?php echo $stockMay ?&gt;,&lt;?php echo $stockJune ?&gt;,&lt;?php echo $stockJuly ?&gt;,&lt;?php echo $stockAugust ?&gt;,&lt;?php echo $stockSeptember ?&gt;,&lt;?php echo $stockOctober ?&gt;,&lt;?php echo $stockNovember ?&gt;,&lt;?php echo $stockDecember ?&gt;]
              }
          ]
  
      }
              window.onload = function(){
  &lt;/script&gt;
  
  
  &lt;script type="text/javascript"&gt;
  
      var lineChartData = {
          labels : ["January","February","March","April","May","June","July","August","September","October","November","December"],
          datasets : [
              {
                  label: "Target",
                  fillColor : "rgba(220,220,220,0.2)",
                  strokeColor : "rgba(220,220,220,1)",
                  pointColor : "rgba(220,220,220,1)",
                  pointStrokeColor : "#fff",
                  pointHighlightFill : "#fff",
                  pointHighlightStroke : "rgba(220,220,220,1)",
                  data : [19000,21000,23000,25000,27000,29000,31000,32000,33000,0,0]
              },
              {
                  label: "Sales",
                  fillColor : "rgba(151,187,205,0.2)",
                  strokeColor : "rgba(151,187,205,1)",
                  pointColor : "rgba(151,187,205,1)",
                  pointStrokeColor : "#fff",
                  pointHighlightFill : "#fff",
                  pointHighlightStroke : "rgba(151,187,205,1)",
                  data : [&lt;?php echo $northJanuary ?&gt;,&lt;?php echo $northFebruary ?&gt;,&lt;?php echo $northMarch ?&gt;,&lt;?php echo $northApril ?&gt;,&lt;?php echo $northMay ?&gt;,&lt;?php echo $northJune ?&gt;,&lt;?php echo $northJuly ?&gt;,&lt;?php echo $northAugust ?&gt;,&lt;?php echo $northSeptember ?&gt;,&lt;?php echo $northOctober ?&gt;,&lt;?php echo $northNovember ?&gt;,&lt;?php echo $northDecember ?&gt;]
              }
          ]
  
      }
  &lt;/script&gt;
  
  &lt;script&gt;
  window.onload = function(){
      var ctx = document.getElementById("canvas2").getContext("2d");
      window.myLine = new Chart(ctx).Line(lineChartData, {
      responsive: true
      });
  
  
     var ctx2 = document.getElementById("canvas1").getContext("2d");
      window.myLine = new Chart(ctx2).Line(lineChartData2, {
          responsive: true
      });
  
  }
  &lt;/script&gt;
  </code></pre>
  
  <p>I don't know if the answer/question is outdated, or if I am just doing something wrong here?</p>