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

add white boundary for the donut marker #116

Merged
merged 4 commits into from
Apr 27, 2023

Conversation

moontrip
Copy link
Contributor

This will resolve VEuPathDB/web-components#345. Here is a screenshot:

345 white edge of the donut01

@moontrip moontrip requested a review from asizemore April 25, 2023 18:12
Copy link
Member

@asizemore asizemore left a comment

Choose a reason for hiding this comment

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

I had a few comments but they're just suggestions :)

@@ -215,11 +215,18 @@ function donutMarkerSVGIcon(props: DonutMarkerStandaloneProps): {
} {
const scale = props.markerScale ?? MarkerScaleDefault;
const size = 40 * scale;
// set outter white circle size to describe white boundary
const outerWhiteCircleSize = size / 2 + size / 16;
Copy link
Member

Choose a reason for hiding this comment

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

Can we call this backgroundWhiteCircleRadius? The 'background' because we see it's outer and inner parts since it's behind the data donut, and 'radius' because it looks like we usually use 'size' as a diameter but below in line 252 we're using it as a radius.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@asizemore Thank you for your reviews, tests, and suggestions! 👍 I like the word so will change it accordingly.

@@ -266,31 +273,32 @@ function donutMarkerSVGIcon(props: DonutMarkerStandaloneProps): {
// only sum up in cumulative mode
cumulativeSum += thisValue;

//DKDK draw arc: makeArc(centerX, centerY, Radius for arc, start point of arc (radian), end point of arc (radian))
// draw arc: makeArc(centerX, centerY, Radius for arc, start point of arc (radian), end point of arc (radian))
svgHTML +=
'<path fill="none" stroke="' +
(el.color ?? 'silver') +
'" stroke-width="4" d="' +
Copy link
Member

Choose a reason for hiding this comment

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

What do you think about setting stroke-width to be 5? It was kinda nice to see more of the data colors, but perhaps there was a reason to set it to 4 originally?

(with stroke-width=5)
Screen Shot 2023-04-27 at 5 49 34 AM

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@asizemore I don't think we have a specific reason not to use larger stroke-width as you suggested. 🤔 Will ask Bob about this at slack, just in case.

Copy link
Member

Choose a reason for hiding this comment

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

I like the bolder look. The only issue is squeezing in the numbers. I think above 9999 we switch to 10k, 11k etc, so we should be fine up to 999k. Looks like room for 4 characters?

@moontrip
Copy link
Contributor Author

@bobular yes I think the number label would be fine. I will change to 5 as @asizemore suggested. Thank you for sharing your insight 👍

@moontrip moontrip merged commit 008242a into main Apr 27, 2023
1 check passed
@dmfalke dmfalke deleted the 345-donut-marker-white-boundary branch June 28, 2023 17:33
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.

Map donuts: Consider adding white around the edge of the donut
3 participants