hari
hari

Reputation: 144

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

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.

Upvotes: 1

Views: 1037

Answers (1)

Ericgit
Ericgit

Reputation: 7063

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,
          },
      },
    ],
  },
}

Upvotes: 1

Related Questions