Skip to content

Radial chart radius field unexpectedly changes arc stack behavior #7957

@anbnyc

Description

@anbnyc

Please:

  • Check for duplicate issues. Please file separate requests as separate issues.
  • Describe how to reproduce the bug.
  • Use the latest versions of Vega and Vega-Lite.
  • Provide an minimal, reproducible example spec in JSON, wrapped by triple backticks like this:

Using field for radius other than the one provided to theta unexpectedly breaks the stack behavior for theta. It seems like radius should be able use a different scale than theta. For example, with the following code, the arcs do not stack on the theta variable as expected.

{
  "$schema": "https://vega.github.io/schema/vega-lite/v5.json",
  "data": {
    "values": [
      { "segment": 1, "value": 8 },
      { "segment": 2, "value": 7 },
      { "segment": 3, "value": 6 }
    ]
  },
  "mark": {"type": "arc", "innerRadius": 20, "stroke": "#fff", "opacity": 0.5},
  "encoding": {
    "theta": {"field": "segment", "type": "quantitative", "stack": true},
    "radius": {"field": "value", "scale": {"type": "sqrt", "zero": true, "rangeMin": 20}}
  }
}

Metadata

Metadata

Assignees

Labels

Bug 🐛P2Important Issues that should be fixed soon

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions