MarkerImage class
A marker that draws a drawable at the highlighted value. The chart sets chartView when the marker is assigned to it.
Kotlin's MarkerImage(context, drawableResourceId) loads a drawable resource; here the ChartDrawable is passed
in (load images with Flutter and wrap them in an ImageDrawable).
- Implemented types
Constructors
- MarkerImage(ChartDrawable drawable)
-
Creates a marker that draws
drawable.
Properties
-
chartView
↔ Chart<
ChartData< ?IDataSet< >Entry> > -
The chart this marker is assigned to, held weakly, or null before it is assigned or after the chart was
collected. Only its
widthandheightare read.getter/setter pair - hashCode → int
-
The hash code for this object.
no setterinherited
- offset ↔ MPPointF
-
Offset in px from the highlighted point to the top left corner of the drawable. Default (0, 0).
getter/setter pairoverride-getter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- size ↔ FSize
-
Size of the drawable in px; a width or height of 0 uses the drawable's intrinsic size. Default (0, 0).
getter/setter pair
Methods
-
draw(
Canvas canvas, double posX, double posY) → void -
Draws the drawable at size, translated by getOffsetForDrawingAtPoint.
override
-
getOffsetForDrawingAtPoint(
double posX, double posY) → MPPointF -
Returns offset, shifted where needed so the drawable stays inside the bounds of chartView.
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
refreshContent(
Entry e, Highlight highlight) → void -
Does nothing; the image has no content to update.
override
-
setOffset(
double offsetX, double offsetY) → void -
Sets offset to
offsetX/offsetYin px. -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited