Chartjs-How to use log scale with Chart Kick?

1👍

It was a simple fix, I making a stupid mistake by passing the libary options into my data object.

I fixed it by doing the following:

html:

<line-chart :library="chartOption":data="datafor"></line-chart>

js

chartOption = {
          legend: {
            position: "top"
          },
          scales: {
            yAxes: [
              {
                id: "y-axis",
                type: "logarithmic"
              }
            ]
          }
        };

       datafor[i] = {
          name: "Test name",
          data: objectHere,
          title: "test"
        };
      }

Leave a comment