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

Handle split series with 0 as group value #288

Closed
2 tasks done
markov00 opened this issue Aug 6, 2019 · 1 comment · Fixed by #289 or elastic/kibana#43516
Closed
2 tasks done

Handle split series with 0 as group value #288

markov00 opened this issue Aug 6, 2019 · 1 comment · Fixed by #289 or elastic/kibana#43516
Labels
bug Something isn't working :legend Legend related issue released Issue released publicly

Comments

@markov00
Copy link
Member

markov00 commented Aug 6, 2019

Describe the bug
The legend doesn't reflect the naming for a splitted series chart if the series group value is 0.

To Reproduce
Using the DataGenerator to create 4 series chart.

const dg = new DataGenerator();
const data1 = dg.generateGroupedSeries(20, 4);
<Chart size={[undefined, 200]}>
  <Settings
    legendPosition={Position.Right}
    showLegendDisplayValue={false}
  />
  <BarSeries
    id={getSpecId('status')}
    name={'Quantity'}
    data={data1}
    xAccessor={'x'}
    yAccessors={['y']}
    splitSeriesAccessors={['g']}
    stackAccessors={['g']}
  />
  <Axis
    id={getAxisId('bottom-axis')}
    position={Position.Bottom}
  />
  <Axis
    id={getAxisId('left-axis')}
    position={Position.Left}
  />
</Chart>

Expected behavior
The legend should reflect the group values. In this case the legend should be 0, 1, 2, 3.

Screenshots
Screen Shot 2019-08-05 at 16 44 39

Version (please complete the following information):

  • OS: all
  • Browser: chrome
  • Elastic Charts: master

Additional context
n/a

Errors in browser console
n/a

Kibana Cross Issues
n/a

Checklist

  • every related Kibana issue is listed under Kibana Cross Issues list
  • kibana cross issue tag is associated to the issue if any kibana cross issue is present
@markov00 markov00 added bug Something isn't working :legend Legend related issue labels Aug 6, 2019
markov00 added a commit to markov00/elastic-charts that referenced this issue Aug 6, 2019
The current implementation wrongly interpret a zero value in the colorValues list of a legend item
as a single series. This cause that series to be named with the spec name or the spec id. Instead a
splitted series with a group value of zero, should be threated in the same way as anyother splitted
series, using the group value as the series name

fix elastic#288
markov00 added a commit that referenced this issue Aug 7, 2019
The current implementation wrongly interpret a zero value in the colorValues list of a legend item as a single series. This cause that series to be named with the spec name or the spec id. Instead a splitted series with a group value of zero, should be treated in the same way as any other splitted series, using the group value as the series name

fix #288
markov00 pushed a commit that referenced this issue Aug 7, 2019
## [9.0.1](v9.0.0...v9.0.1) (2019-08-07)

### Bug Fixes

* handle splitted series with group value to 0 ([#289](#289)) ([0f2217e](0f2217e)), closes [#288](#288)
@markov00
Copy link
Member Author

markov00 commented Aug 7, 2019

🎉 This issue has been resolved in version 9.0.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

@markov00 markov00 added the released Issue released publicly label Aug 7, 2019
AMoo-Miki pushed a commit to AMoo-Miki/OpenSearch-Dashboards that referenced this issue Feb 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working :legend Legend related issue released Issue released publicly
Projects
None yet
1 participant