paintBackground method
void
paintBackground(
- Context context
)
override
Implementation
@override
void paintBackground(Context context) {
if (data.isEmpty) {
return;
}
final grid = Chart.of(context).grid;
if (drawSurface) {
_drawSurface(context, grid);
if (surfaceOpacity != 1) {
context.canvas
..saveContext()
..setGraphicState(
PdfGraphicState(opacity: surfaceOpacity),
);
}
context.canvas
..setFillColor(surfaceColor ?? color)
..fillPath();
if (surfaceOpacity != 1) {
context.canvas.restoreContext();
}
}
}