ChartData constructor
ChartData({})
Default constructor only assumes dataRows are set,
and assigns default values of dataRowsLegends, dataRowsColors
, xUserLabels, yUserLabels.
Implementation
ChartData({
required this.dataRows,
required this.xUserLabels,
required this.dataRowsLegends,
required this.chartOptions,
this.yUserLabels,
dataRowsColors,
}) :
// Initializing of non-nullable dataRowsColors which is a non-required argument
// must be in the initializer list by a non-member function (member methods only in constructor)
dataRowsColors = dataRowsColors ?? dataRowsDefaultColors(dataRows.length) {
validate();
}