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

Zooming on heatseries causes Data Labels to appear off the edge #1109

Closed
joshbevans opened this issue Jul 13, 2023 · 1 comment
Closed

Zooming on heatseries causes Data Labels to appear off the edge #1109

joshbevans opened this issue Jul 13, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@joshbevans
Copy link

joshbevans commented Jul 13, 2023

When having a heat series with data labels, zooming in will cause the data labels to appear off the side of the graph, overlapping with the axis. The colour boxes disappear but the overlayed text does not.

Code im using to create the heat series:
HeatSeries.Add( new HeatSeries
{
HeatMap = new[]
{
SKColors.Transparent.AsLvcColor(), // the first element is the "coldest
SKColors.LightGreen.AsLvcColor(),
new SKColor(245, 208, 98).AsLvcColor(),
SKColors.LightCoral.AsLvcColor() // the last element is the "hottest"
},
Values = timeSheetData,
DataLabelsFormatter = (point) => point.TertiaryValue.ToString().TrimStart('0'),
DataLabelsPosition = LiveChartsCore.Measure.DataLabelsPosition.Middle,
DataLabelsSize = 12,
DataLabelsPaint = new SolidColorPaint(SKColors.Black),
ColorStops = new[]
{
0,
0.0000001,
0.5,
1
}
});

XAML:
<lvc:CartesianChart
Grid.Row="1"
Series="{Binding HeatSeries}"
XAxes="{Binding HeatXAxis}"
YAxes="{Binding HeatYAxis}"
ZoomMode="Both" />

Screenshot of issue: https://imgur.com/a/SVqqPgY
As you can see the numbers appearing on the left side of the axis labels, happens on all axis regardless of position

Using LiveChartsCore.SkiaSharpView.WPF 2.0.0-beta.810

@beto-rodriguez beto-rodriguez added the bug Something isn't working label Jul 16, 2023
@beto-rodriguez
Copy link
Owner

Thanks for the report, the referenced commit fixes this and will be included in the next version of the library.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants