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

Line series with different x values are hidden #825

Closed
nickofthyme opened this issue Sep 16, 2020 · 1 comment · Fixed by #833 or elastic/kibana#79226
Closed

Line series with different x values are hidden #825

nickofthyme opened this issue Sep 16, 2020 · 1 comment · Fixed by #833 or elastic/kibana#79226
Assignees
Labels
bug Something isn't working :data Data/series/scales related issue regression released Issue released publicly

Comments

@nickofthyme
Copy link
Collaborator

nickofthyme commented Sep 16, 2020

Describe the bug
Using LineSeries with different x values causes line to not be drawn correctly.

To Reproduce
Steps to reproduce the behavior:

  1. Go to https://codesandbox.io/s/priceless-wind-clh9f?file=/src/App.tsx
  2. Notice the lack of connected lines
  3. Toggle overall data, notice correct rendering of browser data
  4. Toggle browser data, notice correct rendering of overall data

Also see https://dev-next-oblt.elastic.dev/app/csm?rangeFrom=now-24h&rangeTo=now&serviceName=elastic-co-frontend

Expected behaviour
All lines are connected between respective points

Screenshots
image

Version (please complete the following information):

Additional context
The overall_data has different x values that the browser_data which is likely causing the discontinuity.

@nickofthyme nickofthyme added bug Something isn't working :data Data/series/scales related issue regression labels Sep 16, 2020
@markov00 markov00 self-assigned this Sep 16, 2020
markov00 added a commit to markov00/elastic-charts that referenced this issue Sep 23, 2020
This fix removes the needs of filling the missing x values on line and area charts in the following
case: non-stacked line or area chart, with continuous scale and no fit function.

BREAKING CHANGE: On non-stacked line or area charts, with a continuous x scale and no fit function,
the line between consecutive points, independently from the other data series, will be a continuous
connecting line.

fix elastic#825
markov00 added a commit that referenced this issue Sep 29, 2020
When rendering line or area charts with multiple series, we generally collect all the available X values and we automatically fill each series with missing x data points (to cover the most used case where we are rendering pre-aggregated data in Kibana).
This can cause issues when we want to keep the non-consecutive nature of the line/area. This fix removes the x filling for line and area charts in the following case: non-stacked line or area chart, with continuous scale and no fit function.
We apply this fix only to that specific case because: for stacked lines/area we need to clearly compute the stack of each data point on the x-axis, for categorical-ordinal scale (where a line/area chart doesn't always match with the best practice) the x-axis doesn't always describe a continuity within the data.

fix #825

BREAKING CHANGE: when rendering non-stacked line/area charts with a continuous x scale and no fit function,
the line/area between non-consecutive data points will be rendered as a continuous line/area without adding an uncertain dashed line/ semi-transparent area that connects the two, non-adjacent, points.
markov00 pushed a commit that referenced this issue Sep 30, 2020
# [23.0.0](v22.0.0...v23.0.0) (2020-09-30)

### Bug Fixes

* render continuous line/area between non-adjacent points ([#833](#833)) ([9f9892b](9f9892b)), closes [#825](#825)

### Features

* debug state flag added to chart status ([#834](#834)) ([83919ff](83919ff))
* expose datum as part of GeometryValue ([#822](#822)) ([dcd7077](dcd7077))

### BREAKING CHANGES

* when rendering non-stacked line/area charts with a continuous x scale and no fit function,
the line/area between non-consecutive data points will be rendered as a continuous line/area without adding an uncertain dashed line/ semi-transparent area that connects the two, non-adjacent, points.
@markov00
Copy link
Member

🎉 This issue has been resolved in version 23.0.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@markov00 markov00 added the released Issue released publicly label Sep 30, 2020
AMoo-Miki pushed a commit to AMoo-Miki/OpenSearch-Dashboards that referenced this issue Feb 10, 2022
# [23.0.0](elastic/elastic-charts@v22.0.0...v23.0.0) (2020-09-30)

### Bug Fixes

* render continuous line/area between non-adjacent points ([opensearch-project#833](elastic/elastic-charts#833)) ([5222c40](elastic/elastic-charts@5222c40)), closes [opensearch-project#825](elastic/elastic-charts#825)

### Features

* debug state flag added to chart status ([opensearch-project#834](elastic/elastic-charts#834)) ([f3aba25](elastic/elastic-charts@f3aba25))
* expose datum as part of GeometryValue ([opensearch-project#822](elastic/elastic-charts#822)) ([e582bd6](elastic/elastic-charts@e582bd6))

### BREAKING CHANGES

* when rendering non-stacked line/area charts with a continuous x scale and no fit function,
the line/area between non-consecutive data points will be rendered as a continuous line/area without adding an uncertain dashed line/ semi-transparent area that connects the two, non-adjacent, points.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working :data Data/series/scales related issue regression released Issue released publicly
Projects
None yet
2 participants