Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add groupIdAccessor #537

Open
nickofthyme opened this issue Feb 5, 2020 · 0 comments
Open

Add groupIdAccessor #537

nickofthyme opened this issue Feb 5, 2020 · 0 comments
Assignees
Labels
:data Data/series/scales related issue discuss To be discussed enhancement New feature or request :specs Chart specifications related issue :xy Bar/Line/Area chart related

Comments

@nickofthyme
Copy link
Collaborator

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

@nickofthyme nickofthyme added enhancement New feature or request :specs Chart specifications related issue labels Feb 5, 2020
@nickofthyme nickofthyme self-assigned this Feb 5, 2020
@nickofthyme nickofthyme added the discuss To be discussed label Feb 6, 2020
@markov00 markov00 added :data Data/series/scales related issue :xy Bar/Line/Area chart related labels Mar 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:data Data/series/scales related issue discuss To be discussed enhancement New feature or request :specs Chart specifications related issue :xy Bar/Line/Area chart related
Projects
None yet
Development

No branches or pull requests

2 participants