MSparkline class
A line chart of a bound numeric series — the "how has this moved" glance a price, step count, or temperature widget is built around.
The bound value is a list of numbers pushed with
MosaicBridge.saveList('key', [1, 2, 3]). Values are normalised across the
series, so only the shape matters, not the absolute range.
Rendering differs by necessity: SwiftUI draws a real Path, while
RemoteViews cannot draw vectors at all — the Android provider rasterises the
series to a bitmap at update time and sets it on an ImageView. Both give
the same picture; only the Android one is resolution-fixed.
Fewer than two points renders nothing, since a line needs two ends.
Constructors
Properties
- bind → MBind
-
Bound key holding the list of numbers.
final
- color → MColor?
-
Stroke colour. Bound colours are not supported here — the Android bitmap
is rasterised with a fixed paint.
final
- fill → bool
-
Translucent fill under the line.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- height → double?
-
Fixed height; without it the chart fills the space it is given.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- strokeWidth → double
-
Stroke width in logical pixels.
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> -
override
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited