feat: debug state flag added to chart status#834
Merged
nickofthyme merged 9 commits intoelastic:masterfrom Sep 30, 2020
Merged
Conversation
markov00
reviewed
Sep 24, 2020
Collaborator
markov00
left a comment
There was a problem hiding this comment.
The code looks good and works perfectly. I've left few comments on the data structure and API that should be discussed
markov00
approved these changes
Sep 30, 2020
Collaborator
markov00
left a comment
There was a problem hiding this comment.
LGTM, I've added some minor comments.
Please remember to remove the elastic-charts-22.0.0.tgz file
api/charts.api.md
Outdated
Comment on lines
+11
to
+12
| // Warning: (ae-forgotten-export) The symbol "AccessorObjectKey" needs to be exported by the entry point index.d.ts | ||
| // Warning: (ae-forgotten-export) The symbol "AccessorArrayIndex" needs to be exported by the entry point index.d.ts |
Collaborator
There was a problem hiding this comment.
we should fix these and export also AccessorObjectKey and AccessorArrayIndex
Comment on lines
+115
to
+132
| const label = displayValue?.text; | ||
| if (!buckets.has(key)) { | ||
| const name = seriesNameMap.get(key) ?? ''; | ||
| buckets.set(key, { | ||
| key, | ||
| name, | ||
| color, | ||
| bars: [], | ||
| labels: [], | ||
| visible: hasVisibleStyle(rect) || hasVisibleStyle(rectBorder), | ||
| }); | ||
| } | ||
|
|
||
| buckets.get(key)!.bars.push({ x, y, mark }); | ||
|
|
||
| if (label) { | ||
| buckets.get(key)!.labels.push(label); | ||
| } |
Collaborator
There was a problem hiding this comment.
instead of using the non-null operator you can do something like
const bucket = buckets.get(key) || {
key,
name,
color,
bars: [],
labels: [],
visible: hasVisibleStyle(rect) || hasVisibleStyle(rectBorder),
}
update the bucket with the values and then save it back to the map
markov00
pushed a commit
that referenced
this pull request
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.
Collaborator
|
🎉 This PR is included in version 23.0.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
1 task
AMoo-Miki
pushed a commit
to AMoo-Miki/OpenSearch-Dashboards
that referenced
this pull request
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.
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
Related to #794
Adds
debugStateprop toSettingscomponent to render textual representation of chart.see http://localhost:9001/?path=/story/debug-options--debug-state
Checklist
src/index.ts(and stories only import from../srcexcept for test data & storybook)