Skip to content

Domain nicing may break when zero: true #2634

@domoritz

Description

@domoritz

Notice how in the example below, the domain is not nice when zero: true.

{
  "$schema": "https://vega.github.io/schema/vega/v5.json",
  "width": 200,
  "height": 20,
  "padding": 5,
  "scales": [
    {
      "name": "scale1",
      "domain": [90, 210],
      "nice": 2,
      "range": "width"
    },
    {
      "name": "scale2",
      "domain": [90, 210],
      "nice": 2,
      "range": "width",
      "zero": false
    }
  ],
  "axes": [
    { "orient": "top", "scale": "scale1", "tickCount": 2},
    { "orient": "bottom", "scale": "scale2", "tickCount": 2}
  ]
}

image

Open the Chart in the Vega Editor

Metadata

Metadata

Assignees

Labels

bugFor bugs or other software errors

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions