# Blazor Charts (Line, Bar, Pie, Area, Scatter)

URL: https://flexcoreui.com/demo/charts  
Section: Charts  
Controls: ChartControl, ChartSeries, ChartDataPoint  
Keywords: Blazor charts, chart component, line chart, bar chart, pie chart, area chart, scatter chart, sparkline, SVG charts, chart tooltip

Blazor charts drawn as SVG from C#: line, bar, area, pie, donut, scatter, treemap, funnel, heatmap and more, with hover tooltips and no npm.

## Documentation

### Params

| Name | Type | Default | Description |
|---|---|---|---|
| Type | ChartType | ChartType.Bar | Selects the SVG renderer. HorizontalBar, GroupedBar, StackedBar, StackedBar100, Pareto, ComboBarLine and Treemap and Surface (which have no case of their own) all go to the bar renderer, and HorizontalBar still draws vertical bars. Not consulted in legacy mode: with Series null and Bars or DataSource set, the control renders HTML bars whatever Type says. |
| Series | List<ChartSeries>? | null | Data for every SVG type. A non-null value, even an empty list, puts the control in SVG mode and makes it ignore Bars and DataSource; null with neither of those set is SVG mode too, and only KpiCard and the gauge types render without data (everything else shows No data). Most single-series types read only Series[0]; ComboBarLine draws Series[1] as its line and Heatmap uses one series per row. |
| DataSource | System.Collections.IEnumerable? | null | Legacy multi-row mode: when Series is null and Bars is null or empty, each item becomes one HTML row of grouped vertical bars. Needs ValueFields with at least one name, otherwise nothing is resolved and the tile shows No data. Values are read by reflection on each item's runtime type. |
| LabelField | string? | null | Legacy multi-row mode only: property name whose ToString() becomes the row label; null or a missing property gives an empty label. |
| ValueFields | IList<string>? | null | Legacy multi-row mode only: property names read from each DataSource item, in order, one bar per name. Each value goes through Convert.ToDouble; a missing property, null or unconvertible value becomes 0. Bars are scaled against the largest value across all rows. |
| ValueLabels | IList<string>? | null | Legacy multi-row mode only: per-column captions used in each bar's hover tooltip and, while ShowAxisLabels is true, as the bottom axis ticks (the axis is skipped entirely when this is null or empty). Columns beyond the list get an empty tooltip caption. |
| Bars | IList<ChartBar>? | null | Legacy single-series mode: when Series is null and this has at least one entry, each ChartBar becomes one HTML row with a horizontal bar sized as a percentage of the largest value (clamped 0 to 100; a non-positive maximum counts as 1). A non-empty Bars wins over DataSource; an empty list falls through to it. ChartBar.Color overrides BarColor per row. |
| RowType | Type? | null | Declared, but ChartControl never reads it. Legacy mode reflects on each item's runtime type instead. |
| Title | string? | null | Rendered as a fx-chart-title div above the chart in both modes when not empty. Sunburst also uses it as the name of the root node (Total when empty). |
| Width | string? | null | Written as width on the root fx-chart div when not empty; the scoped CSS otherwise makes the root 100% wide. The svg inside is always 100% of that width. |
| Height | string? | "300px" | CSS height of the svg only: every SVG type draws on a fixed viewBox (600×300 for most types; 300×300 for Pie, Donut, Radar and the round gauges; 400×300 Funnel; 200×40 Sparkline) scaled with xMidYMid meet, so a narrow tile shows the drawing centered between blank bands. Not read in legacy HTML bar mode or by KpiCard, and Sunburst hands it to SunburstChartControl, which never reads it. An explicit null selects a per-type fallback (40px Sparkline, 260px gauges, 320px financial, 340px Sankey, 60px per point for Bullet, else 300px). |
| CssClass | string? | null | Appended to the root fx-chart div's class list in both modes. |
| ColorPalette | string[]? | null | Replaces the eight built-in colors that GetSeriesColor and GetPointColor cycle through; ChartSeries.Color and ChartDataPoint.Color still win, and entry 0 also colors the gauge arc. The types with colors of their own read single entries, without cycling, and keep their own color where the palette has no such entry: entry 0 is the bar of RangeBar, RangeColumn and RangeArea, the line of HighLow, the actual bar of Bullet, the source nodes and ribbons of Sankey, and the top of the Heatmap ramp when it is a hex color; entry 1 is the Pareto line, the Bullet target line and the Sankey target nodes. Waterfall, Candlestick and Ohlc color by direction instead (UpColor, DownColor). Not read in legacy mode (see BarColor). |
| UpColor | string? | null | Rising candles and Ohlc bars (close at or above open) and positive Waterfall steps. Unset, a candle has a #22c55e body with a #16a34a wick and outline, and the other two use #16a34a; set, the body, wick and outline all take it. A Waterfall point's Color still wins. |
| DownColor | string? | null | Falling candles and Ohlc bars and negative Waterfall steps. Unset, a candle has a #ef4444 body with a #dc2626 wick and outline, and the other two use #dc2626; set, all of them take it. A Waterfall point's Color still wins. |
| Animate | bool | false | Declared, but ChartControl never reads it; no renderer emits an animation and the only transitions are the fixed CSS ones on the legacy bars. ChartSvg.Markup passes it as false. |
| InnerRadius | double? | null | Donut only: inner radius as a fraction of the outer one, 0.6 when null; the value is not clamped. Pie always uses 0 and no other type reads it. |
| LabelStyle | string? | "min-width:160px;" | Legacy HTML bar mode only: inline style on the row label cell of both the Bars and the DataSource layouts, applied only while ShowLabels is true. The multi-row bottom axis keeps its own fixed 160px spacer in CSS, so a different width here misaligns the axis ticks. Never read by the SVG types. |
| BarColor | string? | "#2563eb" | Legacy HTML bar mode only: fill of every bar, with ChartBar.Color overriding it per row in Bars mode (the multi-row layout has no per-bar override); null falls back to the same blue. Never read by the SVG types, which use ColorPalette. |
| XAxis | ChartAxis? | null | Only XAxis.Title is read, drawn under the plot by the bar family and the line/area family. Min, Max, Format, ShowGridLines and TickCount of the X axis are never read; no type offers an X scale override. |
| YAxis | ChartAxis? | null | Min/Max replace the padded data range in the bar family, the line/area family, Waterfall, BoxPlot and Histogram (a maximum not above the minimum is pushed to minimum + 1); TickCount (5 when unset, the number of labeled grid lines) is honored by the bar and line/area families only; Title is drawn rotated at the left edge by those same two families. Format and ShowGridLines are never read: tick labels always use F0 and the dashed grid is always drawn. |
| Legend | ChartLegend? | null | Legend.Visible (true when the object is null) gates the shared legend that SVG mode appends below the drawing when Series has more than one entry; swatches come from GetSeriesColor. Pie and Donut add their own per-slice legend regardless of this setting. Legend.Position is never read; the legend always sits under the chart. |
| ShowLabels | bool | true | Legacy HTML bar mode only: renders the label cell (styled by LabelStyle) at the start of each Bars row or DataSource row. Never read by the SVG types, which always draw their own category labels. |
| ShowValues | bool | false | Legacy HTML bar mode only: writes each value, formatted with ValueFormat, beside a Bars bar or above a DataSource bar. Never read by the SVG types, whose values live in hover <title> tooltips. |
| ShowAxisLabels | bool | true | Legacy DataSource mode only: renders the bottom axis row of ValueLabels captions, and only when that list has entries. Not read in Bars mode or by any SVG type. |
| ValueFormat | string | "N2" | Format string for the legacy value captions shown by ShowValues (the hover tooltips there always use N2), and for the value text of Gauge, ArcGauge, RadialGauge and LinearGauge through GaugeVisualControl, where this default overrides that control's own 0.##, so a gauge shows two decimals unless you set it. Not read by any other SVG type. |
| ShowTooltips | bool | true | Shows a card when the pointer is over a bar, slice, point, cell, flow or marker, with the label, the series and the value, and the share of the whole for Pie, Donut, Funnel and Pyramid. Off, the shapes keep their native <title> text. Gauges, KPI cards and sparklines have no card. |
| TooltipValueFormat | string? | null | .NET numeric format for the numbers in the default card. Unset, whole numbers print as N0 and the rest as N2. |
| TooltipFormat | string? | null | Text pattern that replaces the card's rows: {series} {label} {category} {title} {value} {value2}…{value5} {percent} {open} {high} {low} {close} {min} {max} {size}; a format after a colon applies to numbers ({value:N0});   starts a new row. |
| TooltipFormatter | Func<ChartTooltipContext, string?>? | null | Code-side text for the card's rows, lines separated by  ; return null to fall back to TooltipFormat or the default rows. |
| TooltipTemplate | RenderFragment<ChartTooltipContext>? | null | Replaces the whole card content; the context is the hovered shape. |
| PointHover | EventCallback<ChartTooltipContext?> |  | Raised with the context when the pointer enters a shape and with null when it leaves the shape or the chart. |
| ReportPlot | ReportAnalysisDefinition? | null | A report's chart definition. When PrintedSummaryPlot supports it (one measure, no series field, a print axis, or summaries as categories) the control draws that plot as a bitmap instead of SVG; otherwise it only lends its RightCategoryLegend to the category-legend scene. |
| CategoryLegend | bool | false | Draws Bar, GroupedBar, StackedBar and StackedBar100 as the classic printed bar scene with a category-key legend, as a bitmap. |
| ThreeDimensional | bool | false | Draws Bar, GroupedBar, StackedBar and StackedBar100 with perspective faces, as a bitmap. |
| ColorBarsByCategory | bool | false | Single-series Bar only: each bar takes its point's color (GetPointColor) instead of the series color. |
| PrintWidthPoints / PrintHeightPoints | double | 0 | Print size in points. Both set, a Bar draws its SVG at that size instead of 600x300, and Line, Surface, Ohlc, HorizontalBar, Area, Pie, Donut, Radar, Funnel, Gauge, Scatter and Bubble render as the printed stage chart bitmap. The category-legend and 3-D scenes use them when set and 600x300 otherwise. |
| PrintReportGroupChart | bool | false | Printed stage chart, Line and Area only: the report group chart's layout (tighter margins, larger value labels, black heading). |

