Skip to content

Commit

Permalink
Fix issues with fill and stroke miniatures
Browse files Browse the repository at this point in the history
  • Loading branch information
beto-rodriguez committed Dec 12, 2024
1 parent 664cd60 commit ba982ec
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/LiveChartsCore/CoreLineSeries.cs
Original file line number Diff line number Diff line change
Expand Up @@ -644,7 +644,7 @@ public override IDrawnElement GetMiniatureGeometry(ChartPoint? point)
protected override Paint? GetMiniatureFill(ChartPoint? point, int zIndex)
{
var p = point is null ? null : ConvertToTypedChartPoint(point);
var paint = p?.Visual?.Fill ?? GeometryFill;
var paint = p?.Visual?.Fill ?? GeometryFill ?? Fill;

return GetMiniaturePaint(paint, zIndex);
}
Expand All @@ -653,7 +653,7 @@ public override IDrawnElement GetMiniatureGeometry(ChartPoint? point)
protected override Paint? GetMiniatureStroke(ChartPoint? point, int zIndex)
{
var p = point is null ? null : ConvertToTypedChartPoint(point);
var paint = p?.Visual?.Fill ?? GeometryStroke;
var paint = p?.Visual?.Stroke ?? GeometryStroke ?? Stroke;

return GetMiniaturePaint(paint, zIndex);
}
Expand Down
4 changes: 2 additions & 2 deletions src/LiveChartsCore/CorePolarLineSeries.cs
Original file line number Diff line number Diff line change
Expand Up @@ -959,7 +959,7 @@ protected virtual LvcPoint GetLabelPolarPosition(
protected virtual Paint? GetMiniatureFill(ChartPoint? point, int zIndex)
{
var p = point is null ? null : ConvertToTypedChartPoint(point);
var paint = p?.Visual?.Fill ?? GeometryFill;
var paint = p?.Visual?.Fill ?? GeometryFill ?? Fill;

return GetMiniaturePaint(paint, zIndex);
}
Expand All @@ -973,7 +973,7 @@ protected virtual LvcPoint GetLabelPolarPosition(
protected virtual Paint? GetMiniatureStroke(ChartPoint? point, int zIndex)
{
var p = point is null ? null : ConvertToTypedChartPoint(point);
var paint = p?.Visual?.Stroke ?? GeometryStroke;
var paint = p?.Visual?.Stroke ?? GeometryStroke ?? Stroke;

return GetMiniaturePaint(paint, zIndex);
}
Expand Down
4 changes: 2 additions & 2 deletions src/LiveChartsCore/CoreStepLineSeries.cs
Original file line number Diff line number Diff line change
Expand Up @@ -553,7 +553,7 @@ public override IDrawnElement GetMiniatureGeometry(ChartPoint? point)
protected override Paint? GetMiniatureFill(ChartPoint? point, int zIndex)
{
var p = point is null ? null : ConvertToTypedChartPoint(point);
var paint = p?.Visual?.Fill ?? GeometryFill;
var paint = p?.Visual?.Fill ?? GeometryFill ?? Fill;

return GetMiniaturePaint(paint, zIndex);
}
Expand All @@ -562,7 +562,7 @@ public override IDrawnElement GetMiniatureGeometry(ChartPoint? point)
protected override Paint? GetMiniatureStroke(ChartPoint? point, int zIndex)
{
var p = point is null ? null : ConvertToTypedChartPoint(point);
var paint = p?.Visual?.Fill ?? GeometryStroke;
var paint = p?.Visual?.Stroke ?? GeometryStroke ?? Stroke;

return GetMiniaturePaint(paint, zIndex);
}
Expand Down

0 comments on commit ba982ec

Please sign in to comment.