Skip to content

fix(xy): show mouse cursors on charts with opaque background#1447

Merged
markov00 merged 1 commit intoelastic:masterfrom
markov00:2021_10_28-fix_hidden_cursor_behind_chart
Oct 29, 2021
Merged

fix(xy): show mouse cursors on charts with opaque background#1447
markov00 merged 1 commit intoelastic:masterfrom
markov00:2021_10_28-fix_hidden_cursor_behind_chart

Conversation

@markov00
Copy link
Collaborator

@markov00 markov00 commented Oct 28, 2021

Summary

This fixes a regression introduced by #1372 that applied the background color to the canvas when clearing the chart.

The opaque canvas prevents the band cursor to be shown behind the data-ink like for bar charts and prevents the cursor line to be shown when the zIndex (applied to the line cursor container) is calculated as zero.

The background color is always ensured by the <ChartBackground> component that is always rendered behind the canvas

The VRTs used the EUI theme to ensure the correct rendering in Kibana

Checklist

  • The proper chart type label has been added (e.g. :xy, :partition)
  • The proper feature labels have been added (e.g. :interactions, :axis)
  • Unit tests have been added or updated to match the most common scenarios
  • The proper documentation and/or storybook story has been added or updated
  • The code has been checked for cross-browser compatibility (Chrome, Firefox, Safari, Edge)
  • Visual changes have been tested with all available themes including dark, light, eui-dark & eui-light

rshen91 added a commit to rshen91/elastic-charts that referenced this pull request Oct 28, 2021
@markov00 markov00 changed the title fix mouse cursors on xy charts fix(xy): show mouse cursors on charts with opaque background Oct 29, 2021
@markov00 markov00 added :interactions Interactions related issue :xy Bar/Line/Area chart related labels Oct 29, 2021
@markov00 markov00 marked this pull request as ready for review October 29, 2021 07:48
Copy link
Contributor

@monfera monfera left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, tested locally. It covers xy charts only as the PR title says

@markov00 markov00 merged commit e0f1543 into elastic:master Oct 29, 2021
nickofthyme pushed a commit that referenced this pull request Oct 29, 2021
## [38.1.2](v38.1.1...v38.1.2) (2021-10-29)

### Bug Fixes

* **xy:** multilayer time axis tick/grid only when tick is inside domain ([#1446](#1446)) ([1d06a1e](1d06a1e))
* **xy:** show mouse cursors on charts with opaque background ([#1447](#1447)) ([e0f1543](e0f1543))
@nickofthyme
Copy link
Collaborator

🎉 This PR is included in version 38.1.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

@nickofthyme nickofthyme added the released Issue released publicly label Oct 29, 2021
nickofthyme pushed a commit to nickofthyme/elastic-charts that referenced this pull request Nov 2, 2021
nickofthyme added a commit that referenced this pull request Nov 2, 2021
…1455)

Co-authored-by: Marco Vettorello <vettorello.marco@gmail.com>
nickofthyme pushed a commit that referenced this pull request Nov 2, 2021
## [38.0.2](v38.0.1...v38.0.2) (2021-11-02)

### Bug Fixes

* **interactions:** line cursor above the chart, band cursor below ([#1453](#1453)) ([#1457](#1457)) ([ca004a6](ca004a6))
* **theme:** merge partial with empty initial partial ([#1452](#1452)) ([#1454](#1454)) ([2eadc71](2eadc71))
* **xy:** show mouse cursors on charts with opaque background ([#1447](#1447)) ([#1455](#1455)) ([b416ed5](b416ed5))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

:interactions Interactions related issue released Issue released publicly :xy Bar/Line/Area chart related

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants