Novis\Spreadsheet\Chart::constructor
$chart->constructor(
Kind $kind,
array<Series> $series,
array<Layer> $combined,
?string $title,
?string $xTitle,
?string $yTitle,
Legend $legend,
bool $labels,
): voidMakes a chart from all of its values. You do not usually call new Chart in your program: Chart::column, Chart::line and the other types make the chart and return it.
The properties of a chart are read-only. kind is the type of the chart, and series is the list of its series. combined is the list of the types and series that combinedWith added. title, xTitle, yTitle, legend and labels are the options of the chart.
Good to know: a chart does not change. withSeries and combinedWith return a new chart with one more part, so keep the chart they return.
The examples of Chart::column show how to start a chart, and the examples of withSeries show how to add its data.
Parameters
$kindKindthe type of the chart, such as a column chart$seriesarray<Series>the data of the chart, one entry for eachwithSeriescall$combinedarray<Layer>the types and series thatcombinedWithadded$title?stringthe title of the chart, ornull$xTitle?stringthe title of the horizontal axis, ornull$yTitle?stringthe title of the vertical axis, ornull$legendLegendwhere the legend is, such asLegend::Right, orLegend::Hiddenfor no legend$labelsbooltruewhen the chart shows each value on it
Return value
Returns void.
