-
Notifications
You must be signed in to change notification settings - Fork 95
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
Showing zero sized nodes with some minimum length arc #89
Comments
@Mahesha999 the radial size of any node in the data tree is equal to: the node size + the combined size of all its children. I think the right thing to do for your use case is to add a size of
Difficult to say without more context. Can you make a reduced example on https://codepen.io/? |
But that will change the relative sizes, right? I mean this will make nodes with no size to have same size as those nodes which really have size of 20. This made me first copy
This can be seen in Now instead of displaying
Inside
This is how it displays when zoomed in: (Is above approach correct? Or is there any better way to achieve the same result?) However, when zoomed out, it does not show those tiny arcs corresponding to no video (that is in above image there are 6 sections inside introduction, but in below image there are only 4): Here is the sandbox. Also I guess I once saw those tiny no-video arcs with the exact same file as in this sandbox even in completely zoomed out view. But now not able to see them. So was just guessing if there is any other factor that will make those arcs show or hide. |
@Mahesha999 from your sandbox I can see those small segments are there even when zoomed out. The issue is that their radial width is so small (sub-pixel) that you don't even see them. But if you hover carefully you'll find that they are in fact being rendered onto the DOM, albeit with a very small size, for example: |
Yes / no. I increased the browser zoom by 500%, and I believe I can safely say it is not shown by the component. At least, I am not able to see it when completely zoomed out as can be seen below. But when I slide the mouse cursor slowly, it does show the tooltip when mouse if on empty space after crossing the last arc with some video. Also when I zoom in to "Network Layer" section, I am still able to see no-video section even at 500% browser zoom: May be my eyes are bad. But I honestly feel, am just expecting unnecessarily too much from such already beautiful component ! Its not allowing me to donate from India, says donations from this country is not supported ! And yes it does appear when I zoom in further to IPv6 section, as you shown in you last screenshot. |
@Mahesha999 the reason why the segments are seemingly invisible is because each has a sunburst-chart/src/sunburst.css Lines 21 to 22 in effb2c4
Now, the color of the segments are applied as polygon fill. And the 1px stroke actually eats into the inner fill space of the segment. So, if a segment ends up having less than 1px of radial width, its representation is completely taken over by the stroke/border itself, which is set as So if you'd like to prevent these segments from "disappearing", and also get rid of the border between segments, I'd suggest to set |
Possibly. Or in the browser implementation of |
I tried on all edge, brave and chrome on Ubuntu 20.04 LTS. And find websites used fonts lists following: |
I have some educational content. In this chapters have section, sections have subsections and subsections have video. All chapters have sections. But sections might not have subsections, but directly have videos. One the other hand some sections or subsections might not have any video at all. Such no-video sections and subsections get size calculated as zero and hense they are not shown in the sunburst diagram.
To fix this, "in input data", I create dummy attribute with
displayVal
with value ofsize
attribute and added 20 seconds to eachsize
value:With this, all sections and subsections get non-zero size and are shown in sunburst diagram. To show original value, I passed
displaySize
totooltipContent
function. During debugging, I realized that "insidetooltipContent
function", for no-video sections / subsection,displaySize
is set to 20, instead of 0. Q1. Why is it so?To compensate this, inside
tooltipContent
function, I did following:Q2. Is there any flag on
Sunburst
component which we can set so that sections with no video or zero length video are still shown with some minimum arc length and tooltip "No video"?Q3. Regardless of any of above, no-video sections / subsections are not show at all in completely zoomed out diagram. No-video subsection is show only when I click its parent section, but not when I am in zoomed-out / chapter view, even I specify
minSliceAngle={0}
. Why is this so?PS: When I added 20 to
displaySize
too in input data, insidetooltipContent
function (during debugging), it shows 40 fordisplaySize
for no-video sections / subsections.The text was updated successfully, but these errors were encountered: