Open hski-github opened 3 years ago
If values are very small also overlapping can occur and should be prevented.
If text labels are getting long, as a standard in Spotfire the text is truncated and three dots added. "United States of America" would be then depending on the available witdth "United States of Am...".
In CSS this can be done with setting max-width: 100px; and text-overflow: ellipsis; for the three dots ..., but not sure how this works in SVG test. const ELLIPSIS = '\u2026';
Beside avoiding overlap of labels also the color of the label could be set depending on the background like it is done in bar charts in Spotfire with white or black font-color.
Another example of misplaced label from #18
Any help here Holger? I'm still having this issue and in this case I don't see any reason of this because labels are extremely shorts.
I have done a little change regarding rendering of labels. It does not solve the general issue of overlapping labels, but might solve your special problem here. Please check out latest version from main.
Fantastic. Now it's perfect for this issue from my side. Thanks a lot. Now I am missing only the row tooltip formatting stuff (0 decimal digit and not 2 as is now).
Maybe small bars should not get a label e.g. if bar height is below 1em. You would be able to see the label with tooltip.
In case of limited windows size or in case of long category labels, then the labels in the Sankey diagram can overlap.