title: Chart.js errors with graph different from horizontalbar
body: <p>Chart.js Version: 2.7.1  </p>
  
  <p>I have in use since two years some pages which present a number of graphs, always with horizontal bars, but now I wish to select different formats, like bar and line.<br>
  When one of these options is selected I always get the same error: 'TypeError: e.slice is not a function'.<br>
  I thought that in the chart option is only required to change the tipe of graph, but possibly I'm missing something else.  </p>
  
  <p>This is the chart declaration:  </p>
  
  <pre><code>        var myBarChart = new Chart(ctx, {
          type: 'horizontalbar',
          data: {
                  labels: nameArray,
                  datasets: [{
                      label: 'Visite nel periodo alla pagina: ' + pag ,
                      data: valueArray,
                      backgroundColor:'rgba(255, 32, 0, 0.5)'
                  }]
            },
              options: chartOptions,                          
          });
  </code></pre>
  
  <p>And this is the chartOptions (sorry, is quite long):  </p>
  
  <pre><code>    chartOptions = {
          maintainAspectRatio:false,
          aspectRatio:4,
          fontStyle:"bold",
          defaultFontStyle:"bold",
      scales: {
        xAxes: [{
            display: true,
            gridLines: {
                display: true
            },
            labels: {
                show: true,
                fontStyle:"bold"
            },
        }],
  
        yAxes: {
              display: true,
              position: "left",
              id: "y-axis-1",
              gridLines:{
                  display: false
                  },
                    scaleLabel: {
                      display: true,
                      labelString: "Acquisti",
                      fontColor: 'rgba(0, 80, 212, 0.5)',
                      fontSize:18,
                      fontStyle:"bold"
                      },
                    ticks: {
                      beginAtZero: true,
                      min:0,
                      fontSize:14,
                      fontStyle:"bold",
                      fontColor:"#03a"
                      },
              labels: {
                  show:true,
                  fontStyle:"bold"
                  }
          }
  
      },
      layout: {
          padding: {
              left: 10,
              right: 10,
              top: 0,
              bottom: 0
          }
        },
      title: {
          display: true,
          fontColor: "#c40",
          fontSize: 16,
          text: chartTitle,
          }
      };
  </code></pre>
  
  <p>When I want to switch from a format to another I only programmatically change this line : type: 'bar' or  type: 'line'.<br>
  Is there anything else I should change?</p>
  
  <p>Thanks  </p>