winforms-datavisualization icon indicating copy to clipboard operation
winforms-datavisualization copied to clipboard

Last Annotation missing when stack bars add up to slightly more than 100%

Open HakanL opened this issue 10 months ago • 0 comments

I have a project where we have a chart using StackBar and a fixed-size PlotArea. I noticed that if the bars are over 100 then the last annotate that is bound to a DataPoint disappears. But the bar is displayed fine, it's just the annotation that is gone. Since there are several dependencies to reproduce this I've put it into a repo to show the issue. If you go into the series and just change one of the data points so the total is under 100 then the 3rd annotate shows up, but the example as-is shows the issue. I assume it's an issue in the method IsAnchorVisible where it checks if the anchor is inside the plot rectangle, but I'm not sure what the proper fix is. I've worked around the issue by just re-calculating the last data point if the total is >100, but it's a hack. Nuget package version: 1.9.2

Repo: https://github.com/HakanL/datavis-issue

HakanL avatar Apr 26 '24 05:04 HakanL