Skip to content

add bar corner roundness attribute - #2

Open
Andrucis wants to merge 5 commits into
masterfrom
bar-corner-roundness
Open

add bar corner roundness attribute#2
Andrucis wants to merge 5 commits into
masterfrom
bar-corner-roundness

Conversation

@Andrucis

Copy link
Copy Markdown
Owner

This PR adds a possibility to adjust roundness of trace bar corners.
Each corners roundness can be adjusted individually.
Value passed represents percentage of desirable roundness.
"cornerroundness": { "bottomleft": 0.3, "bottomright": 0, "topleft": 0.3, "topright": 0 }
This is implemented by taking calculated vector values in bar\plot.js file and adjusting them when generating svg path description attribute.
Round corners are drawn with absolute elliptical arc curve command A.
Arc radius is calculated by taking the smallest edge width of all bars and dividing it by two and then applying desired roundness percentage value.
All four possible vector drawing directions are handled.
image
image

@Andrucis Andrucis changed the title Bar corner roundness add bar corner roundness attribute Mar 21, 2018
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.

1 participant