Bugs and improvements for the SunburstChart
jkrude opened this issue · 2 comments
jkrude commented
Bug in SunburstChart:
Occurs if there is only one node in the first-level (below root) whose value is != 0.
Effect: Segment missing (if interactive). Segment to big(if not interactive and no further child nodes != 0)
Currently, whole circles cannot be drawn because (in this instance) x2 and x3 are equal in createSegment
. I guess this happens because startAngleRad == 0
and endAngleRad == 2pi
, but sin(0) = 0 ==sin(2pi)
Further improvements:
- only redraw on
TreeNodeEvents
if the type is notSELECTED
- currently the chart is drawn 9 times for the default example, because after every attribute change an event-handler is triggered. This could be avoided by some extra code in the builder class
- register listener for the node values and redraw on change
-
- something like:
tree.stream().forEach(tTreeNode -> tTreeNode.getItem().valueProperty().addListener((observable -> redraw())));
- something like:
- let users decide what tooltip to display on segments
jkrude commented
I am happy implementing some of those changes, but would like to hear your opinion first (on how and what)
HanSolo commented
Because I myself don't use the charts but only created them for the fun of it, feel free to submit merge requests if you think it really makes sense also for others. No problem at all... :)