### Tooltip

| Name | Type | Description |
|---|---|---|
| Type | ChartType | The chart type that drew the shape. |
| Series / SeriesIndex | ChartSeries / int | The series the shape belongs to and its position in Series; heatmap rows are series. |
| Point / PointIndex | ChartDataPoint / int | The data point and its position in the series' DataPoints. |
| Title | string | First line of the default card: the category, slice or item label; row / column on a heatmap, source → target on a Sankey. |
| Label | string | The point's label; for scatter and bubble the x value as typed. |
| Value | double | The point's main value; the median for a box plot, the close for a candlestick, the maximum for a range. |
| Color | string | Fill color of the hovered shape, drawn as the swatch. |
| Percentage | double? | Share of the total in percent for Pie, Donut, Funnel and Pyramid; null elsewhere. |
| SeriesName | string? | The series name, or null when it is empty. |
| Fields | IReadOnlyList<ChartTooltipField> | The rows the default card shows, already formatted: ChartTooltipField(Name, Value), for example Open, High, Low and Close for a candlestick or Min, Q1, Median, Q3 and Max for a box plot. |

### Gauge kpi

| Name | Type | Default | Description |
|---|---|---|---|
| GaugeValue | double? | null | Needle or filled-arc value for Gauge, ArcGauge, RadialGauge and LinearGauge; when null the first data point of Series[0] is used, and 0 when there is none. Clamped to the GaugeMin to GaugeMax span when drawn; a non-finite value throws. |
| GaugeMin | double? | null | Lower end of the gauge scale, 0 when null. GaugeVisualControl throws ArgumentException when GaugeMax is not above it. |
| GaugeMax | double? | null | Upper end of the gauge scale, 100 when null. Must be finite and greater than GaugeMin or the gauge throws ArgumentException. |
| GaugeRanges | IReadOnlyList<GaugeRange> | Array.Empty<GaugeRange>() | Colored bands drawn behind the value: arcs on the round gauges, rectangles on the linear one, each with its Label as hover tooltip; endpoints are clamped to the scale and an unordered or non-finite range throws. When at least one range is present the round gauges narrow the value arc from 16 to 7 units so the bands stay visible. |
| GaugePointers | IReadOnlyList<GaugePointer> | Array.Empty<GaugePointer>() | Extra markers besides the value: additional needles from the center on the round gauges, vertical ticks across the bar on the linear one, each in the pointer's Color with Label: Value as tooltip. A non-finite pointer value throws. |
| GaugeCircular | bool | false | Round gauges only: sweeps the scale through 360° instead of 270°, drops the duplicate last tick, moves the value text to the center and, for Type=Gauge, suppresses the needle (RadialGauge keeps it; ArcGauge never has one). Ignored by LinearGauge. |
| GaugeTickCount | int | 5 | Number of equal intervals on the scale; the gauge draws GaugeTickCount + 1 tick marks and labels (one fewer when GaugeCircular), formatted with GaugeLabelFormat. Must be 1 to 100 or GaugeVisualControl throws. |
| GaugeShowValue | bool | true | Shows the current value as text (formatted with ValueFormat) above the linear bar or inside the round gauges; false removes the text only. |
| GaugeLabelFormat | string | "0" | Numeric format for the tick labels along the scale; the value text uses ValueFormat instead. |
| KpiValue | string? | null | KpiCard only: the large headline text; null renders --. No other type reads it. |
| KpiLabel | string? | null | KpiCard only: caption under the value, omitted when empty. |
| KpiTrend | string? | null | KpiCard only: trend line under the label. Text starting with + or containing up (case-insensitive substring) gets the green up class and a ↑ prefix; starting with - or containing down gets the red down class and ↓; anything else prints unstyled. Empty hides the line. |

### Css

