RayCraftDocs
v1.0.3 raycraft.dev
On this page

LineChart

Complete

Line chart with several series, optional smoothing and area fill. Click a legend entry to hide or show a series. The chart is drawn as SVG and uses the theme colors; hovering a point shows its value. A hidden table with the same numbers is provided for screen readers.

Example

LineChart control

Parameters

ParameterTypeDescription
AreaboolFills the area under the line.
CategoriesIEnumerable<string>Labels along the horizontal axis.
ClassstringExtra CSS classes added to the root element.
HeightDoubleMaximum height of the grid body, for example 24rem (default 28rem with VirtualScroll).
IntegerTicksbool?Forces whole-number axis steps; by default they are used when every value is whole.
LabelstringVisible label text (charts: accessible name; IconButton: accessible name and tooltip).
SeriesIEnumerable<ChartSeries>Data series: ChartSeries(name, values).
ShowDataLabelsboolWrites the value on each mark (bars, line points, pie slices).
ShowExportboolAdds buttons that save the chart as a PNG or SVG image.
ShowGridboolDraws horizontal grid lines.
ShowLegendboolShows the clickable legend.
SmoothboolDraws curved lines instead of straight segments.
StylestringInline style added to the root element.
TrendChartTrendNone, Linear or MovingAverage line for every shown series.
TrendPeriodintNumber of values averaged by the moving average (default 3).
ValueFormatstringNumber format for axis and tooltips, e.g. N0 or P1.
WidthDoubleSkeleton: any CSS length. Charts: drawing width in SVG units (the chart still scales to its container).
ZeroBasedboolAlways includes zero on the value axis.
ZoomableboolAdds zoom and pan buttons; the chart shows a window of the categories.

Package

LineChart is part of RayCraft Complete. Package: RayCraft.Blazor.Complete. It comes from the private RayCraft feed and needs an active license. See Getting started.