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: improve line join rendering #920

Merged
merged 4 commits into from
Dec 2, 2020

Conversation

markov00
Copy link
Member

Summary

This PR change the lineJoin property used when rendering lines to round to avoid spikes with very acute angles

From:
Screenshot 2020-11-25 at 14 22 34

To:
Screenshot 2020-11-25 at 14 22 24

The spike effect mostly visible when using a line with a strokeWidth greater than 1 and the artifact created distorts also the actual chart reading:
Screenshot 2020-11-25 at 14 33 06

@codecov-io
Copy link

codecov-io commented Nov 25, 2020

Codecov Report

Merging #920 (c7b3d6c) into master (8b167a4) will increase coverage by 0.54%.
The diff coverage is 13.33%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #920      +/-   ##
==========================================
+ Coverage   70.09%   70.63%   +0.54%     
==========================================
  Files         341      357      +16     
  Lines       11014    11318     +304     
  Branches     2388     2412      +24     
==========================================
+ Hits         7720     7995     +275     
- Misses       3280     3303      +23     
- Partials       14       20       +6     
Flag Coverage Δ
unittests 70.11% <13.33%> (+0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
..._types/xy_chart/renderer/canvas/primitives/line.ts 16.66% <9.09%> (-8.34%) ⬇️
..._types/xy_chart/renderer/canvas/primitives/path.ts 12.50% <25.00%> (+3.06%) ⬆️
src/mocks/series/index.ts 100.00% <0.00%> (ø)
src/mocks/series/series.ts 90.00% <0.00%> (ø)
src/mocks/store/index.ts 100.00% <0.00%> (ø)
src/mocks/specs/index.ts 100.00% <0.00%> (ø)
src/mocks/series/series_identifiers.ts 100.00% <0.00%> (ø)
src/mocks/specs/specs.ts 82.95% <0.00%> (ø)
src/mocks/series/data.ts 100.00% <0.00%> (ø)
src/mocks/scale/scale.ts 77.77% <0.00%> (ø)
... and 8 more

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 8b167a4...c7b3d6c. Read the comment docs.

@markov00 markov00 marked this pull request as ready for review December 1, 2020 18:06
Copy link
Contributor

@rshen91 rshen91 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 storybook locally

@markov00 markov00 merged commit ec8041a into elastic:master Dec 2, 2020
@markov00 markov00 deleted the 2020_11_25-rounded_line_joints branch December 2, 2020 09:33
markov00 pushed a commit that referenced this pull request Dec 4, 2020
# [24.3.0](v24.2.0...v24.3.0) (2020-12-04)

### Bug Fixes

* **highlighter:** show default highlighted radius with hidden dots ([#926](#926)) ([8b167a4](8b167a4)), closes [#679](#679)
* **xy_chart:** improve line joins rendering ([#920](#920)) ([ec8041a](ec8041a))
* point highlight based on geom position and transform ([#934](#934)) ([7198b5d](7198b5d))

### Features

* allow no results component, don't require series ([#936](#936)) ([4766c23](4766c23))
* improved domain error handling ([#933](#933)) ([94534a5](94534a5))
@markov00
Copy link
Member Author

markov00 commented Dec 4, 2020

🎉 This PR is included in version 24.3.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@markov00 markov00 added the released Issue released publicly label Dec 4, 2020
AMoo-Miki pushed a commit to AMoo-Miki/OpenSearch-Dashboards that referenced this pull request Feb 10, 2022
# [24.3.0](elastic/elastic-charts@v24.2.0...v24.3.0) (2020-12-04)

### Bug Fixes

* **highlighter:** show default highlighted radius with hidden dots ([opensearch-project#926](elastic/elastic-charts#926)) ([351c20c](elastic/elastic-charts@351c20c)), closes [opensearch-project#679](elastic/elastic-charts#679)
* **xy_chart:** improve line joins rendering ([opensearch-project#920](elastic/elastic-charts#920)) ([9a6771c](elastic/elastic-charts@9a6771c))
* point highlight based on geom position and transform ([opensearch-project#934](elastic/elastic-charts#934)) ([196ee8d](elastic/elastic-charts@196ee8d))

### Features

* allow no results component, don't require series ([opensearch-project#936](elastic/elastic-charts#936)) ([6be5c8b](elastic/elastic-charts@6be5c8b))
* improved domain error handling ([opensearch-project#933](elastic/elastic-charts#933)) ([f480054](elastic/elastic-charts@f480054))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
released Issue released publicly
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants