Skip to content

[Elastic charts] Improve crosshair styles#4503

Merged
elizabetdev merged 2 commits intoelastic:masterfrom
elizabetdev:elastic-charts-crosshair-styles
Feb 10, 2021
Merged

[Elastic charts] Improve crosshair styles#4503
elizabetdev merged 2 commits intoelastic:masterfrom
elizabetdev:elastic-charts-crosshair-styles

Conversation

@elizabetdev
Copy link
Copy Markdown
Contributor

@elizabetdev elizabetdev commented Feb 9, 2021

Summary

This PR fixes #4308.

  • Merged the new version of the Elastic Charts 24.5.1
  • Added the new theme object crosshair.crossLine.
  • Added a horizontal crosshair to /elastic-charts/time-series example.

Issue to address in a future PR

I notice an issue with the crosshair. When grid lines are visible the crosshair hides behind those lines. I opened a PR in Elastic Charts repo to address this issue: elastic/elastic-charts#1021.

Before

As we can see, the crosshair was too light and almost invisible.

Screen.Recording.2021-02-09.at.03.53.PM.mov

After

Now, the crosshair looks better. You can also notice that there's an issue that I mentioned above (the crosshair hides behind the grid lines). This must be addressed in a future PR.

Screen.Recording.2021-02-09.at.03.55.PM.mov

How to test

Go to https://eui.elastic.co/pr_4503/#/elastic-charts/time-series. Interact with the chart. You can also change the chart type:

Screenshot 2021-02-09 at 17 50 06

Checklist

@elizabetdev elizabetdev changed the title Elastic charts crosshair styles [Elastic charts] Improve crosshair styles Feb 9, 2021
@kibanamachine
Copy link
Copy Markdown

Preview documentation changes for this PR: https://eui.elastic.co/pr_4503/

Copy link
Copy Markdown
Contributor

@cchaos cchaos left a comment

Choose a reason for hiding this comment

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

Looks great in both themes. Had a quick question about the original theme key.

strokeWidth: 1,
dash: [4, 4],
},
crossLine: {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

So is the line: key above this still valid or should it be removed?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

It's still valid. The crossLine appears when tooltip="cross" is passed (horizontal crossing line). And the line is the default vertical crosshair.

@elizabetdev elizabetdev merged commit fa99d7e into elastic:master Feb 10, 2021
@akashgp09
Copy link
Copy Markdown
Contributor

Facing this error when making a git commit
Seems like it's occuring after this PR got merged

@cchaos
Copy link
Copy Markdown
Contributor

cchaos commented Feb 10, 2021

@akashgp09 There was an update to the Elastic-Charts dependency. Be sure to rerun yarn to update that dependency locally.

@akashgp09
Copy link
Copy Markdown
Contributor

thanks 😅

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Discuss] Color of crosshair line in EUI chart theme is too invisible.

4 participants