Skip to content

Add groupIdAccessor #537

@nickofthyme

Description

@nickofthyme

Is your feature request related to a problem? Please describe.
Allow groupIdAccessor props to specify the groupId of a series within a single spec.

Describe alternatives you've considered
The alternative is two separate specs that can each have it's own groupId. This causes labels to show only split accessor value and not the y accessor labels.

Additional context

<LineSeries
  id="line"
  xScaleType={ScaleType.Ordinal}
  yScaleType={ScaleType.Linear}
  xAccessor="x"
  yAccessors={['y1', 'y2']}
  splitSeriesAccessors={['z']}
  groupIdAccessor={({ yAccesor }) => yAccesor === 'y1' ? 'group1' : 'group2'}
  data={visData.rows}
/>

Then I can define two axes one for group1 and one for group2

Metadata

Metadata

Assignees

Labels

:dataData/series/scales related issue:specsChart specifications related issue:xyBar/Line/Area chart relateddiscussTo be discussedenhancementNew feature or request

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions