Type AreaChart

type AreaChart struct {
	Series []ChartSeries
	X      []float32
	Values [][]float32

	Curve ChartCurve
	// Stack selects how the series combine at one X. Stacked series must not be
	// negative: a negative value stacks as zero (its tooltip still shows it).
	Stack ChartStack
	Fill  ChartFill
	// Dots marks every data point, as the dotted line chart does.
	Dots bool
	// StrokeWidth is the line width in logical pixels. Zero is 2.
	StrokeWidth float32

	XAxis, YAxis ChartAxis
	Grid         ChartGrid
	Legend       ChartLegendPosition

	// Tooltip configures the hover tooltip; its Label is replaced by the X label
	// of the hovered point and a zero Layer is 4.
	Tooltip     ChartTooltipOptions
	HideTooltip bool
	// ValueFormat writes a tooltip value. Nil writes the shortest exact decimal.
	ValueFormat func(dst []byte, v float32) []byte

	// Label names the plot for assistive technology.
	Label string
	// Version identifies the data and its formatting. Bump it when either
	// changes: the chart caches axis labels and tooltip text per version.
	Version uint32
}

AreaChart is the data and presentation of an area or line chart. It is a value the caller fills each paint from its own typed slices: there is no reflection, no map of fields and no retained copy of the data.

Series carries the metadata the legend and the tooltip share; Values[k] holds the Y values of Series[k], one per X, NaN marking a gap. X is the shared, ascending X value of every point; nil spaces the points evenly and uses the point index as the X value, the usual category axis whose labels Format names.