ChartView class

The immutable coordinate snapshot every layer of a chart shares for one frame.

Pixel coordinates are local to the plot area: (0, 0) is its top-left corner. Anything outside Offset.zero & size is in a gutter.

Annotations

Constructors

ChartView({required Size size, required Rect chartRect, required Map<Object, ChartScaleView> scales})
Creates a view. Normally only the chart does this.
const

Properties

chartRect → Rect
The whole chart, gutters included, in plot-local coordinates.
final
hashCode → int
The hash code for this object.
no setteroverride
plotRect → Rect
The plot area in its own coordinates.
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
scales → Map<Object, ChartScaleView>
All scales of the chart by id.
final
size → Size
Size of the plot area.
final
x → ChartScaleView
The default horizontal scale.
no setter
y → ChartScaleView
The default vertical scale.
no setter

Methods

chartToPlot(Offset chartPosition) → Offset
Converts a position local to the whole chart into plot-local coordinates.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
scale(Object id) → ChartScaleView
The scale registered under id.
toPixel(double x, double y, {Object xScale = kChartX, Object yScale = kChartY}) → Offset
The plot-local position of the data point (x, y).
toRect(double x1, double y1, double x2, double y2, {Object xScale = kChartX, Object yScale = kChartY}) → Rect
The plot-local rectangle covering a data-space rectangle.
toString() → String
A string representation of this object.
override
toValue(Offset position, {Object xScale = kChartX, Object yScale = kChartY}) → ({double x, double y})
The data point under a plot-local position.

Operators

operator ==(Object other) → bool
The equality operator.
override