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

fix: remove clippings from chart #320

Merged
merged 1 commit into from
Aug 21, 2019
Merged

Conversation

markov00
Copy link
Member

Summary

fix #20

This PR remove the clippings from the rendered geometries to allow full rendering elements on the edges.

It moves also the axis layer 1 level below the rendered geometries to clearly visualize the elements on top of the axis lines:

Screenshot 2019-08-17 at 00 58 34

cc @cchaos: FYI the following is an example with the axis layers 1 level above the chart geometries, what do you think it's better: showing the axis behind the chart elements or in front of them?:
Screenshot 2019-08-17 at 00 59 47

Checklist

Use strikethroughs to remove checklist items you don't feel are applicable to this PR.

  • [ ] Any consumer-facing exports were added to src/index.ts (and stories only import from ../src except for test data & storybook)
  • This was checked for cross-browser compatibility, including a check against IE11
  • [ ] Proper documentation or storybook story was added for features that require explanation or tutorials
  • [ ] Unit tests were updated or added to match the most common scenarios
  • Each commit follows the convention

@markov00 markov00 requested review from cchaos and nickofthyme August 16, 2019 23:02
@markov00 markov00 added :styling Styling related issue bug Something isn't working labels Aug 16, 2019
@codecov-io
Copy link

codecov-io commented Aug 16, 2019

Codecov Report

Merging #320 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #320   +/-   ##
=======================================
  Coverage   98.04%   98.04%           
=======================================
  Files          37       37           
  Lines        2715     2715           
  Branches      636      636           
=======================================
  Hits         2662     2662           
  Misses         48       48           
  Partials        5        5

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f9f13dd...56f8b1a. Read the comment docs.

@markov00 markov00 mentioned this pull request Aug 16, 2019
25 tasks
Copy link
Collaborator

@nickofthyme nickofthyme left a comment

Choose a reason for hiding this comment

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

Love this change ❤️! Tested locally, looks good 👍

@cchaos
Copy link
Contributor

cchaos commented Aug 19, 2019

Thanks @markov00

I definitely think the chart geometries should be on top. However, I am not super happy with the fact that the fills then overlap the axis lines.

The dot definitely needs to be above the axis lines but the dot, line, and fills should stay grouped together so they change in opacity together. So I'm not really sure what to do about that.

At the very least, it is only an issue for areas, I think. How do bars fit near the axes?

@markov00
Copy link
Member Author

Let's keep in that way right now. We will find a good way to clip out the axis labels from the geometries later

Copy link
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.

TY!

@markov00 markov00 merged commit ed6d0e5 into elastic:master Aug 21, 2019
@markov00 markov00 deleted the remove-clippings branch August 21, 2019 13:50
markov00 pushed a commit that referenced this pull request Aug 21, 2019
# [10.0.0](v9.2.1...v10.0.0) (2019-08-21)

### Bug Fixes

* **tooltip:** ie11 flex sizing ([#334](#334)) ([abaa472](abaa472)), closes [#332](#332)
* decuple brush cursor from chart rendering ([#331](#331)) ([789f85a](789f85a)), closes [elastic/kibana#36517](elastic/kibana#36517)
* remove clippings from chart geometries ([#320](#320)) ([ed6d0e5](ed6d0e5)), closes [#20](#20)

### Features

* auto legend resize ([#316](#316)) ([659d27e](659d27e)), closes [#268](#268)
* customize number of axis ticks ([#319](#319)) ([2b838d7](2b838d7))
* **theme:** base theme prop ([#333](#333)) ([a9ff5e1](a9ff5e1)), closes [#292](#292)

### BREAKING CHANGES

* **theme:** remove `baseThemeType` prop on `Settings` component and `BaseThemeTypes` type.
* `theme.legend.spacingBuffer` added to `Theme` type. Controls the width buffer between the legend label and value.
@markov00
Copy link
Member Author

🎉 This PR is included in version 10.0.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@markov00 markov00 added the released Issue released publicly label Aug 21, 2019
AMoo-Miki pushed a commit to AMoo-Miki/OpenSearch-Dashboards that referenced this pull request Feb 10, 2022
# [10.0.0](elastic/elastic-charts@v9.2.1...v10.0.0) (2019-08-21)

### Bug Fixes

* **tooltip:** ie11 flex sizing ([opensearch-project#334](elastic/elastic-charts#334)) ([2683333](elastic/elastic-charts@2683333)), closes [opensearch-project#332](elastic/elastic-charts#332)
* decuple brush cursor from chart rendering ([opensearch-project#331](elastic/elastic-charts#331)) ([b5b8dde](elastic/elastic-charts@b5b8dde)), closes [elastic/kibana#36517](elastic/kibana#36517)
* remove clippings from chart geometries ([opensearch-project#320](elastic/elastic-charts#320)) ([497efa4](elastic/elastic-charts@497efa4)), closes [opensearch-project#20](elastic/elastic-charts#20)

### Features

* auto legend resize ([opensearch-project#316](elastic/elastic-charts#316)) ([be4a53d](elastic/elastic-charts@be4a53d)), closes [opensearch-project#268](elastic/elastic-charts#268)
* customize number of axis ticks ([opensearch-project#319](elastic/elastic-charts#319)) ([a7a4ecd](elastic/elastic-charts@a7a4ecd))
* **theme:** base theme prop ([opensearch-project#333](elastic/elastic-charts#333)) ([0b38770](elastic/elastic-charts@0b38770)), closes [opensearch-project#292](elastic/elastic-charts#292)

### BREAKING CHANGES

* **theme:** remove `baseThemeType` prop on `Settings` component and `BaseThemeTypes` type.
* `theme.legend.spacingBuffer` added to `Theme` type. Controls the width buffer between the legend label and value.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working released Issue released publicly :styling Styling related issue
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Avoid clipping tooltip markers on edges
4 participants