| Name | Description |
|---|---|
| fx-chart | The root div in every mode; CssClass is appended here and Width becomes its inline width. Position relative, full width, system font stack, 12px text, color #212529. The scoped rule .fx-chart svg makes the svg ChartControl draws itself display:block; width:100%; the gauge and Sunburst svgs come from child components and are not reached. Inside ChartControl's own svg only the hover shapes carry classes (fx-pt, fx-pt-hit). Leaving the root hides the hover card. |
| fx-chart-title | The Title line above the chart, rendered only when Title is set: 14px, weight 600, #1f2937, 8px below. |
| fx-chart-empty | The No data placeholder: #9ca3af, italic, centered, 24px padding. Shown in Bars mode when neither Bars nor a resolvable DataSource has rows, and in SVG mode when Series is empty for any type except the four gauges and KpiCard. |
| fx-chart-legend | SVG mode only: the wrapping flex row under the drawing, centered, 12px gap, 8px vertical padding. Rendered when Legend.Visible is not false and there are at least two series; Pie and Donut always render one entry per slice whatever Legend says. ChartLegend.Position is not read, so the legend always sits below. |
| fx-chart-legend-item | One legend entry: a flex row with a 4px gap, 12px text, #4b5563. Holds the swatch and a span with the series name (the slice label for Pie and Donut). |
| fx-chart-legend-swatch | The 12px color square, 2px radius; its background is inline: the series color, the ColorPalette entry or the ChartDataPoint.Color the chart used. |
| fx-pt | SVG mode, hover on (ShowTooltips true, the default, or a PointHover delegate): the class on each data point's shape (bar, slice, marker, cell, segment, flow). Hovered: brightness(1.12) saturate(1.08), and paths and polygons (slices, funnel segments, Sankey flows) take stroke-width: 3; the svg's other fx-pt shapes drop to 0.72 opacity. Filter and opacity ease over 0.12s; the stroke change is instant. Not set on gauges, KpiCard, Sparkline, Sunburst, the Bars and DataSource modes, Candlestick, Ohlc and HighLow (they use fx-pt-hit), or charts drawn as a bitmap (CategoryLegend, ThreeDimensional, a supported ReportPlot, or both print sizes set on a type with a printed stage image). |
| fx-pt-hit | Candlestick, Ohlc and HighLow with hover on: a transparent rect over each price slot (80% of its width, high to low, at least 4 units tall) that takes the hover. The candle or bar under it has no class, so it is not highlighted. No CSS rule. |
| fx-chart-tooltip | The hover card: an HTML div with role="status" after the drawing (after the slice legend for Pie and Donut), rendered while the pointer is on a shape and ShowTooltips is true. position: fixed where the pointer entered the shape (inline left/top; it does not follow the pointer within the shape), offset 14px right and down, z-index 1100, pointer-events: none. Background rgba(17, 24, 39, 0.94), white 12px text, 8px radius, 8px 11px padding, shadow, 120 to 280px wide, no wrapping. Holds TooltipTemplate when set, else the title line and rows below. |
| fx-tip-left | Added to fx-chart-tooltip when the shape's anchor point lies in the right 45% of the viewBox: the card opens to the left. The anchor is the top center of a bar, box, cell or candle, the center of a marker or segment, the mid-point of a slice. |
| fx-tip-up | Added to fx-chart-tooltip when the shape's anchor point (see fx-tip-left) lies in the bottom 40% of the viewBox: the card opens above. With fx-tip-left, above and to the left. |
| fx-chart-tooltip-title | Default card only: the first line, the swatch and ChartTooltipContext.Title. Flex row, 8px gap, weight 600, 2px below. TooltipFormat and TooltipFormatter replace the rows, not this line. |
| fx-chart-tooltip-swatch | The 10px color square in the title line, 2px radius; its inline background is the shape's color (ChartTooltipContext.Color). |
| fx-chart-tooltip-row | One row of the default card: the name in a span, left out when empty, and the value in b (weight 600), at the two edges, at least 16px apart. Rows come from the text of TooltipFormatter, or of TooltipFormat when the formatter is unset or returns null, one nameless row per line; otherwise from ChartTooltipContext.Fields. |
| fx-chart-kpi | KpiCard only (HTML, no svg): the centered card, 24px padding. |
| fx-chart-kpi-value | The big number: KpiValue, or -- when it is null. 48px, weight 800, #0d3b66. |
| fx-chart-kpi-label | KpiLabel under the value, rendered only when set: 14px, #6b7280, 4px above. |
| fx-chart-kpi-trend | KpiTrend under the label, rendered only when set: 14px, 8px above. Gets up (#16a34a, prefixed with an up arrow) when the text starts with + or contains up, down (#dc2626, down arrow) when it starts with - or contains down; any other text keeps the inherited color and gets no arrow. |
| fx-chart-rows | Bars mode only: the column of horizontal bars, 4px apart. |
| fx-chart-row | One bar line: label, track and value in a flex row with an 8px gap, at least 22px high. |
| fx-chart-row-label | The label cell, rendered when ShowLabels is true: 11px, #444, right-aligned, clipped with an ellipsis. LabelStyle (default min-width:160px;) is its inline style. |
| fx-chart-row-bar-container | The track that fills the rest of the line, at least 18px high, with a 1px #e5e7eb line at its right edge drawn as a gradient. |
| fx-chart-row-bar | The bar: 14px high, 2px radius, width animated over 0.2s. Its inline width is the value as a percentage of the largest bar and its inline background is ChartBar.Color or BarColor; the title tooltip reads Label: value in N2. |
| fx-chart-row-value | The number after the bar, rendered when ShowValues is true and formatted with ValueFormat: 11px, #555, tabular numerals. |
| fx-chart-multi | DataSource mode only: the column of grouped-bar rows, 6px apart. |
| fx-chart-multi-row | One source row: label and bar group side by side, at least 60px high, 1px #f0f0f0 rule underneath. |
| fx-chart-multi-label | The row label (LabelField), rendered when ShowLabels is true: 11px, #333, vertically centered, ellipsis, full text in its title. LabelStyle is its inline style. |
| fx-chart-multi-bars | The group of vertical bars for the row: bottom-aligned, 3px apart, at least 50px high, 1px #cbd5e1 baseline. |
| fx-chart-bar-cell | One bar column (one per ValueFields entry), equal width, minimum 4px; its title tooltip is the matching ValueLabels entry and the value in N2. |
| fx-chart-bar | The vertical bar: full cell width, 1px top radius, height animated over 0.2s. Inline height is the value as a percentage of the largest value in the whole table and inline background is BarColor; there is no per-bar color in this mode. |
| fx-chart-bar-value | The number above a bar, rendered when ShowValues is true: 9px, #555, tabular numerals, line-height 1. |
| fx-chart-axis | The bottom tick row, rendered when ShowAxisLabels is true and ValueLabels has entries: 10px, #666. |
| fx-chart-axis-label-spacer | The empty cell under the label column. Its width is a fixed 160px, so a LabelStyle with another min-width puts the ticks out of line with the bars. |
| fx-chart-axis-bars | The flex row holding the ticks, spaced like the bar cells (3px gap, space-between). |
| fx-chart-axis-tick | One tick per ValueLabels entry, centered, clipped with an ellipsis. |

### Css vars

| Name | Type | Description |
|---|---|---|
| --fx-zoom | 1 | Multiplies the font size of the HTML text: root 12px, title 14px, legend item 12px, tooltip card 12px, KPI value 48px, KPI label and trend 14px, legacy row label and value 11px, multi-row label 11px, bar value 9px and axis 10px, each written as calc(Npx * var(--fx-zoom, 1)). SVG text is unaffected: its sizes are font-size attributes of 9 to 11 viewBox units (6.5 in the Bar print layout) that scale with the drawing, not with the zoom. Read from the nearest ancestor that publishes it; PageControl does so with ZoomService.ZoomScopeStyle. The Showcase's app.css does not define it, so the charts on this page render at the fallback. |

### Methods

| Name | Type | Description |
|---|---|---|
| ChartSvg.Markup(ChartType type, IReadOnlyList<ChartSeries> series, string? title = null, bool showLegend = true, string? width = "100%", string? height = "300px") | string | A string, so it carries no hover tooltips. Static, in Fx.ControlKit.Charts. Renders a ChartControl with these six parameters on a renderer of its own, disposed before it returns, and returns its HTML, svg included, for callers that cannot host a component. Nothing is shared between calls. Legend is new ChartLegend { Visible = showLegend }, Animate is false and a null title becomes an empty string. The string carries the class names and scope attributes but no stylesheet. |

### Series

| Name | Type | Default | Description |
|---|---|---|---|
| Name | string | "" | The series name. Shown in the legend when the chart has more than one series, in the tooltips of grouped and stacked bars, and as the row label of a Heatmap, where each series is one row (cut at 10 characters). |
| Color | string? | null | Overrides the palette color for this series. Read by the Bar family (bars and the ComboBarLine line), the Line and Area family, Sparkline, Radar, Box Plot, Histogram, the gauge arc and the first group of a Sunburst. Pie, Donut, Funnel, Pyramid, Gantt and Dot Plot color by point and only take it when there are several series; HighLow, the Bullet actual bar, the Range charts and the Sankey source nodes and ribbons take it ahead of ColorPalette entry 0; Waterfall, Candlestick and Ohlc color by direction (UpColor, DownColor) and Heatmap by value, so they ignore it. |
| Type | ChartType | ChartType.Bar | Declared, but never read: the control's own Type parameter decides how every series is drawn. ComboBarLine draws the first series as bars and the second as a line scaled to its own maximum, whatever their Type. |
| DataPoints | List<ChartDataPoint> | new() | The points. The first series supplies the category labels for the Bar and Line families, Radar and the Heatmap columns. Pie, Donut, Sunburst, Funnel, Pyramid, Sparkline, Waterfall, Histogram, Box Plot, Dot Plot, Gantt, Bullet, the financial, Range and Sankey charts and the gauge read the first series only; grouped and stacked bars, the Line family, Scatter, Bubble, Radar and Heatmap read every series. |
| ChartSeries(string name, ChartType type, IEnumerable<ChartDataPoint>? points = null, string? color = null) | ChartSeries |  | Sets Name, Type and Color and copies the points into DataPoints; the parameterless constructor leaves the defaults. |

### Point

| Name | Type | Default | Description |
|---|---|---|---|
| Label | string | "" | The category text. Axis label in the Bar family (cut at 10 characters), the Line family (8, every tenth point when there are many), Radar (8), Waterfall (8), Box Plot (8), Histogram (every eighth), the financial charts (8) and the Range charts (8); slice name in the Pie and Donut tooltip and legend; segment text in Funnel and Pyramid; leaf name in Sunburst; column header in Heatmap (8, from the first series); row label in Gantt (12), Dot Plot (12) and Bullet; source node in Sankey, also readable as Source. Scatter and Bubble parse it as the numeric x value with double.TryParse (invariant culture), so a name puts the point at x = 0. Not read by Sparkline, the gauges or the KPI card. |
| Value | double | 0 | The number every renderer plots: bar height, line y, slice share (absolute value), cell intensity in Heatmap, bar start in Gantt, lower whisker in Box Plot, Open in the financial charts, Actual in Bullet, range start in the Range charts, flow width in Sankey, the delta added to the running total in Waterfall, and the gauge reading when GaugeValue is not set (first point of the first series). StackedBar100 turns it into a share of the column total. |
| IsEmpty | bool | false | Marks a missing reading. The Bar family leaves the slot empty instead of drawing a zero bar and keeps the point out of the axis range; Line breaks the line at the gap, and the whole Line and Area family drops the point from the range. Every other type ignores it and plots Value. |
| Value2 | double? | null | Second number, meaning per type: Bubble size (radius 4 to 24, scaled to the largest Value2; a point without one is radius 5); Box Plot upper whisker; High in Candlestick, Ohlc and HighLow; Target in Bullet; range end in RangeBar, RangeColumn and RangeArea; bar end in Gantt (null means start + 1); the secondary value of a Sunburst leaf, shown in its statistics panel. Where it is required and null the renderer uses Value. Other types ignore it. |
| Value3 | double? | null | Box Plot first quartile (null falls back to Value, the lower whisker); Low in Candlestick, Ohlc and HighLow (null falls back to Value). Not read by any other type. |
| Value4 | double? | null | Box Plot third quartile (null falls back to Value2, the upper whisker); Close in Candlestick and Ohlc (null falls back to Value; a close at or above the open draws green, below it red). Not read by any other type. |
| Value5 | double? | null | Box Plot median (null falls back to the midpoint of the quartiles). Not read by any other type. |
| Color | string? | null | Color of this point. Read directly by a single-series Bar, by Waterfall (replacing the green-for-positive, red-for-negative default) and by the Sunburst leaf, and through GetPointColor by Pie, Donut, Funnel, Pyramid, Gantt and Dot Plot, which otherwise take the series color when there are several series, else the palette by point index. Not read by the Line family, grouped and stacked bars, Scatter, Bubble, Radar, Heatmap, Box Plot, Histogram, the financial, Bullet, Range and Sankey charts. |
| Category | string? | null | Sunburst groups points by it into the inner ring (empty means General); Sankey reads it as the target node, through Destination. Declared for Gantt resources too, but the Gantt renderer never reads it, and Heatmap rows come from the series names, not from here. |
| DateValue | DateTime? | null | Declared, but never read by ChartControl. StockChartControl requires it on every point, sorts by it and uses it to pick the visible range; ChartDataPoint.Financial fills it. |
| ChartDataPoint(string label, double value, string? color = null) | ChartDataPoint |  | Sets Label, Value and Color; the parameterless constructor leaves the defaults. |
| ChartDataPoint.Financial(string label, double open, double high, double low, double close, DateTime? date = null) | ChartDataPoint |  | Open, high, low and close into Value to Value4 and the date into DateValue. The same fields are readable as Open, High, Low and Close, each falling back to Value when null. |
| ChartDataPoint.Bullet(string label, double actual, double target, string? category = null) | ChartDataPoint |  | Actual into Value (alias Actual) and target into Value2 (alias Target); the category goes into Category, which the Bullet renderer never reads. |
| ChartDataPoint.Range(string label, double min, double max, string? color = null) | ChartDataPoint |  | Min into Value, max into Value2, the color into Color. The Range renderers draw it, ahead of the series Color and ColorPalette entry 0. |
| ChartDataPoint.Sankey(string source, string target, double flow, string? color = null) | ChartDataPoint |  | Source into Label (alias Source), target into Category (alias Destination, empty when null), flow into Value; the color paints that flow's ribbon. Each point draws its own source and target node; equal names are not merged. |

### Axis

| Name | Type | Default | Description |
|---|---|---|---|
| Title | string? | null | Axis caption. Drawn by the Bar renderer (Bar, HorizontalBar, GroupedBar, StackedBar, StackedBar100, Pareto, ComboBarLine and any type without a renderer of its own, such as Treemap) and the Line family (Line, MultiLine, Spline, StepLine, Area, StackedArea): YAxis.Title rotated along the left edge, XAxis.Title under the plot. No other renderer draws it. |
| Min | double? | null | Lower end of the value axis, read from YAxis only, by the Bar and Line families, Waterfall, Box Plot and Histogram. Null means 0, or 1.1 times the data minimum when that is negative. Scatter, Bubble, Dot Plot, Gantt, the financial and Range charts scale from the data and ignore it; XAxis.Min is never read. |
| Max | double? | null | Upper end of the value axis, same readers as Min. Null means 1.1 times the data maximum, so a StackedBar100 tops out at 100 of 110 unless Max is set. XAxis.Max is never read. |
| Format | string? | null | Declared, but never read: tick labels are whole numbers everywhere except the financial charts, which print one decimal. |
| ShowGridLines | bool | true | Declared, but never read: the dashed grid lines are always drawn. |
| TickCount | int? | null | Number of tick labels on the value axis, first to last inclusive, read from YAxis by the Bar and Line families only; null means 5. Scatter, Bubble, Waterfall, Box Plot, Dot Plot and Histogram always draw 5; Gantt, the financial and Range charts always draw 4 intervals. |
| AutoSkipLabels | bool | true | Added in 0.2.50. Omits category captions that would overlap; every point is still plotted. Read through ChartAxisLabelLayout by the Bar family's category captions, the Line family's x captions and the financial charts' labels in SVG mode, and by the printed bar, 3-D and stage scenes. |
| MinimumLabelGap | double | 4 | Added in 0.2.50. Smallest gap kept between visible category captions, in SVG units or print points; the printed category scene uses 0.15 of the font size when no axis is given. |

### Legend

| Name | Type | Default | Description |
|---|---|---|---|
| Visible | bool | true | Shows the series legend under the chart. It only appears when there is more than one series, so a single-series chart shows nothing either way; Pie and Donut draw their own slice legend regardless. ChartSvg.Markup and ReportAnalysisControl set it from their own flags. |
| Position | LegendPosition | LegendPosition.Bottom | Declared, but never read: the legend is always a row of swatches under the chart. LegendPosition has Top, Bottom, Left and Right. |

### Bar

| Name | Type | Default | Description |
|---|---|---|---|
| Label | string | "" | Text in the row label cell on the left, shown while ShowLabels is true, and in the bar tooltip. |
| Value | double | 0 | Bar length as a share of the largest Value in the list (a list with no positive value draws empty bars); printed after the bar in ValueFormat when ShowValues is true. |
| Color | string? | null | Background of this bar; null falls back to the BarColor parameter (#2563eb). |
| ChartBar(string label, double value, string? color = null) | ChartBar |  | Sets the three properties. The class is nested in the control, so write ChartControl.ChartBar; a list of them goes to the Bars parameter, which draws the legacy HTML bar list whenever Series is null. |

### Types

| Name | Description |
|---|---|
| Bar | Vertical columns, one per category; several series are drawn side by side as grouped columns. Reads Label as the category text (taken from the first series) and Value; a point's Color is honored only with a single series, and IsEmpty leaves the slot blank. Draws on a 600x300 viewBox with Y ticks from YAxis.TickCount (default 5) and YAxis.Min/Max honored; every category is labeled with no thinning, cut at 10 characters. |
| HorizontalBar | Has no renderer of its own: the type is not in the renderer switch, so it falls to the default branch and draws exactly as Bar, with vertical columns. Same fields, 600x300 viewBox, ticks and 10-character labels as Bar. Not in the gallery. |
| GroupedBar | Side-by-side columns per category, one per series, colored by ChartSeries.Color or the palette; a point's Color is ignored even with one series. Reads Label from the first series and Value from each series; IsEmpty skips that column. Drawn by the bar branch, which already groups any multi-series Bar; 600x300 viewBox, Y ticks from YAxis.TickCount (default 5), every category labeled, cut at 10 characters. |
| StackedBar | Columns stacked per category, one segment per series in the series color. Reads Label from the first series and Value from each; the scale runs from 0 to the largest column total of absolute values, and a negative segment gets zero height. 600x300 viewBox, Y ticks from YAxis.TickCount (default 5), every category labeled, cut at 10 characters. |
| StackedBar100 | As StackedBar, but every segment becomes its percentage of the column total so each column reaches 100. Reads Label and Value per series; the Y axis runs 0 to 110 (the fixed 100 plus the 1.1 padding) unless YAxis.Max is set. 600x300 viewBox, Y ticks from YAxis.TickCount (default 5), labels cut at 10 characters. |
| Surface | Added in 0.2.50 for printed reports: with PrintWidthPoints and PrintHeightPoints set it is drawn by the printed stage chart as a bitmap. In SVG mode it has no case of its own and falls to the default branch, which draws it as Bar. Not in the gallery. |
| Line | Straight segments through evenly spaced points with a 3px marker at each. Reads Label as the X text and Value; X positions come from the point index, not from Label or DateValue; several series draw in the series color; IsEmpty breaks the line (for this type only). 600x300 viewBox, Y ticks from YAxis.TickCount (default 5), YAxis.Min/Max honored. X labels come from the first series and are thinned to every n/10th point from 20 points up, cut at 8 characters. |
| MultiLine | Drawn by the line branch with no handling of its own, so it is Line with several series, which Line already draws. The one difference is that the IsEmpty gap applies to Line only; here empty points are plotted at their Value. Same 600x300 viewBox, ticks and label thinning as Line. Not in the gallery. |
| Spline | A smooth cubic curve through the points (control points at the midpoints), straight when there are fewer than three points, with a marker at each point. Reads Label and Value from one or several series, positioned by point index; IsEmpty points are plotted at their Value. 600x300 viewBox, Y ticks from YAxis.TickCount (default 5), X labels thinned from 20 points up and cut at 8 characters. |
| StepLine | Horizontal-then-vertical steps between consecutive points, with a marker at each point. Reads Label and Value from one or several series, positioned by point index. 600x300 viewBox, Y ticks from YAxis.TickCount (default 5), X labels thinned from 20 points up and cut at 8 characters. Not in the gallery. |
| Area | A Line with the region down to the axis filled at 15 percent opacity, one fill per series. Reads Label and Value, positioned by point index; IsEmpty points are plotted at their Value. 600x300 viewBox, Y ticks from YAxis.TickCount (default 5), X labels thinned from 20 points up and cut at 8 characters. |
| StackedArea | Drawn exactly as Area: each series is filled from its own values down to the axis, so the series overlap and are not stacked. Reads Label and Value per series, positioned by point index. 600x300 viewBox, Y ticks from YAxis.TickCount (default 5), X labels thinned from 20 points up and cut at 8 characters. |
| Sparkline | A single 1.5px polyline with no axes, ticks, labels or markers. Reads Value from the first series only, scaled between that series' own minimum and maximum rather than from zero; Label is unused. Draws on its own 200x40 viewBox at 100 percent width, Height default 40px, in the series color. |
| Pie | Slices clockwise from 12 o'clock, each slice's share taken from the absolute Value over the total. Reads Label and Value from the first series only; colors per point from Color or the palette by point index. 300x300 viewBox; nothing is drawn when the total is zero, no labels are drawn inside the chart, and a legend of every slice is rendered below it regardless of Legend.Visible; the tooltip carries value and percentage. |
| Donut | As Pie with the center cut out at InnerRadius times the radius (default 0.6). Reads Label and Value from the first series; per-point Color or the palette by index. 300x300 viewBox, always-on legend below, no in-chart labels. |
| Treemap | Has no renderer: the name appears nowhere but the enum and a comment in SunburstModels.cs, so it falls to the default branch and draws as Bar. Not in the gallery. |
| Funnel | Trapezoid segments top to bottom in data order, each width proportional to the absolute Value over the maximum (80 percent of the width at most); each segment's bottom edge matches the next segment's width, the last tapers to 20 percent, and all segments share one height. Reads Label and Value from the first series; color per point from Color or the palette. Draws on a 400x300 viewBox with no axes; labels are centered inside each segment in white 11px text and are not cut. |
| Pyramid | The funnel branch with the order reversed and the widths swapped, so segments widen downward and the largest value forms the base. Same inputs as Funnel (first series, Label, absolute Value, per-point Color), 400x300 viewBox, white centered labels. Not in the gallery. |
| Sunburst | Builds a two-level tree and delegates to SunburstChartControl (700x700 viewBox, Height default 360px, drill-down and breadcrumb switched on). Reads the first series: points are grouped by Category (empty becomes General) into inner-ring nodes colored from the palette, and each point becomes a leaf with Label, Value, Value2 as the secondary value (default 0) and Color or a darkened group color; the root is named from Title or Total. The delegate's CenterTitle, MetricName and SecondaryMetricName are not passed through, so the center reads TOTAL CASES and the tooltip says Total Cases and Total Deaths. Not in the gallery. |
| Histogram | Touching columns, one per point: no binning is computed, so each point is a bin the caller has already built. Reads Label and Value from the first series in the series color (a point's Color is ignored); the Y axis runs from 0 to the maximum. 600x300 viewBox, Y ticks fixed at 5; X labels are thinned to every n/8th column from 16 points up and are not cut. |
| BoxPlot | One box with whiskers per point. Reads from the first series: Value = low whisker, Value2 = high whisker (default Value), Value3 = Q1 (default low), Value4 = Q3 (default high), Value5 = median (default the midpoint of Q1 and Q3); the box takes the series color at 30 percent fill, whiskers are a fixed gray, a point's Color is ignored. 600x300 viewBox, Y ticks fixed at 5, YAxis.Min/Max honored, every point labeled, cut at 8 characters. |
| Scatter | A 5px circle per point. Reads Label parsed as the numeric X (invariant culture; text that does not parse becomes 0) and Value as Y, several series in the series color; Value2 and a point's Color are ignored. 600x300 viewBox, both axes scaled to the data extent rather than zero with YAxis ignored, Y ticks fixed at 5, and no X tick labels or axis titles are drawn. |
| Bubble | As Scatter with the radius taken from Value2: 4 plus 20 times Value2 over the largest Value2, or 5 when Value2 is null. Reads Label as the numeric X and Value as Y, several series in the series color at 70 percent opacity. 600x300 viewBox, Y ticks fixed at 5, no X tick labels. |
| Heatmap | A grid of cells: one row per series (the series Name is the row label), one column per Label of the first series, each cell shaded by Value between the data minimum and maximum: from a 10 percent tint of ColorPalette entry 0 to the color itself when that entry is a hex color, otherwise on a fixed white-to-blue ramp. Category, a point's Color and the series colors are not read (each row is a series). 600x300 viewBox with no color scale or legend; every row label is cut at 10 characters and every column label at 8, with no thinning. |
| DotPlot | Horizontal rows, one per point, with a 5px dot at Value on a shared X axis and a thin leader line from the left edge. Reads Label and Value from the first series, color per point from Color or the palette; the X axis spans the data extent, not from zero. 600x300 viewBox, X ticks fixed at 5, every row labeled, cut at 12 characters. Not in the gallery. |
| Radar | A polygon per series on spokes taken from the first series' Labels, over four fixed rings. Reads Label and Value from one or several series in the series color at 20 percent fill; the scale runs from 0 to the maximum over all series. 300x300 viewBox; nothing is drawn with fewer than three spokes, ring values are not printed, and spoke labels are cut at 8 characters. |
| Gauge | A 270-degree arc from the lower left with a needle, or a full ring without a needle when GaugeCircular is set, drawn by GaugeVisualControl. Reads GaugeValue, falling back to the first point's Value of the first series and then 0; GaugeMin/GaugeMax default 0 and 100; GaugeRanges adds colored bands and GaugePointers extra needles; the value color is the series color or the palette. 300x300 viewBox, Height default 260px, tick labels from GaugeTickCount (default 5, allowed 1 to 100) in GaugeLabelFormat, the center value in ValueFormat (default N2). Throws ArgumentException when Max is not above Min or a value is not finite; not gated by the No data message. Not in the gallery: the gauges have their own page, built on the gauge controls. |
| KpiCard | An HTML card rather than SVG: KpiValue (or --) in large type, KpiLabel beneath, and KpiTrend with an up arrow when it starts with + or contains the word up, a down arrow when it starts with - or contains down. Reads no series data at all and ignores Height. Not gated by the No data message. |
| LinearGauge | A horizontal bar gauge drawn by GaugeVisualControl through the same branch as Gauge: a gray track, GaugeRanges as colored bands, a value bar, GaugePointers as vertical ticks, and the value printed above. Reads GaugeValue (falling back to the first point's Value, then 0) between GaugeMin and GaugeMax. Draws on a 320x105 viewBox, Height default 260px, with GaugeTickCount + 1 tick labels. Not in the gallery. |
| ArcGauge | The 270-degree arc (360 when GaugeCircular) with the value shown as a filled sweep and no needle; GaugePointers still draw as needles. Same inputs as Gauge: GaugeValue or the first point's Value, GaugeMin/GaugeMax, GaugeRanges. 300x300 viewBox; the value sweep narrows from 16 to 7 units when ranges are present. Not in the gallery. |
| RadialGauge | The same arc as ArcGauge plus a needle, which is drawn whether or not GaugeCircular is set. Same inputs as Gauge. 300x300 viewBox, Height default 260px. Not in the gallery. |
| Bullet | One horizontal row per point: three fixed gray bands at 60, 85 and 100 percent of the width, a bar for the actual value (dark slate unless a point's Color, the series Color or ColorPalette entry 0 is set) and a target line (red unless ColorPalette entry 1 is set). Reads from the first series Value as actual and Value2 as target (default Value); the scale ends at 1.2 times the largest of the two; Category is not read. Draws on a 600 by max(120, rows x 60) viewBox with rows 50 apart and prints no numbers at all: no ticks, no values, only each row's Label, not cut. Not in the gallery. |
| Candlestick | A wick from high to low and a body from open to close per point, green when close is at or above open and red otherwise, or UpColor and DownColor when set. Reads from the first series Value = open, Value2 = high, Value3 = low, Value4 = close (each defaulting to Value); DateValue, a point's Color and ColorPalette are not read. Draws on a 600x320 viewBox, Height default 320px, Y ticks fixed at 5 with one decimal, the scale from the lowest low to the highest high with no padding, every point labeled, cut at 8 characters. Not in the gallery. |
| Ohlc | A vertical high-low line with a left tick at open and a right tick at close, green or red by direction (UpColor, DownColor), from the financial branch. Same fields as Candlestick: Value open, Value2 high, Value3 low, Value4 close, first series only. 600x320 viewBox, Y ticks fixed at 5, labels cut at 8 characters. Not in the gallery. |
| HighLow | A single 2.5px vertical line per point from Value3 (low) to Value2 (high) in blue, or a point's Color, the series Color or ColorPalette entry 0; open and close are not drawn. Reads the first series. 600x320 viewBox, Y ticks fixed at 5, labels cut at 8 characters. Not in the gallery. |
| RangeBar | A vertical bar per point from Value (minimum) to Value2 (maximum, default Value), at least 3 units tall, at 85 percent opacity in blue, or a point's Color, the series Color or ColorPalette entry 0. Reads the first series; the Y axis spans the data extent, widened by 10 either side when flat. 600x300 viewBox, Y ticks fixed at 5, every point labeled, cut at 8 characters. Despite the name the bars are vertical: the range branch has no horizontal variant. Not in the gallery. |
| RangeColumn | Drawn by the range branch with no check on the type, so it is identical to RangeBar: vertical minimum-to-maximum bars from Value and Value2 of the first series, same colors, 600x300 viewBox, Y ticks fixed at 5, labels cut at 8 characters. Not in the gallery. |
| RangeArea | Also identical to RangeBar: the range branch draws bars for all three range types and has no area or band variant. Same fields, viewBox and limits. Not in the gallery. |
| Sankey | A ribbon per point from a left source node to a right target node, with curved sides, in blues unless colored: source nodes and ribbons take the series Color or ColorPalette entry 0, target nodes entry 1, and a point's Color paints its own ribbon. Reads the first series: Label is the source, Category the destination, Value the flow (ribbon height is the flow's share of 80 percent of the plot height, at least 8 units). Draws on a 650x340 viewBox, Height default 340px, labels not cut. Every flow gets its own source and target node, so a name that appears in several flows is drawn once per flow rather than merged, and the column grows by 10 units per flow without being clamped to the height. Not in the gallery. |
| Gantt | A horizontal bar per task on a numeric timeline with five vertical ticks. Reads the first series: Label as the row label (cut at 12 characters), Value as the start, Value2 as the end (default start + 1), color per point from Color or the palette; DateValue and Category are not read, so dates must be supplied as numbers. 600x300 viewBox; rows are capped at 30 units tall, so a few tasks leave the lower part of the plot empty, and bars are at least 2 units wide. Not in the gallery: the Gantt chart page uses GanttControl. |
| Waterfall | Floating bars that step along a running total, joined by dashed connectors. Reads Label and Value from the first series; every point is added to the running total, so there is no way to mark a point as a subtotal or total bar. Positive steps are green and negative ones red, or UpColor and DownColor; a point's Color wins over both and ColorPalette is not read. 600x300 viewBox, Y ticks fixed at 5, YAxis.Min/Max honored, every point labeled, cut at 8 characters. |
| Pareto | Falls to the bar branch: columns of the first series in data order (not sorted) plus a cumulative-percentage polyline in red (or ColorPalette entry 1 when the palette has one), scaled so that 100 percent is the top of the plot, with no second axis. Reads Label and Value; with more than one series the extra series become grouped columns while the line still follows the first. 600x300 viewBox, Y ticks from YAxis.TickCount (default 5), every category labeled, cut at 10 characters. |
| ComboBarLine | Falls to the bar branch: with two or more series every series is first drawn as grouped columns, then the second series is drawn again as a line with markers in its own color, scaled to its own maximum with no second axis. Reads Label from the first series and Value from each; with a single series only columns appear. 600x300 viewBox, Y ticks from YAxis.TickCount (default 5), labels cut at 10 characters. Not in the gallery. |

## Examples

### Gallery

```razor
@using Fx.ControlKit
@using Fx.ControlKit.Charts
@using Fx.ControlKit.Layout
@using Fx.ControlKit.Navigation

<TabControl @bind-SelectedIndex="_tab" CssClass="site-tabs" Orientation="TabOrientation.Horizontal" Theme="TabTheme.Minimal">
    <TabItem HeaderText="Comparison">
        <h2>Bar Charts</h2>
        <DashboardLayoutControl Columns="2" CellSpacing="@(new double[] { 16, 16 })" CellAspectRatio="0.67">
            <DashboardLayoutPanels>
                <DashboardLayoutPanel Row="0" Column="0" SizeX="1" SizeY="1">
                    <ChartControl Type="ChartType.Bar" ColorPalette="@ChartPalette.Site" Title="Ice cream scoops sold in July, by flavor" Height="226px"
                                  YAxis="@(new ChartAxis { Max = 400 })"
                                  Series="@(new List<ChartSeries> { new() { Name = "Scoops", DataPoints = new() {
                                      new("Vanilla", 310), new("Chocolate", 280), new("Strawberry", 190),
                                      new("Mint", 120), new("Pistachio", 90), new("Lemon", 60) } } })" />
                </DashboardLayoutPanel>
                <DashboardLayoutPanel Row="0" Column="1" SizeX="1" SizeY="1">
                    <ChartControl Type="ChartType.GroupedBar" ColorPalette="@ChartPalette.Site" Title="Loaves and pastries sold, by day" Height="226px"
                                  YAxis="@(new ChartAxis { Max = 400 })" Series="@_groupedBarSeries" />
                </DashboardLayoutPanel>
                <DashboardLayoutPanel Row="1" Column="0" SizeX="1" SizeY="1">
                    <ChartControl Type="ChartType.StackedBar" ColorPalette="@ChartPalette.Site" Title="Items sold per day, loaves plus pastries" Height="226px"
                                  YAxis="@(new ChartAxis { Max = 800 })" Series="@_groupedBarSeries" />
                </DashboardLayoutPanel>
                <DashboardLayoutPanel Row="1" Column="1" SizeX="1" SizeY="1">
                    <ChartControl Type="ChartType.StackedBar100" ColorPalette="@ChartPalette.Site" Title="Share of loaves and pastries, by day" Height="226px"
                                  YAxis="@(new ChartAxis { Max = 100 })" Series="@_groupedBarSeries" />
                </DashboardLayoutPanel>
                <DashboardLayoutPanel Row="2" Column="0" SizeX="1" SizeY="1">
                    <ChartControl Type="ChartType.ComboBarLine" ColorPalette="@ChartPalette.Site" Title="Rooms sold and average rate in $, by month; the rate is drawn as a line too" Height="226px"
                                  Series="@_comboSeries" />
                </DashboardLayoutPanel>
                <DashboardLayoutPanel Row="2" Column="1" SizeX="1" SizeY="1">
                    <ChartControl Type="ChartType.RangeBar" ColorPalette="@ChartPalette.Site" Title="Transfer time from the airport, minutes, by hotel" Height="226px"
                                  Series="@(new List<ChartSeries> { _transferRanges })" />
                </DashboardLayoutPanel>
            </DashboardLayoutPanels>
        </DashboardLayoutControl>
    </TabItem>

    <TabItem HeaderText="Trend">
        <h2>Line &amp; Area Charts</h2>
        <DashboardLayoutControl Columns="2" CellSpacing="@(new double[] { 16, 16 })" CellAspectRatio="0.67">
            <DashboardLayoutPanels>
                <DashboardLayoutPanel Row="0" Column="0" SizeX="1" SizeY="1">
                    <ChartControl Type="ChartType.Line" ColorPalette="@ChartPalette.Site" Title="Sunflower and bean height, cm by week" Height="226px"
                                  YAxis="@(new ChartAxis { Max = 80 })" Series="@_lineSeries" />
                </DashboardLayoutPanel>
                <DashboardLayoutPanel Row="0" Column="1" SizeX="1" SizeY="1">
                    <ChartControl Type="ChartType.Area" ColorPalette="@ChartPalette.Site" Title="Sunflower height, cm by week" Height="226px"
                                  YAxis="@(new ChartAxis { Max = 80 })"
                                  Series="@(new List<ChartSeries> { _lineSeries[0] })" />
                </DashboardLayoutPanel>
                <DashboardLayoutPanel Row="1" Column="0" SizeX="1" SizeY="1">
                    <ChartControl Type="ChartType.Spline" ColorPalette="@ChartPalette.Site" Title="Sunflower height, smoothed" Height="226px"
                                  YAxis="@(new ChartAxis { Max = 80 })"
                                  Series="@(new List<ChartSeries> { _lineSeries[0] })" />
                </DashboardLayoutPanel>
                <DashboardLayoutPanel Row="1" Column="1" SizeX="1" SizeY="1">
                    <ChartControl Type="ChartType.StackedArea" ColorPalette="@ChartPalette.Site" Title="Stacked Area" Height="226px"
                                  Series="@_lineSeries" />
                </DashboardLayoutPanel>
                <DashboardLayoutPanel Row="2" Column="0" SizeX="1" SizeY="1">
                    <ChartControl Type="ChartType.StepLine" ColorPalette="@ChartPalette.Site" Title="Pool heater setting through the day, °C" Height="226px"
                                  YAxis="@(new ChartAxis { Min = 20, Max = 32 })" Series="@(new List<ChartSeries> { _heaterSeries })" />
                </DashboardLayoutPanel>
                <DashboardLayoutPanel Row="2" Column="1" SizeX="1" SizeY="1">
                    <ChartControl Type="ChartType.MultiLine" ColorPalette="@ChartPalette.Site" Title="Bookings per week, three desks" Height="226px"
                                  Series="@_deskSeries" />
                </DashboardLayoutPanel>
                <DashboardLayoutPanel Row="3" Column="0" SizeX="1" SizeY="1">
                    <ChartControl Type="ChartType.RangeArea" ColorPalette="@ChartPalette.Site" Title="Lisbon temperature band, °C, by month" Height="226px"
                                  Series="@(new List<ChartSeries> { _lisbonRanges })" />
                </DashboardLayoutPanel>
                <DashboardLayoutPanel Row="3" Column="1" SizeX="1" SizeY="1">
                    <ChartControl Type="ChartType.HighLow" ColorPalette="@ChartPalette.Site" Title="Daily high and low, one week in Kyoto, °C" Height="226px"
                                  Series="@(new List<ChartSeries> { _kyotoWeek })" />
                </DashboardLayoutPanel>
            </DashboardLayoutPanels>
        </DashboardLayoutControl>
    </TabItem>

    <TabItem HeaderText="Part-to-Whole">
        <h2>Pie, Donut &amp; Funnel</h2>
        <DashboardLayoutControl Columns="2" CellSpacing="@(new double[] { 16, 16 })" CellAspectRatio="0.86">
            <DashboardLayoutPanels>
                <DashboardLayoutPanel Row="0" Column="0" SizeX="1" SizeY="1">
                    <ChartControl Type="ChartType.Pie" Title="Favorite color, 120 people asked" Height="300px"
                                  Series="@(new List<ChartSeries> { _pieSeries })" />
                </DashboardLayoutPanel>
                <DashboardLayoutPanel Row="0" Column="1" SizeX="1" SizeY="1">
                    <ChartControl Type="ChartType.Donut" Title="Favorite color, as a donut" Height="300px"
                                  InnerRadius="0.55"
                                  Series="@(new List<ChartSeries> { _pieSeries })" />
                </DashboardLayoutPanel>
                <DashboardLayoutPanel Row="1" Column="0" SizeX="2" SizeY="1">
                    <ChartControl Type="ChartType.Funnel" ColorPalette="@ChartPalette.Site" Title="Sales funnel, 1,000 visits to 180 won" Height="350px"
                                  Series="@(new List<ChartSeries> { _funnelSeries })" />
                </DashboardLayoutPanel>
                <DashboardLayoutPanel Row="2" Column="0" SizeX="2" SizeY="1">
                    <ChartControl Type="ChartType.Pyramid" ColorPalette="@ChartPalette.Site" Title="Room categories booked, 1,000 stays" Height="350px"
                                  Series="@(new List<ChartSeries> { _roomPyramid })" />
                </DashboardLayoutPanel>
            </DashboardLayoutPanels>
        </DashboardLayoutControl>
    </TabItem>

    <TabItem HeaderText="Distribution">
        <h2>Histogram &amp; Box Plot</h2>
        <DashboardLayoutControl Columns="1" CellSpacing="@(new double[] { 16, 16 })" CellAspectRatio="0.48">
            <DashboardLayoutPanels>
                <DashboardLayoutPanel Row="0" Column="0" SizeX="1" SizeY="1">
                    <ChartControl Type="ChartType.Histogram" ColorPalette="@ChartPalette.Site" Title="Response time of 172 requests, ms" Height="400px"
                                  YAxis="@(new ChartAxis { Max = 60 })" Series="@_histogramSeries" />
                </DashboardLayoutPanel>
                <DashboardLayoutPanel Row="1" Column="0" SizeX="1" SizeY="1">
                    <ChartControl Type="ChartType.BoxPlot" ColorPalette="@ChartPalette.Site" Title="Exam scores by subject, one class" Height="400px"
                                  YAxis="@(new ChartAxis { Max = 100 })" Series="@_boxPlotSeries" />
                </DashboardLayoutPanel>
                <DashboardLayoutPanel Row="2" Column="0" SizeX="1" SizeY="1">
                    <ChartControl Type="ChartType.DotPlot" ColorPalette="@ChartPalette.Site" Title="Complaints per 100 stays, by hotel" Height="400px"
                                  Series="@(new List<ChartSeries> { _complaints })" />
                </DashboardLayoutPanel>
            </DashboardLayoutPanels>
        </DashboardLayoutControl>
    </TabItem>

    <TabItem HeaderText="Correlation">
        <h2>Scatter &amp; Bubble</h2>
        <DashboardLayoutControl Columns="2" CellSpacing="@(new double[] { 16, 16 })" CellAspectRatio="0.67">
            <DashboardLayoutPanels>
                <DashboardLayoutPanel Row="0" Column="0" SizeX="1" SizeY="1">
                    <ChartControl Type="ChartType.Scatter" ColorPalette="@ChartPalette.Site" Title="Study hours against exam score" Height="226px"
                                  Series="@_scatterSeries" />
                </DashboardLayoutPanel>
                <DashboardLayoutPanel Row="0" Column="1" SizeX="1" SizeY="1">
                    <ChartControl Type="ChartType.Bubble" ColorPalette="@ChartPalette.Site" Title="Ad spend against sales, sized by store count" Height="226px"
                                  Series="@_bubbleSeries" />
                </DashboardLayoutPanel>
            </DashboardLayoutPanels>
        </DashboardLayoutControl>
    </TabItem>

    <TabItem HeaderText="Multivariate">
        <h2>Radar / Spider Chart</h2>
        <div class="demo-frame">
            <ChartControl Type="ChartType.Radar" ColorPalette="@ChartPalette.Site" Title="Two developers' self-rated skills" Height="400px"
                          Series="@_radarSeries" />
        </div>
    </TabItem>

    <TabItem HeaderText="KPI cards">
        <h2>Single Value Indicators</h2>
        @* Cards span 2 rows: with CellAspectRatio 0.37 a card tile is about 220px tall. *@
        <DashboardLayoutControl Columns="3" CellSpacing="@(new double[] { 16, 16 })" CellAspectRatio="0.37">
            <DashboardLayoutPanels>
                <DashboardLayoutPanel Row="0" Column="0" SizeX="1" SizeY="2">
                    <ChartControl Type="ChartType.KpiCard" Title="Loans"
                                  KpiValue="2,418" KpiLabel="Books on loan today" KpiTrend="+4.2%" Height="180px" />
                </DashboardLayoutPanel>
                <DashboardLayoutPanel Row="0" Column="1" SizeX="1" SizeY="2">
                    <ChartControl Type="ChartType.KpiCard" Title="Members"
                                  KpiValue="136" KpiLabel="New members this month" KpiTrend="+18" Height="180px" />
                </DashboardLayoutPanel>
                <DashboardLayoutPanel Row="0" Column="2" SizeX="1" SizeY="2">
                    <ChartControl Type="ChartType.KpiCard" Title="Overdue"
                                  KpiValue="3.1%" KpiLabel="Loans overdue" KpiTrend="-0.4%" Height="180px" />
                </DashboardLayoutPanel>
                <DashboardLayoutPanel Row="2" Column="0" SizeX="1" SizeY="2">
                    <ChartControl Type="ChartType.ArcGauge" ColorPalette="@ChartPalette.Site" Title="Occupancy this week, %" GaugeValue="78" GaugeMin="0" GaugeMax="100" Height="180px" />
                </DashboardLayoutPanel>
            </DashboardLayoutPanels>
        </DashboardLayoutControl>
    </TabItem>

    <TabItem HeaderText="Statistical">
        <h2>Waterfall &amp; Pareto</h2>
        <DashboardLayoutControl Columns="1" CellSpacing="@(new double[] { 16, 16 })" CellAspectRatio="0.48">
            <DashboardLayoutPanels>
                <DashboardLayoutPanel Row="0" Column="0" SizeX="1" SizeY="1">
                    <ChartControl Type="ChartType.Waterfall" UpColor="@ChartPalette.Green" DownColor="@ChartPalette.Rose" Title="Revenue to net income, $k" Height="400px"
                                  YAxis="@(new ChartAxis { Max = 600 })" Series="@_waterfallSeries" />
                </DashboardLayoutPanel>
                <DashboardLayoutPanel Row="1" Column="0" SizeX="1" SizeY="1">
                    <ChartControl Type="ChartType.Pareto" ColorPalette="@ChartPalette.Site" Title="Defects by type, 100 logged" Height="400px"
                                  YAxis="@(new ChartAxis { Max = 50, TickCount = 6 })" Series="@_paretoSeries" />
                </DashboardLayoutPanel>
            </DashboardLayoutPanels>
        </DashboardLayoutControl>
    </TabItem>

    <TabItem HeaderText="Heatmap">
        <h2>Heatmap Matrix</h2>
        <div class="demo-frame">
            <ChartControl Type="ChartType.Heatmap" ColorPalette="@ChartPalette.Site" Title="Office coffee machine, cups per hour" Height="400px"
                          Legend="@(new ChartLegend { Visible = false })" Series="@_heatmapSeries" />
        </div>
    </TabItem>

    <TabItem HeaderText="Sparkline">
        <h2>Inline Sparklines</h2>
        <div class="demo-frame">
            <p>Kilometers run each day: <ChartControl Type="ChartType.Sparkline" ColorPalette="@ChartPalette.Site" Width="120px" Height="24px"
                          Series="@(new List<ChartSeries> { new() { DataPoints = new() {
                              new("", 6), new("", 9), new("", 7), new("", 11), new("", 8), new("", 12), new("", 10) } } })" /></p>
            <p>Pages read each day: <ChartControl Type="ChartType.Sparkline" Width="120px" Height="24px"
                          ColorPalette="@(new[] { ChartPalette.Green })"
                          Series="@(new List<ChartSeries> { new() { DataPoints = new() {
                              new("", 5), new("", 12), new("", 8), new("", 20), new("", 18), new("", 25), new("", 30) } } })" /></p>
            <p>Minutes late each morning: <ChartControl Type="ChartType.Sparkline" Width="120px" Height="24px"
                          ColorPalette="@(new[] { ChartPalette.Rose })"
                          Series="@(new List<ChartSeries> { new() { DataPoints = new() {
                              new("", 8), new("", 3), new("", 5), new("", 2), new("", 6), new("", 1), new("", 3) } } })" /></p>
        </div>
    </TabItem>
</TabControl>
```

### Tooltips

```razor
@using Fx.ControlKit.Charts
@using Fx.ControlKit.Layout

<DashboardLayoutControl Columns="3" CellSpacing="@(new double[] { 16, 16 })" CellAspectRatio="1">
    <DashboardLayoutPanels>
        <DashboardLayoutPanel Row="0" Column="0" SizeX="1" SizeY="1">
            <ChartControl Type="ChartType.GroupedBar" ColorPalette="@ChartPalette.Site" Title="Default card" Height="226px" YAxis="@(new ChartAxis { Max = 400 })"
                          Series="@_groupedBarSeries" PointHover="h => _hovered = h" />
        </DashboardLayoutPanel>
        <DashboardLayoutPanel Row="0" Column="1" SizeX="1" SizeY="1">
            <ChartControl Type="ChartType.Donut" Title="TooltipFormat" Height="226px"
                          TooltipFormat="{label}: {value:N0} people&#10;{percent} of 120 asked"
                          Series="@(new List<ChartSeries> { _colorSeries })" PointHover="h => _hovered = h" />
        </DashboardLayoutPanel>
        <DashboardLayoutPanel Row="0" Column="2" SizeX="1" SizeY="1">
            <ChartControl Type="ChartType.Line" ColorPalette="@ChartPalette.Site" Title="TooltipTemplate" Height="226px" Series="@_lineSeries" PointHover="h => _hovered = h">
                <TooltipTemplate Context="t">
                    <div class="tip-week">@t.Label</div>
                    <div>@t.SeriesName: <b>@t.Value cm</b></div>
                    @if (t.PointIndex > 0)
                    {
                        <div class="tip-note">+@(t.Value - t.Series.DataPoints[t.PointIndex - 1].Value) cm since the week before</div>
                    }
                </TooltipTemplate>
            </ChartControl>
        </DashboardLayoutPanel>
    </DashboardLayoutPanels>
</DashboardLayoutControl>
<p class="result">@(_hovered is null ? "PointHover: nothing under the pointer." : $"PointHover: {_hovered.Title}, {_hovered.SeriesName ?? "one series"}, {_hovered.Value}{(_hovered.Percentage is { } s ? $", {s:0.#}% of the whole" : "")}")</p>
```

