How to hide border in react-chart-js-2 with fill true

1k views Asked by At

We have added one graph with 2 data sets which is line chart with fill true (area chart). However in one data sets value comes low it show correct but we need to hide the floating border as mentioned in red block in below screen

enter image description here

Hoe we can hide border if data is low for one data set for specific point, so it should not float in another data set values.

1

There are 1 answers

0
Ericgit On

you can easily disable side data in react-chartjs-2 by keeping the display: false

const options = {
  scales: {
    yAxes: [
      {
        type: "linear",
        display: true,
        position: "left",
        id: "y-axis-1",
      },
      {
        type: "linear",
        display: false,
        position: "right",
        id: "y-axis-2",
        gridLines: {
            drawOnArea: false,
          },
      },
    ],
  },
}