MBarChart class

A bar chart of a bound numeric series — step counts, weekly totals, hourly rainfall: the "how much per bucket" glance.

The bound value is a list of numbers pushed with MosaicBridge.saveList('key', [1, 2, 3]).

Unlike MSparkline, bars are scaled from zero, not from the series minimum: a bar's length is read as its magnitude, so starting the axis at the smallest value would overstate small differences. A series with no positive value therefore renders empty.

Rendering matches MSparkline: SwiftUI draws real shapes, while the Android provider rasterises to a bitmap because RemoteViews cannot draw vectors.

Inheritance

Constructors

MBarChart({required MBind bind, MColor? color, double spacing = 3, double radius = 2, double? height})
const

Properties

bind MBind
Bound key holding the list of numbers.
final
color MColor?
Bar colour. A literal, for the same reason as MSparkline.color.
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
radius double
Corner radius on each bar.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
spacing double
Gap between bars, 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