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

Annotation does not cover all of x-axis #586

Closed
1 of 2 tasks
smith opened this issue Mar 16, 2020 · 1 comment · Fixed by #641 or elastic/kibana#64759
Closed
1 of 2 tasks

Annotation does not cover all of x-axis #586

smith opened this issue Mar 16, 2020 · 1 comment · Fixed by #641 or elastic/kibana#64759
Assignees
Labels
:annotation Annotation (line, rect, text) related issue bug Something isn't working released Issue released publicly :xy Bar/Line/Area chart related

Comments

@smith
Copy link
Contributor

smith commented Mar 16, 2020

Describe the bug

When making a RectAnnotation designed to cover all of the x-axis on a bar chart using the x values, the annotation will not show up if the x1 coordinate is the same as the number of x values. If it's one less, it covers all but the last bar.

To Reproduce

See the example in this CodeSandbox: https://codesandbox.io/s/elastic-charts-annotation-bug-qweje

Expected behavior

The annotation covers the entire x-axis.

Version (please complete the following information):

  • OS: MacOS 10.15.4 Beta (19E258a)
  • Browser: Chrome 80.0.3987.132, all browsers
  • Elastic Charts: 17.1.1

Kibana Cross Issues

Also demonstrated in elastic/kibana#59496.

Checklist

  • every related Kibana issue is listed under Kibana Cross Issues list
  • kibana cross issue tag is associated to the issue if any kibana cross issue is present
@smith smith added the bug Something isn't working label Mar 16, 2020
@markov00 markov00 added the :annotation Annotation (line, rect, text) related issue label Mar 26, 2020
@markov00 markov00 added the :xy Bar/Line/Area chart related label Mar 26, 2020
@markov00 markov00 self-assigned this Apr 9, 2020
markov00 added a commit to markov00/elastic-charts that referenced this issue Apr 24, 2020
This commit fixed the alignment of rect and line annotations near the edge of a data domain. It
aligns the x/y position specified by the dataValues of the annotation to the domain of the chart.

BREAKING CHANGE: In the rectangular annotation, the `y0` parameter of the coordinates now refers to
the minimum value and the `y1` value refers to the maximum value of the y domain. Previously, this
was the opposite.

fix elastic#586
markov00 added a commit that referenced this issue Apr 28, 2020
This commit fixed the alignment of rect and line annotations near the edge of a data domain. It aligns the x/y position specified by the `dataValues` of the annotation to the domain of the chart.

BREAKING CHANGE: In the rectangular annotation, the y0 parameter of the coordinates now refers to the minimum value and the y1 value refers to the maximum value of the y domain.

fix #586
markov00 pushed a commit that referenced this issue Apr 28, 2020
# [19.0.0](v18.4.2...v19.0.0) (2020-04-28)

### Bug Fixes

* tooltip container scroll issue ([#647](#647)) ([f411771](f411771))
* **annotations:** fix alignment at the edges ([#641](#641)) ([43c5a59](43c5a59)), closes [#586](#586)

### Features

* shift click legend items & partition legend hover ([#648](#648)) ([ed91744](ed91744))
* **brush:** add multi axis brushing ([#625](#625)) ([9e49534](9e49534)), closes [#587](#587) [#620](#620)

### BREAKING CHANGES

* **brush:** The type used by the `BrushEndListener` is now in the following form `{ x?: [number, number]; y?: Array<{ groupId: GroupId; values: [number,
number]; }> }` where `x` contains an array of `[min, max]` values, and the  `y` property is an optional array of objects, containing the `GroupId` and the values of the brush for that specific axis.
* **annotations:** In the rectangular annotation, the y0 parameter of the coordinates now refers to the minimum value and the y1 value refers to the maximum value of the y domain.
@markov00
Copy link
Member

🎉 This issue has been resolved in version 19.0.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@markov00 markov00 added the released Issue released publicly label Apr 28, 2020
AMoo-Miki pushed a commit to AMoo-Miki/OpenSearch-Dashboards that referenced this issue Feb 10, 2022
# [19.0.0](elastic/elastic-charts@v18.4.2...v19.0.0) (2020-04-28)

### Bug Fixes

* tooltip container scroll issue ([opensearch-project#647](elastic/elastic-charts#647)) ([f0af34b](elastic/elastic-charts@f0af34b))
* **annotations:** fix alignment at the edges ([opensearch-project#641](elastic/elastic-charts#641)) ([c698d08](elastic/elastic-charts@c698d08)), closes [opensearch-project#586](elastic/elastic-charts#586)

### Features

* shift click legend items & partition legend hover ([opensearch-project#648](elastic/elastic-charts#648)) ([cf15ca1](elastic/elastic-charts@cf15ca1))
* **brush:** add multi axis brushing ([opensearch-project#625](elastic/elastic-charts#625)) ([382cb14](elastic/elastic-charts@382cb14)), closes [opensearch-project#587](elastic/elastic-charts#587) [opensearch-project#620](elastic/elastic-charts#620)

### BREAKING CHANGES

* **brush:** The type used by the `BrushEndListener` is now in the following form `{ x?: [number, number]; y?: Array<{ groupId: GroupId; values: [number,
number]; }> }` where `x` contains an array of `[min, max]` values, and the  `y` property is an optional array of objects, containing the `GroupId` and the values of the brush for that specific axis.
* **annotations:** In the rectangular annotation, the y0 parameter of the coordinates now refers to the minimum value and the y1 value refers to the maximum value of the y domain.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:annotation Annotation (line, rect, text) related issue bug Something isn't working released Issue released publicly :xy Bar/Line/Area chart related
Projects
None yet
2 participants