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

fix: line path with ordered xValues #824

Merged
merged 8 commits into from
Sep 17, 2020

Conversation

nickofthyme
Copy link
Collaborator

@nickofthyme nickofthyme commented Sep 15, 2020

Summary

fixes #823
re-fixes #680

Fix line path with ordered xValues on Ordinal scales.

Before

Image 2020-09-15 at 4 00 59 PM

After

image

Checklist

  • Any consumer-facing exports were added to src/index.ts (and stories only import from ../src except for test data & storybook)
  • This was checked for cross-browser compatibility
  • Proper documentation or storybook story was added for features that require explanation or tutorials
  • Unit tests were updated or added to match the most common scenarios

@nickofthyme nickofthyme added bug Something isn't working :data Data/series/scales related issue regression labels Sep 15, 2020
nickofthyme referenced this pull request Sep 15, 2020
This commit adds the wiggle and silhouette stacks mode as available in vislib that allow the creation of streamgraph. It is also to fix fit functions for stacked charts. The commit also add the following fixes:
- fit functions are now available also on stacked charts
- the legend extra value is now displayed, on-demand, only on charts with a continuous x-axis
- Adjusts slightly the way fitted data is represented in the case of null values and no fit option specified. It renders an empty area in this case
- for zero-based charts (bar and area charts) the fit option doesn't have any effects
- djusts the clipped ranges for ordinal charts, where the lines where wrongly clipped due to a missing translate call when rendering

BREAKING CHANGE: the first parameter of `PointStyleAccessor` and `BarStyleAccessor` callbacks is changed from `RawDataSeriesDatum` to `DataSeriesDatum`. `stackAsPercentage` prop is replaced by `stackMode` that accept one `StackMode`.

fix #766
fix #715
close #450
@codecov-commenter
Copy link

codecov-commenter commented Sep 15, 2020

Codecov Report

Merging #824 into master will increase coverage by 0.02%.
The diff coverage is 92.85%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #824      +/-   ##
==========================================
+ Coverage   74.07%   74.09%   +0.02%     
==========================================
  Files         277      277              
  Lines        9436     9440       +4     
  Branches     2037     2037              
==========================================
+ Hits         6990     6995       +5     
+ Misses       2437     2436       -1     
  Partials        9        9              
Flag Coverage Δ
#unittests 74.09% <92.85%> (+0.02%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
src/chart_types/xy_chart/utils/fill_series.ts 100.00% <ø> (ø)
src/chart_types/xy_chart/utils/series.ts 86.74% <92.85%> (+0.21%) ⬆️
...chart_types/xy_chart/utils/stacked_series_utils.ts 89.55% <0.00%> (+1.49%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 7aba794...ebb93d7. Read the comment docs.

Copy link
Member

@markov00 markov00 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested locally, works great
I've added a small comment to improve the testing

stories/line/10_test_path_ordering.tsx Outdated Show resolved Hide resolved
Co-authored-by: Marco Vettorello <[email protected]>
@nickofthyme nickofthyme linked an issue Sep 17, 2020 that may be closed by this pull request
@nickofthyme nickofthyme merged commit 5a73a3a into elastic:master Sep 17, 2020
@nickofthyme nickofthyme deleted the fix-order-by-path branch September 17, 2020 15:12
markov00 pushed a commit that referenced this pull request Sep 17, 2020
## [21.3.1](v21.3.0...v21.3.1) (2020-09-17)

### Bug Fixes

* line path with ordered xValues ([#824](#824)) ([5a73a3a](5a73a3a))
@markov00
Copy link
Member

🎉 This PR is included in version 21.3.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

@markov00 markov00 added the released Issue released publicly label Sep 17, 2020
AMoo-Miki pushed a commit to AMoo-Miki/OpenSearch-Dashboards that referenced this pull request 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 :data Data/series/scales related issue regression released Issue released publicly
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Order values by sum causes bad line path Missing values default to value when stacked
3 participants