buildContext method
ChartContext
buildContext(
- Size size, {
- double animationValue = 1.0,
- ChartHitResult? hoveredHit,
- ChartHitResult? selectedHit,
- Offset? crosshairPosition,
Implementation
ChartContext buildContext(
Size size, {
double animationValue = 1.0,
ChartHitResult? hoveredHit,
ChartHitResult? selectedHit,
Offset? crosshairPosition,
}) {
final bounds = ChartBounds.fromSize(size, margins: _plotMargins());
final viewport = _resolveViewport();
return ChartContext(
config: config,
theme: theme,
bounds: bounds,
viewport: viewport,
transformer: CoordinateTransformer(viewport: viewport, bounds: bounds),
paintCache: _paintCache,
animationValue: animationValue,
hoveredHit: hoveredHit,
selectedHit: selectedHit,
crosshairPosition: crosshairPosition,
zoomPan: zoomPan,
);
}