ChartValue
Namespace: Wisej.Web.Ext.ChartJS4.Models
Assembly: Wisej.Web.Ext.ChartJS4 (4.1.0.0)
Provides special Chart.js data point sentinel values for use in dataset Data arrays.
- C#
- VB.NET
public static class ChartValue
Public Class ChartValue
JSON has no representation for NaN, so the sentinel values are serialized as special strings that the client-side script converts back to the corresponding JavaScript value before passing the data to Chart.js.
Example:
chart.DataSets.Add(new LineDataSet
{
Label = "Readings",
Data = new object[] { 10, 12, ChartValue.NaN, 15, 11 }
});
Fields
| Name | Type | Description | Value |
|---|---|---|---|
| NaN | ChartNaN | Represents a skipped (NaN) data point. When used in a dataset's Data array, it serializes to JavaScript NaN, causing Chart.js to mark the point as skipped (ctx.p0.skip / ctx.p1.skip = true). This enables per-segment styling via the segment dataset option. |