Chart.js issue

by Marvin Heilemann

HTML

<script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.9.3/Chart.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/lodash.js/4.17.15/lodash.min.js"></script>
<canvas id="myChart"></canvas>

JavaScript

console.clear()

var data1 = [0.09, 0.123, 0.19, 0.261, 0.345, 0.372, 0.395, 0.399, 0.621, 0.689, 0.696, 0.765] 
var data2 = [0.062, 0.065, 0.078, 0.088, 0.088, 0.091, 0.113, 0.141, 0.185, 0.19, 0.239, 0.245]

var maxticks = 12;
var stepSize = 0.04;
var maxSize = 0.8;

var ctx = document.getElementById('myChart').getContext('2d');

var chart = new Chart(ctx, {
  data: {
    labels: ["J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"],
    datasets: [{
      label: 'KU1',
      yAxisID: 'axis-accumulation',
      data: data1,
      type: 'line',
      backgroundColor: 'transparent',
      borderColor: 'rgba(232, 62, 140, 0.5)',
      pointBackgroundColor: 'rgba(232, 62, 140, 0.5)',
      pointBorderWidth: 0,
      pointRadius: 2,
      borderWidth: 1,
      datalabels: {
        display: false,
      },
    }, {
      label: 'KU2',
      yAxisID: 'axis-accumulation',
      data: data2,
      type: 'line',
      backgroundColor: 'transparent',
      borderColor: 'rgba(120, 21, 185, 0.5)',
      pointBackgroundColor: 'rgba(120, 21, 185, 0.5)',
      pointBorderWidth: 0,
      pointRadius: 2,
      borderWidth: 1,
      datalabels: {
        display: false,
      },
    }],
  },
  options: {
    responsive: true,
    title: {
      display: true,
      text: "KS"
    },
    verticalGuide: {
      color: '#2d2d2d',
    },
    hover: {
      mode: 'index',
      intersect: false,
    },
    tooltips: {
      mode: 'index',
      intersect: false,
      position: 'nearest',
      bodySpacing: 6,
      callbacks: {
        label: tooltipItem => {
          let val = tooltipItem.label
          if (val == 0) {
            val = val + '≤'
          }
          return val + ' Mio €'
        },
      },
    },
    scales: {
      xAxes: [{
        type: 'category'
      }],
      yAxes: [{
        id: 'axis-accumulation',
        gridLines: {
          display: true,
          color: '#f3d3e4',
        },
        ticks: {
          beginAtZero: true,
         ...