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

BarSeries shifted depending on the spec ordering #301

Closed
markov00 opened this issue Aug 7, 2019 · 1 comment · Fixed by #302
Closed

BarSeries shifted depending on the spec ordering #301

markov00 opened this issue Aug 7, 2019 · 1 comment · Fixed by #302
Assignees
Labels
bug Something isn't working :chart Chart element related issue released Issue released publicly :specs Chart specifications related issue

Comments

@markov00
Copy link
Member

markov00 commented Aug 7, 2019

Describe the bug
When adding a LineSeries with split series before a BarSeries, the bar series is then shifted as the LineSeries was a BarSeries.
The workaround is to move the BarSeries before the LineSeries declaration.

To Reproduce

const dg = new DataGenerator();
    const data1 = dg.generateGroupedSeries(20, 3);
    const data2 = dg.generateGroupedSeries(20, 1);
    
    return (
        <Chart size={[undefined, 200]}>
          <Settings
            showLegend={true}
            legendPosition={Position.Right}
            showLegendDisplayValue={false}
          />
          <LineSeries
            id={getSpecId('status')}
            name="0"
            data={data1}
            xAccessor={'x'}
            yAccessors={['y']}
            splitSeriesAccessors={['g']}
          />
          <BarSeries
            id={getSpecId('control')}
            name="Control"
            data={data2}
            xAccessor={'x'}
            yAccessors={['y']}
          />
          <Axis
            id={getAxisId('bottom-axis')}
            position={Position.Bottom}
            showGridLines
          />
          <Axis
            id={getAxisId('left-axis')}
            position={Position.Left}
            showGridLines
            gridLineStyle={gridHorizontalSettings}
          />
        </Chart>
    );

Expected behavior
Independently from the Series spec order, the bar series should respect the right shifting value.

Screenshots

Screen Shot 2019-08-07 at 09 03 26 AM

Version (please complete the following information):

  • OS: macOS
  • Browser: chrome
  • Elastic Charts: 9.0.1

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 :chart Chart element related issue :specs Chart specifications related issue labels Aug 7, 2019
@markov00 markov00 self-assigned this Aug 7, 2019
@markov00
Copy link
Member Author

🎉 This issue has been resolved in version 9.0.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

@markov00 markov00 added the released Issue released publicly label Aug 12, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working :chart Chart element related issue released Issue released publicly :specs Chart specifications related issue
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant