Skip to content
This repository was archived by the owner on Jul 29, 2019. It is now read-only.
This repository was archived by the owner on Jul 29, 2019. It is now read-only.

error setting option in graph2d #2458

@gmlevin

Description

@gmlevin

I want to auto scale my y-axis in graph2d. (I also want to be able to switch between fixed and autoscaled limits.) I tried setting dataAxis.left.range.max = null or undefined. Passing the value null (not the string) seems to get the desired behavior, but reports the following error. Passing undefined has the same issue.
I see this behavior with vis-4.17.0 and previous versions.

I am assuming it is just the max field that is having a problem and that it is being set to undefined, which is what I want, and other fields are being set correctly. This appears to be true, because when I set min to undefined, both settings are reported as errors and they both are autoscaled.

Invalid type received for "max". Expected: number. Received [null] "null"
Problem value found at: 
options = {
  dataAxis: {
    left: {
      range: {
        max
      }
    }
  }
}
vis.js:26447 Errors have been found in the supplied options object.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions