fix(domain): custom domain should not filter data#1181
Merged
markov00 merged 5 commits intoelastic:masterfrom Jun 3, 2021
Merged
fix(domain): custom domain should not filter data#1181markov00 merged 5 commits intoelastic:masterfrom
markov00 merged 5 commits intoelastic:masterfrom
Conversation
nickofthyme
approved these changes
Jun 3, 2021
Collaborator
nickofthyme
left a comment
There was a problem hiding this comment.
LTGM, checked all the vrt diffs and don't see any issues.
Comment on lines
+52
to
+61
| withPanelTransform( | ||
| ctx, | ||
| panel, | ||
| rotation, | ||
| renderingArea, | ||
| (ctx) => { | ||
| renderLine(ctx, line, sharedStyle, clippings, highlightedLegendItem); | ||
| }, | ||
| { area: clippings, shouldClip: true }, | ||
| ); |
Collaborator
There was a problem hiding this comment.
So currently the lines never needed to be clipped because of filtering the points before creating the path?
Collaborator
There was a problem hiding this comment.
Ya looks like that's the case, I think we should have always clipped the line. See the story below when you have really sharp splines.
Screen.Recording.2021-06-03.at.10.02.54.AM.mp4
Collaborator
Author
There was a problem hiding this comment.
Exactly, I haven't added the clipping for lines because of this case, but we are still clipping the areas for example, so this will also align the current rendering between these two chart types
nickofthyme
pushed a commit
that referenced
this pull request
Jun 4, 2021
# [30.0.0](v29.2.0...v30.0.0) (2021-06-04) ### Bug Fixes * **domain:** custom domain should not filter data ([#1181](#1181)) ([76e8dca](76e8dca)), closes [#1129](#1129) * **value_labels:** zero as a valid value for textBorder and borderWidth ([#1182](#1182)) ([a64f333](a64f333)) * annotation tooltip display when remounting specs ([#1167](#1167)) ([8408600](8408600)) * render nodeLabel formatted text into the nodes ([#1173](#1173)) ([b44bdff](b44bdff)) ### Features * **axis:** allow pixel domain padding for y axes ([#1145](#1145)) ([7c1fa8e](7c1fa8e)) * apply value formatter to the default legend item label ([#1190](#1190)) ([71474a5](71474a5)) * **tooltip:** stickTo vertical middle of the cursor ([#1163](#1163)) ([380363b](380363b)), closes [#1108](#1108) * **wordcloud:** click and over events on text ([#1180](#1180)) ([196fb6a](196fb6a)), closes [#1156](#1156) ### BREAKING CHANGES * **value_labels:** the `textBorder` of `ValueFillDefinition` is now optional or a number only
Collaborator
|
🎉 This PR is included in version 30.0.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
AMoo-Miki
pushed a commit
to AMoo-Miki/OpenSearch-Dashboards
that referenced
this pull request
Feb 10, 2022
# [30.0.0](elastic/elastic-charts@v29.2.0...v30.0.0) (2021-06-04) ### Bug Fixes * **domain:** custom domain should not filter data ([opensearch-project#1181](elastic/elastic-charts#1181)) ([92ba84c](elastic/elastic-charts@92ba84c)), closes [opensearch-project#1129](elastic/elastic-charts#1129) * **value_labels:** zero as a valid value for textBorder and borderWidth ([#1182](elastic/elastic-charts#1182)) ([880fbf1](elastic/elastic-charts@880fbf1)) * annotation tooltip display when remounting specs ([opensearch-project#1167](elastic/elastic-charts#1167)) ([7163951](elastic/elastic-charts@7163951)) * render nodeLabel formatted text into the nodes ([opensearch-project#1173](elastic/elastic-charts#1173)) ([0de9688](elastic/elastic-charts@0de9688)) ### Features * **axis:** allow pixel domain padding for y axes ([#1145](elastic/elastic-charts#1145)) ([6787728](elastic/elastic-charts@6787728)) * apply value formatter to the default legend item label ([opensearch-project#1190](elastic/elastic-charts#1190)) ([20108bb](elastic/elastic-charts@20108bb)) * **tooltip:** stickTo vertical middle of the cursor ([#1163](elastic/elastic-charts#1163)) ([b858fb3](elastic/elastic-charts@b858fb3)), closes [opensearch-project#1108](elastic/elastic-charts#1108) * **wordcloud:** click and over events on text ([opensearch-project#1180](elastic/elastic-charts#1180)) ([adbf341](elastic/elastic-charts@adbf341)), closes [opensearch-project#1156](elastic/elastic-charts#1156) ### BREAKING CHANGES * **value_labels:** the `textBorder` of `ValueFillDefinition` is now optional or a number only
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Domain bounds should be used in the sense of zooming in/out with a viewport on the chart. A regression of this behavior slipped through due to a PR causing data to be filtered out when applying a custom domain, removing data points from areas and lines. The right behavior is now restored.
Details
In the mentioned PR, when computing the line/area geometries, I have added an additional check in the defined function of the path generator. This check was to mark as not defined a data point if the Y value was outside the current Y scale domain.
I've removed that check and included the line clipping to avoid rendering the lines outside the chart area
All the VRTs changes are slight changes on lines rendered due to the change in the path generator
Connected issues
fix #1129
Checklist