Blazorise Specifications: Charts

Learn how chart lifecycle, updates, and plugins behave.

Update Lifecycle

The chart tracks a dirty flag and redraws when it is marked dirty. Methods like AddLabels, AddData, SetData, and AddDataSet mark the chart dirty so it can update on the next render or after calling Update. Directly mutating Data or Datasets does not mark the chart dirty.

Options and Resize

SetOptions and SetOptionsObject update chart options but should be followed by Update to apply the changes. If the options change the aspect ratio, call Resize after Update.

OptionsObject is a fallback for cases where strongly typed options do not cover a Chart.js setting. When provided (and OptionsJsonString is not set), it replaces the typed options payload sent to the chart.

Plugins

Chart plugins must be nested inside a chart component. They initialize after the chart is ready and reinitialize when their parameters change.

Dataset Limits

Chart helper methods enforce licensing limits on dataset size. Data points beyond the limit are ignored when adding or setting data.

On this page