Olivia Olivgirl
Olivia Olivgirl

Reputation: 97

visjs graph2d showMinorLines example

I want to hide the horizontal major/minor lines that appear on Graph2D Y-axis values of a scatter plot/timeline.

I have tried to make use of showMinorLines and showMajorLines without much success. The syntax am using is:

graph2d.setOptions({showMinorLines: false})

However, it generates an error that states:

Unknown option detected: "showMinorLines". Did you mean "showMinorLabels"?

Problem value found at: options = { showMinorLines }

vis.js:23607 Errors have been found in the supplied options object.

Any help would be much appreciated?

Update: Attaching image.

enter image description here

Upvotes: 1

Views: 870

Answers (1)

Jos de Jong
Jos de Jong

Reputation: 6809

Thanks for bringing this up. This is an fault in the documentation: in v4, this option has been renamed to get a more consistent API. You now have the following four related options:

{
  showMinorLabels: true | false,    // minor labels and lines on horizontal axis
  showMajorLabels: true | false,    // major labels and lines on horizontal axis
  dataAxis: {
    showMinorLabels: true | false,  // minor labels and lines on vertical axis
    showMajorLabels: true | false,  // major labels and lines on vertical axis
  }
}

We will fix the docs, sorry for the inconvenience.

Upvotes: 1

Related Questions