TinyColumnChart constructor
TinyColumnChart({})
Creates a TinyColumnChart from a Iterable of double.
dataPoints will be converted and saved into TinyLineChart.dataPoints
as a Vector2
list.
See also:
= TinyColumnChart.fromDataVectors to build a column chart based on a
list of Vector2
.
Implementation
factory TinyColumnChart({
Key? key,
required Iterable<double> data,
TinyColumnChartOptions? options,
double? width,
double? height,
}) {
return TinyColumnChart.fromDataVectors(
key: key,
dataPoints: <Vector2>[
for (var index = 0; index < data.length; index++)
Vector2(index.toDouble(), data.elementAt(index))
],
options: options,
width: width,
height: height,
);
}