Skip to content

Commit bb2f9f0

Browse files
committed
refactor(renderer): remove dead default branch in chart DrawSeries
1 parent 18ad84e commit bb2f9f0

1 file changed

Lines changed: 3 additions & 13 deletions

File tree

src/FlexRender.Skia.Render/Rendering/ChartRenderer.cs

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -133,8 +133,8 @@ private static void DrawNoData(SKCanvas canvas, ChartTheme theme, float width, f
133133
}
134134

135135
/// <summary>
136-
/// Draws series geometry by chart type. Bar charts render grid, axes, and columns; other
137-
/// chart types fall through to a faint plot border until added in later tasks.
136+
/// Draws series geometry by chart type. Every <see cref="ChartType"/> has a dedicated drawing
137+
/// routine (bars, line/area, pie/donut, sparkline, scatter/bubble, gauge/progress, heatmap, radar).
138138
/// </summary>
139139
private static void DrawSeries(
140140
SKCanvas canvas,
@@ -184,17 +184,7 @@ private static void DrawSeries(
184184
DrawRadar(canvas, chart, theme, width, height, typeface, antialias);
185185
break;
186186
default:
187-
// Other chart types are added in later tasks.
188-
using (var border = new SKPaint
189-
{
190-
Color = ColorParser.Parse(theme.AxisColor),
191-
Style = SKPaintStyle.Stroke,
192-
StrokeWidth = 1f,
193-
IsAntialias = antialias
194-
})
195-
{
196-
canvas.DrawRect(0.5f, 0.5f, width - 1f, height - 1f, border);
197-
}
187+
// Enum-exhaustiveness guard: all defined ChartType members have explicit cases above.
198188
break;
199189
}
200190
}

0 commit comments

Comments
 (0)