feat(annotations): render line annotations via LineAnnotation spec#126
Merged
emmacunningham merged 53 commits intoelastic:masterfrom Apr 4, 2019
Merged
Conversation
Codecov Report
@@ Coverage Diff @@
## master #126 +/- ##
==========================================
+ Coverage 92.84% 93.67% +0.83%
==========================================
Files 31 32 +1
Lines 1481 1660 +179
Branches 163 194 +31
==========================================
+ Hits 1375 1555 +180
+ Misses 92 90 -2
- Partials 14 15 +1
Continue to review full report at Codecov.
|
markov00
approved these changes
Apr 4, 2019
Collaborator
markov00
left a comment
There was a problem hiding this comment.
Tested locally and works fine now.
I've found just few minor things:
- on scale continuous, if you add an annotation with an empty string, it will be configured as an annotation on 0, this because d3-scale coerce values...
- I think you can keep the
LineAnnotationstyleprop as if was before: Partial and optional, as you will always merge it on chartState when adding the annotation spec.
Beside that last point, I think it's good to merge
19 tasks
Contributor
Author
markov00
pushed a commit
that referenced
this pull request
Apr 4, 2019
# [3.6.0](v3.5.1...v3.6.0) (2019-04-04) ### Features * **annotations:** render line annotations via LineAnnotation spec ([#126](#126)) ([98ff170](98ff170))
Collaborator
|
🎉 This PR is included in version 3.6.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
3 tasks
AMoo-Miki
pushed a commit
to AMoo-Miki/OpenSearch-Dashboards
that referenced
this pull request
Feb 10, 2022
# [3.6.0](elastic/elastic-charts@v3.5.1...v3.6.0) (2019-04-04) ### Features * **annotations:** render line annotations via LineAnnotation spec ([opensearch-project#126](elastic/elastic-charts#126)) ([ac9313f](elastic/elastic-charts@ac9313f))
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
close #104
This PR introduces a LineAnnotation spec so the user can specify what annotations on a chart they want.
Since this is the first of the Annotation features, this also introduces a bit of scaffolding for the annotations overall. This implementation allows a user to define a set of annotations by defining one of three specs (LineAnnotation, RectangleAnnotation, and TextAnnotation).
Within a LineAnnotation spec a user may define:
dataValuesare defined in terms of data relevant to a scale within the chart. If thedomainTypeis xDomain, then the annotation points will be scaled relative to the xDomain scale. If thedomainTypeis yDomain, then the annotation points will be scaled relative to a yDomain scale; we get the relevant scale by lookup up againstthis.yScaleswith thegroupIddefined on the spec.Checklist
Use
strikethroughsto remove checklist items you don't feel are applicable to this PR.