feat(annotations): option to render rect annotations outside chart#1207
Merged
nickofthyme merged 9 commits intoelastic:masterfrom Jun 24, 2021
Merged
feat(annotations): option to render rect annotations outside chart#1207nickofthyme merged 9 commits intoelastic:masterfrom
nickofthyme merged 9 commits intoelastic:masterfrom
Conversation
markov00
reviewed
Jun 17, 2021
packages/charts/src/chart_types/xy_chart/annotations/rect/dimensions.ts
Outdated
Show resolved
Hide resolved
packages/charts/src/chart_types/xy_chart/annotations/rect/dimensions.ts
Outdated
Show resolved
Hide resolved
markov00
approved these changes
Jun 24, 2021
Collaborator
markov00
left a comment
There was a problem hiding this comment.
It looks good to me, the with the latest changes we have a clear way to configure the dimension outside, independently from external factors
nickofthyme
pushed a commit
that referenced
this pull request
Jun 29, 2021
# [31.0.0](v30.2.0...v31.0.0) (2021-06-29) ### Bug Fixes * **xy:** render gridlines behind axis ([#1204](#1204)) ([38ebe2d](38ebe2d)), closes [#1203](#1203) * memory leak related to re-reselect cache ([#1201](#1201)) ([02025cf](02025cf)) * **partition:** getLegendItemsExtra no longer assumes a singleton ([#1199](#1199)) ([100145b](100145b)) ### Features * **annotations:** option to render rect annotations outside chart ([#1207](#1207)) ([4eda382](4eda382)) * **heatmap:** enable brushing on categorical charts ([#1212](#1212)) ([10c3493](10c3493)), closes [#1170](#1170) [#1171](#1171) * **xy:** add onPointerUpdate debounce and trigger options ([#1194](#1194)) ([a9a9b25](a9a9b25)) ### BREAKING CHANGES * **xy:** the `PointerOverEvent` type now extends `ProjectedValues` and drops value. This effectively replaces value with `x`, `y`, `smVerticalValue` and `smHorizontalValue`.
Collaborator
Author
|
🎉 This PR is included in version 31.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
# [31.0.0](elastic/elastic-charts@v30.2.0...v31.0.0) (2021-06-29) ### Bug Fixes * **xy:** render gridlines behind axis ([opensearch-project#1204](elastic/elastic-charts#1204)) ([bf9ccbd](elastic/elastic-charts@bf9ccbd)), closes [#1203](elastic/elastic-charts#1203) * memory leak related to re-reselect cache ([opensearch-project#1201](elastic/elastic-charts#1201)) ([8cb6876](elastic/elastic-charts@8cb6876)) * **partition:** getLegendItemsExtra no longer assumes a singleton ([opensearch-project#1199](elastic/elastic-charts#1199)) ([ecbcc1e](elastic/elastic-charts@ecbcc1e)) ### Features * **annotations:** option to render rect annotations outside chart ([opensearch-project#1207](elastic/elastic-charts#1207)) ([ddffc00](elastic/elastic-charts@ddffc00)) * **heatmap:** enable brushing on categorical charts ([opensearch-project#1212](elastic/elastic-charts#1212)) ([5c426b3](elastic/elastic-charts@5c426b3)), closes [opensearch-project#1170](elastic/elastic-charts#1170) [opensearch-project#1171](elastic/elastic-charts#1171) * **xy:** add onPointerUpdate debounce and trigger options ([opensearch-project#1194](elastic/elastic-charts#1194)) ([aa068f6](elastic/elastic-charts@aa068f6)) ### BREAKING CHANGES * **xy:** the `PointerOverEvent` type now extends `ProjectedValues` and drops value. This effectively replaces value with `x`, `y`, `smVerticalValue` and `smHorizontalValue`.
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
The
outsideprop is now available in theRectAnnotationcomponent to allow rendering annotations outside of the chart within the axis tick gutter.Details
Using
RectAnnotationwithoutsideprop regardless ofrotationorgroupIdcorrectly renders the annotation within thetickLine.sizegutter.Limitations:
xcoordinates or onlyycoordinates are specified by the user.tickLinetheme is visible and non-zerostrokeWidth. This the outside annotation height/width is set by theoutsideDimensionprop which defaults to thetickLine.sizefor the respective axis.Demo
Screen.Recording.2021-06-16.at.11.19.26.AM.mp4
Issues
closes #928 allowing outside rect annotations
fix #1205 causing issues with
groupIdwhen using the default height/widthChecklist
packages/charts/src/index.ts(and stories only import from../srcexcept for test data & storybook)