HtmlForgeX

API Reference

Class

ChartJs

Namespace HtmlForgeX
Assembly HtmlForgeX
Base Element

Helper for building simple Chart.js charts.

Inheritance

Constructors

public ChartJs() #

Initializes a new instance of the ChartJs class.

Methods

public ChartJs AddArea(String label, Double value) #
Returns: ChartJs

Adds a point to the primary dataset and switches the chart to the area style.

Parameters

label System.String requiredposition: 0
Label for the point.
value System.Double requiredposition: 1
Value plotted for the area chart.

Returns

The current ChartJs instance.

public ChartJs AddBar(String label, Double value) #
Returns: ChartJs

Adds a bar value using the simplified API and switches the chart to the bar type.

Parameters

label System.String requiredposition: 0
Label for the bar.
value System.Double requiredposition: 1
Height of the bar.

Returns

The current ChartJs instance.

public ChartJs AddBubble(Double x, Double y, Double radius) #
Returns: ChartJs

Adds a bubble point for bubble charts.

Parameters

x System.Double requiredposition: 0
y System.Double requiredposition: 1
radius System.Double requiredposition: 2
public ChartJs AddColumn(String label, Double value) #
Returns: ChartJs

Adds a column value; an alias for Double) kept for readability.

Parameters

label System.String requiredposition: 0
Label for the column.
value System.Double requiredposition: 1
Height of the column.

Returns

The current ChartJs instance.

public ChartJs AddData(String label, Double value) #
Returns: ChartJs

Adds a numeric data point with an associated label.

Parameters

label System.String requiredposition: 0
Label for the value.
value System.Double requiredposition: 1
Numeric value.

Returns

The current ChartJs instance.

AddDataset 5 overloads
public ChartJs AddDataset(String label, RGBColor color, params Double[] values) #
Returns: ChartJs

Adds a dataset with custom colors.

Parameters

label System.String requiredposition: 0
Dataset label.
color System.String requiredposition: 1
Color for the dataset.
values System.Double[] requiredposition: 2
Data values.

Returns

The current ChartJs instance.

AddDataset(System.String label, HtmlForgeX.RGBColor color, System.Double[] values) #

Adds a dataset with a custom RGBColor.

Parameters

label System.String required
Dataset label.
color HtmlForgeX.RGBColor required
RGB color value.
values System.Double[] required
Data values.

Returns

The current ChartJs instance.

public ChartJs AddDataset(String label, Object color, params Double[] values) #
Returns: ChartJs

Adds a dataset with a color specified as RGBColor or string.

Parameters

label System.String requiredposition: 0
Dataset label.
color System.Object requiredposition: 1
Color value.
values System.Double[] requiredposition: 2
Data values.

Returns

The current ChartJs instance.

public ChartJs AddDataset(Action<ChartJsDataset> configure) #
Returns: ChartJs

Adds a dataset configured via delegate.

Parameters

configure System.Action{HtmlForgeX.ChartJsDataset} requiredposition: 0
Action configuring the dataset.

Returns

The current ChartJs instance.

public ChartJs AddDataset(String label, params Double[] values) #
Returns: ChartJs

Adds a simple dataset with values.

Parameters

label System.String requiredposition: 0
Dataset label.
values System.Double[] requiredposition: 1
Data values.

Returns

The current ChartJs instance.

AddDonut 3 overloads
public ChartJs AddDonut(String label, Double value) #
Returns: ChartJs

Apex-like convenience for doughnut charts; adds a labeled slice (and optional color).

Parameters

label System.String requiredposition: 0
value System.Double requiredposition: 1
public ChartJs AddDonut(String label, Double value, RGBColor color) #
Returns: ChartJs

Apex-like convenience for doughnut charts with per-slice color.

Parameters

label System.String requiredposition: 0
value System.Double requiredposition: 1
color System.String requiredposition: 2
AddDonut(System.String label, System.Double value, HtmlForgeX.RGBColor color) #

Apex-like convenience for doughnut charts with per-slice RGB color.

Parameters

label System.String required
value System.Double required
color HtmlForgeX.RGBColor required
public ChartJs AddGaugeV3Dataset(String label, IEnumerable<Double> stops, Double value, Action<ChartJsGaugeV3DatasetOptions> configure = null) #
Returns: ChartJs

Adds a gauge-v3 dataset (for layered gauges like clocks) with strongly-typed options.

Parameters

label System.String requiredposition: 0
stops System.Collections.Generic.IEnumerable{System.Double} requiredposition: 1
value System.Double requiredposition: 2
configure System.Action{HtmlForgeX.ChartJsGaugeV3DatasetOptions} = null optionalposition: 3
public ChartJs AddLabel(String label) #
Returns: ChartJs

Adds a label to the chart.

Parameters

label System.String requiredposition: 0
Label to add.

Returns

The current ChartJs instance.

public ChartJs AddLabels(params String[] labels) #
Returns: ChartJs

Adds multiple labels to the chart.

Parameters

labels System.String[] requiredposition: 0
Labels to add.

Returns

The current ChartJs instance.

public ChartJs AddLine(String label, Double value) #
Returns: ChartJs

Adds a point to the primary dataset and switches the chart to the line type.

Parameters

label System.String requiredposition: 0
Label for the point.
value System.Double requiredposition: 1
Value plotted on the line.

Returns

The current ChartJs instance.

AddPie 3 overloads
public ChartJs AddPie(String label, Double value) #
Returns: ChartJs

Adds a data point to the current pie chart configuration.

Parameters

label System.String requiredposition: 0
Label for the slice.
value System.Double requiredposition: 1
Numeric value represented by the slice.

Returns

The current ChartJs instance.

public ChartJs AddPie(String label, Double value, RGBColor color) #
Returns: ChartJs

Adds a colored slice to the current pie chart configuration.

Parameters

label System.String requiredposition: 0
Label for the slice.
value System.Double requiredposition: 1
Numeric value represented by the slice.
color System.String requiredposition: 2
CSS color applied to the slice.

Returns

The current ChartJs instance.

AddPie(System.String label, System.Double value, HtmlForgeX.RGBColor color) #

Adds a colored slice to the current pie chart configuration using an RGBColor.

Parameters

label System.String required
Label for the slice.
value System.Double required
Numeric value represented by the slice.
color HtmlForgeX.RGBColor required
Structured RGB color applied to the slice.

Returns

The current ChartJs instance.

public ChartJs AddPoint(Double x, Double y) #
Returns: ChartJs

Adds a point for scatter charts.

Parameters

x System.Double requiredposition: 0
y System.Double requiredposition: 1
public ChartJs AddSankeyDataset(String label, Action<ChartJsSankeyDatasetOptions> configure) #
Returns: ChartJs

Adds an additional Sankey dataset (useful for side-by-side Sankey visualizations).

Parameters

label System.String requiredposition: 0
configure System.Action{HtmlForgeX.ChartJsSankeyDatasetOptions} requiredposition: 1
public ChartJs AddStackedBar(String seriesName, params ValueTuple<String, Double>[] points) #
Returns: ChartJs

Adds/extends a stacked bar series and aligns categories automatically.

Parameters

seriesName System.String requiredposition: 0
points System.ValueTuple{System.String,System.Double}[] requiredposition: 1
public ChartJs Area() #
Returns: ChartJs

Convenience builder for an area chart (line with fill). Sets the chart type to Line and enables default dataset fill for simple API and AddDataset overloads.

public ChartJs Bar() #
Returns: ChartJs

Shortcut for calling ChartJsType) with Bar.

Returns

The current ChartJs instance.

public ChartJs BeginAtZero(Boolean enabled = true) #
Returns: ChartJs

Sets the Y-axis to begin at zero.

Parameters

enabled System.Boolean = true optionalposition: 0
public ChartJs Bubble() #
Returns: ChartJs

Shortcut for calling ChartJsType) with Bubble.

Returns

The current ChartJs instance.

public ChartJs Bullet(Double value, Double target, Double min, Double max, Action<ChartJsBulletOptions> configure = null) #
Returns: ChartJs

Simple horizontal bullet chart (performance bar) using stacked bars. Ranges are drawn as a background stack; the actual value overlays as a thin bar. No external plugins required.

Parameters

value System.Double requiredposition: 0
target System.Double requiredposition: 1
min System.Double requiredposition: 2
max System.Double requiredposition: 3
configure System.Action{HtmlForgeX.ChartJsBulletOptions} = null optionalposition: 4
public ChartJs CenterLabel(String text, Int32 fontSize = 26, String color = "#111", String backgroundColor = null, Int32 padding = 6) #
Returns: ChartJs

Adds a centered label inside circular charts (doughnut/pie/gauge) using the Chart.js Annotation plugin. Automatically registers the plugin library.

Parameters

text System.String requiredposition: 0
Text to display.
fontSize System.Int32 = 26 optionalposition: 1
Font size in px.
color System.String = "#111" optionalposition: 2
Text color.
backgroundColor System.String = null optionalposition: 3
Background behind the text (transparent by default).
padding System.Int32 = 6 optionalposition: 4
Padding around text.
Colors 3 overloads
public ChartJs Colors(params RGBColor[] colors) #
Returns: ChartJs

Sets custom colors for the chart (for pie, doughnut and polarArea types).

Parameters

colors System.String[] requiredposition: 0
Array of color strings.

Returns

The current ChartJs instance.

Colors(HtmlForgeX.RGBColor[] colors) #

Sets custom colors for the chart using RGBColor instances.

Parameters

colors HtmlForgeX.RGBColor[] required
Colors to apply.

Returns

The current ChartJs instance.

public ChartJs Colors(params Object[] colors) #
Returns: ChartJs

Sets custom colors for the chart using a mix of RGBColor and strings.

Parameters

colors System.Object[] requiredposition: 0
Color values.

Returns

The current ChartJs instance.

public ChartJs Configure(Action<ChartJsOptions> configure) #
Returns: ChartJs

Configures chart options with full access.

Parameters

configure System.Action{HtmlForgeX.ChartJsOptions} requiredposition: 0
public ChartJs Doughnut() #
Returns: ChartJs

Shortcut for calling ChartJsType) with Doughnut.

Returns

The current ChartJs instance.

public ChartJs EnableGeoInteractivity(Action<ChartJsGeoInteractivity> configure) #
Returns: ChartJs

Enables interactivity for choropleth/bubble maps: tooltips and click output element.

Parameters

configure System.Action{HtmlForgeX.ChartJsGeoInteractivity} requiredposition: 0
public ChartJs FillContainer(Boolean enabled = true) #
Returns: ChartJs

Convenience: make the chart fill its container width while letting height be driven by content. Sets responsive=true and maintainAspectRatio=false when enabled.

Parameters

enabled System.Boolean = true optionalposition: 0
public ChartJs Gauge(Double value, Double min, Double max, Action<ChartJsGaugeOptions> configure = null) #
Returns: ChartJs

Configures this chart as a semi-circular gauge using a doughnut with a value vs. remainder segment. No external plugins required.

Parameters

value System.Double requiredposition: 0
Current value.
min System.Double requiredposition: 1
Minimum value.
max System.Double requiredposition: 2
Maximum value.
configure System.Action{HtmlForgeX.ChartJsGaugeOptions} = null optionalposition: 3
Optional extra styling (colors, cutout, angles).
public ChartJs GaugeTicks(Action<ChartJsGaugeTicksOptions> configure = null) #
Returns: ChartJs

Adds radial tick marks (dial ticks) drawn via a lightweight plugin. Works with both ring and wedge gauges.

Parameters

configure System.Action{HtmlForgeX.ChartJsGaugeTicksOptions} = null optionalposition: 0
GaugeV3 2 overloads
public ChartJs GaugeV3(Double value, IEnumerable<Double> stops, IEnumerable<RGBColor> colors, Double minValue = 0, Action<ChartJsGaugeV3Options> configure = null) #
Returns: ChartJs

Configures this chart to use the 'gauge' chart type provided by chartjs-gauge-v3. Provide threshold stops (sorted ascending) and matching background colors. Use minValue to shift range.

Parameters

value System.Double requiredposition: 0
Current gauge value.
stops System.Collections.Generic.IEnumerable{System.Double} requiredposition: 1
Threshold values, e.g., [50,70,90,100].
colors System.Collections.Generic.IEnumerable{System.String} requiredposition: 2
Colors for each band.
minValue System.Double = 0 optionalposition: 3
Optional minimum value (default 0).
configure System.Action{HtmlForgeX.ChartJsGaugeV3Options} = null optionalposition: 4
Optional advanced options (needle/valueLabel/cutout/angles).
GaugeV3(System.Double value, System.Collections.Generic.IEnumerable{System.Double} stops, System.Collections.Generic.IEnumerable{HtmlForgeX.RGBColor} colors, System.Double minValue, System.Action{HtmlForgeX.ChartJsGaugeV3Options} configure) #

Overload for GaugeV3 that accepts RGBColor collection for colors.

Parameters

value System.Double required
stops System.Collections.Generic.IEnumerable{System.Double} required
colors System.Collections.Generic.IEnumerable{HtmlForgeX.RGBColor} required
minValue System.Double required
configure System.Action{HtmlForgeX.ChartJsGaugeV3Options} required
public ChartJs GaugeV3Style(ChartJsGaugeV3Style style) #
Returns: ChartJs

Applies a predefined style for gauge-v3 (angles/cutout/needle tweaks).

Parameters

style HtmlForgeX.ChartJsGaugeV3Style requiredposition: 0
public ChartJs GaugeWithNeedle(Double value, Double min, Double max, Action<ChartJsNeedleGaugeOptions> configure = null) #
Returns: ChartJs

Configures a semi-circular gauge with a needle drawn via an optional plugin. The colored arc is built from bands; the needle indicates value.

Parameters

value System.Double requiredposition: 0
Current value.
min System.Double requiredposition: 1
Minimum value.
max System.Double requiredposition: 2
Maximum value.
configure System.Action{HtmlForgeX.ChartJsNeedleGaugeOptions} = null optionalposition: 3
Optional extra styling and band configuration.
public ChartJs Grid(Action<ChartJsLayout> configure) #
Returns: ChartJs

Configures layout/grid options, providing parity with ApexCharts.Grid.

Parameters

configure System.Action{HtmlForgeX.ChartJsLayout} requiredposition: 0
Interaction 2 overloads
public ChartJs Interaction(Action<ChartJsInteraction> configure) #
Returns: ChartJs

Configures interaction with fluent API.

Parameters

configure System.Action{HtmlForgeX.ChartJsInteraction} requiredposition: 0
public ChartJs Interaction(ChartJsInteractionMode mode, Boolean intersect = false) #
Returns: ChartJs

Configures interaction with common settings.

Parameters

mode HtmlForgeX.ChartJsInteractionMode requiredposition: 0
intersect System.Boolean = false optionalposition: 1
Legend 2 overloads
public ChartJs Legend(Boolean display = true, ChartJsPosition position = Top) #
Returns: ChartJs

Sets whether to show the legend.

Parameters

display System.Boolean = true optionalposition: 0
position HtmlForgeX.ChartJsPosition = Top optionalposition: 1
public ChartJs Legend(Action<ChartJsLegend> configure) #
Returns: ChartJs

Configures the legend with advanced options.

Parameters

configure System.Action{HtmlForgeX.ChartJsLegend} requiredposition: 0
LegendLabels 2 overloads
public ChartJs LegendLabels(Int32 fontSize, ChartJsFontWeight fontWeight, RGBColor color, Int32 padding = 10, Boolean usePointStyle = false) #
Returns: ChartJs

Configures legend labels with common settings.

Parameters

fontSize System.Int32 = 12 requiredposition: 0
fontWeight HtmlForgeX.ChartJsFontWeight = Normal requiredposition: 1
color System.String = "#666" requiredposition: 2
padding System.Int32 = 10 optionalposition: 3
usePointStyle System.Boolean = false optionalposition: 4
LegendLabels(System.Int32 fontSize, HtmlForgeX.ChartJsFontWeight fontWeight, HtmlForgeX.RGBColor color, System.Int32 padding, System.Boolean usePointStyle) #

Configures legend labels with RGBColor support.

Parameters

fontSize System.Int32 required
fontWeight HtmlForgeX.ChartJsFontWeight required
color HtmlForgeX.RGBColor required
padding System.Int32 required
usePointStyle System.Boolean required
public ChartJs Line() #
Returns: ChartJs

Shortcut for calling ChartJsType) with Line.

Returns

The current ChartJs instance.

public ChartJs MaintainAspectRatio(Boolean value) #
Returns: ChartJs

Sets the maintainAspectRatio option directly.

Parameters

value System.Boolean requiredposition: 0
public ChartJs Mixed() #
Returns: ChartJs

Configures mixed chart mode. Root type is omitted and each dataset can specify its own type. Use dataset.SetType(ChartJsType.Line|Bar|...) to mix series.

public ChartJs NoAnimation() #
Returns: ChartJs

Disables animations.

public ChartJs OffsetLabel(String key, String text, Int32 fontSize = 26, String color = "#111", String backgroundColor = null, Int32 padding = 6, Int32 xAdjust = 0, Int32 yAdjust = 0) #
Returns: ChartJs

Adds a label anchored at the chart center with pixel offsets (xAdjust, yAdjust). Positive xAdjust moves right; positive yAdjust moves down.

Parameters

key System.String requiredposition: 0
text System.String requiredposition: 1
fontSize System.Int32 = 26 optionalposition: 2
color System.String = "#111" optionalposition: 3
backgroundColor System.String = null optionalposition: 4
padding System.Int32 = 6 optionalposition: 5
xAdjust System.Int32 = 0 optionalposition: 6
yAdjust System.Int32 = 0 optionalposition: 7
public ChartJs Pie() #
Returns: ChartJs

Shortcut for calling ChartJsType) with Pie.

Returns

The current ChartJs instance.

public ChartJs Plugins(Action<ChartJsPlugins> configure) #
Returns: ChartJs

Configures plugins with fluent API.

Parameters

configure System.Action{HtmlForgeX.ChartJsPlugins} requiredposition: 0
public ChartJs Polar() #
Returns: ChartJs

Alias for PolarArea().

public ChartJs PolarArea() #
Returns: ChartJs

Shortcut for calling ChartJsType) with PolarArea.

Returns

The current ChartJs instance.

public ChartJs Radar() #
Returns: ChartJs

Shortcut for calling ChartJsType) with Radar.

Returns

The current ChartJs instance.

public ChartJs RAxis(Action<ChartJsAxis> configure) #
Returns: ChartJs

Configures the R-axis (for polar charts) with fluent API.

Parameters

configure System.Action{HtmlForgeX.ChartJsAxis} requiredposition: 0
public ChartJs RAxisRange(Nullable<Double> min = null, Nullable<Double> max = null) #
Returns: ChartJs

Sets the R-axis range for polar charts.

Parameters

min System.Nullable{System.Double} = null optionalposition: 0
max System.Nullable{System.Double} = null optionalposition: 1
RegisterLibraries() #

Registers the Chart.js library with the current document.

public ChartJs Responsive(Boolean responsive = true, Boolean maintainAspectRatio = true) #
Returns: ChartJs

Sets the responsive behavior.

Parameters

responsive System.Boolean = true optionalposition: 0
maintainAspectRatio System.Boolean = true optionalposition: 1
Sankey 2 overloads
public ChartJs Sankey(Action<ChartJsSankeyDatasetOptions> configure) #
Returns: ChartJs

Configures this chart to render a Sankey diagram using chartjs-chart-sankey. Clears existing datasets and creates a single dataset.

Parameters

configure System.Action{HtmlForgeX.ChartJsSankeyDatasetOptions} requiredposition: 0
public ChartJs Sankey(String label, Action<ChartJsSankeyDatasetOptions> configure) #
Returns: ChartJs

Configures this chart to render a Sankey diagram with a specific dataset label.

Parameters

label System.String requiredposition: 0
configure System.Action{HtmlForgeX.ChartJsSankeyDatasetOptions} requiredposition: 1
public ChartJs SankeySettings(Action<ChartJsSankeySettings> configure) #
Returns: ChartJs

Provides the fluent Settings(...) surface for building Sankey datasets while keeping the root surface minimal.

Parameters

configure System.Action{HtmlForgeX.ChartJsSankeySettings} requiredposition: 0
public ChartJs Scales(Action<ChartJsScales> configure) #
Returns: ChartJs

Configures scales with fluent API.

Parameters

configure System.Action{HtmlForgeX.ChartJsScales} requiredposition: 0
public ChartJs Scatter() #
Returns: ChartJs

Shortcut for calling ChartJsType) with Scatter.

Returns

The current ChartJs instance.

public ChartJs ScatterArea() #
Returns: ChartJs

Convenience for a scatter chart rendered as an area (connect points and fill under line).

public ChartJs SegmentLabels(Action<ChartJsSegmentLabelsOptions> configure) #
Returns: ChartJs

Enable segment labels plugin and configure appearance.

Parameters

configure System.Action{HtmlForgeX.ChartJsSegmentLabelsOptions} requiredposition: 0
public ChartJs SetType(ChartJsType type) #
Returns: ChartJs

Sets the chart type.

Parameters

type HtmlForgeX.ChartJsType requiredposition: 0
Chart type.

Returns

The current ChartJs instance.

public ChartJs Size(String width = null, String height = null) #
Returns: ChartJs

Sets the canvas dimensions.

Parameters

width System.String = null optionalposition: 0
height System.String = null optionalposition: 1
public ChartJs SolidGauge(Double value, Double min, Double max, Boolean semi = true, String centerLabel = null, String centerLabelColor = "#111", Int32 centerLabelFont = 20, Action<ChartJsGaugeOptions> configure = null, Action<ChartJsGaugeTicksOptions> configureTicks = null) #
Returns: ChartJs

Convenience builder for a solid wedge gauge (half or full). Sets cutout to 0, wires default bands, adds radial ticks with labels, and an optional center label.

Parameters

value System.Double requiredposition: 0
min System.Double requiredposition: 1
max System.Double requiredposition: 2
semi System.Boolean = true optionalposition: 3
centerLabel System.String = null optionalposition: 4
centerLabelColor System.String = "#111" optionalposition: 5
centerLabelFont System.Int32 = 20 optionalposition: 6
configure System.Action{HtmlForgeX.ChartJsGaugeOptions} = null optionalposition: 7
configureTicks System.Action{HtmlForgeX.ChartJsGaugeTicksOptions} = null optionalposition: 8
public ChartJs Speedometer(Double value, Double min, Double max, String units = "km/h", Boolean fullDial = false, Action<ChartJsNeedleGaugeOptions> configure = null, Action<ChartJsGaugeTicksOptions> configureTicks = null) #
Returns: ChartJs

Convenience builder for a speedometer gauge (semi by default). Wires needle, colored bands, ticks with numeric labels, and a center label showing the value + units.

Parameters

value System.Double requiredposition: 0
min System.Double requiredposition: 1
max System.Double requiredposition: 2
units System.String = "km/h" optionalposition: 3
fullDial System.Boolean = false optionalposition: 4
configure System.Action{HtmlForgeX.ChartJsNeedleGaugeOptions} = null optionalposition: 5
configureTicks System.Action{HtmlForgeX.ChartJsGaugeTicksOptions} = null optionalposition: 6
public ChartJs Stacked(Boolean enabled = true) #
Returns: ChartJs

Configures the chart as stacked (for bar and line charts).

Parameters

enabled System.Boolean = true optionalposition: 0
Tooltip 3 overloads
public ChartJs Tooltip(Action<ChartJsTooltip> configure) #
Returns: ChartJs

Configures tooltip with fluent API.

Parameters

configure System.Action{HtmlForgeX.ChartJsTooltip} requiredposition: 0
public ChartJs Tooltip(ChartJsInteractionMode mode, Boolean intersect, RGBColor backgroundColor, RGBColor titleColor, RGBColor bodyColor, RGBColor borderColor, Int32 borderWidth = 1) #
Returns: ChartJs

Configures tooltip with common settings.

Parameters

mode HtmlForgeX.ChartJsInteractionMode = Index requiredposition: 0
intersect System.Boolean = false requiredposition: 1
backgroundColor System.String = "rgba(0, 0, 0, 0.8)" requiredposition: 2
titleColor System.String = "#fff" requiredposition: 3
bodyColor System.String = "#fff" requiredposition: 4
borderColor System.String = "#ddd" requiredposition: 5
borderWidth System.Int32 = 1 optionalposition: 6
Tooltip(HtmlForgeX.ChartJsInteractionMode mode, System.Boolean intersect, HtmlForgeX.RGBColor backgroundColor, HtmlForgeX.RGBColor titleColor, HtmlForgeX.RGBColor bodyColor, HtmlForgeX.RGBColor borderColor, System.Int32 borderWidth) #

Configures tooltip with RGBColor support.

Parameters

mode HtmlForgeX.ChartJsInteractionMode required
intersect System.Boolean required
backgroundColor HtmlForgeX.RGBColor required
titleColor HtmlForgeX.RGBColor required
bodyColor HtmlForgeX.RGBColor required
borderColor HtmlForgeX.RGBColor required
borderWidth System.Int32 required
public override String ToString() #
Returns: String

Generates the HTML required to render the chart.

Returns

The HTML markup.

public ChartJs USChoropleth(Action<ChartJsGeoWorldOptions> configure = null) #
Returns: ChartJs

Convenience: US states choropleth using us-atlas states topology and albersUsa projection.

Parameters

configure System.Action{HtmlForgeX.ChartJsGeoWorldOptions} = null optionalposition: 0
public ChartJs ValueClamping(Action<ChartValueClampingOptions> configure) #
Returns: ChartJs

Enables value clamping/rounding for this chart.

Parameters

configure System.Action{HtmlForgeX.ChartValueClampingOptions} requiredposition: 0
public ChartJs Waffle(Double percent, String filledColor = "#206bc4", String emptyColor = "#e9ecef") #
Returns: ChartJs

10x10 waffle chart using a Bubble grid (no plugin required). Each cell is a circle; filled cells use a strong color; remainder uses a neutral.

Parameters

percent System.Double requiredposition: 0
0..100 filled cells.
filledColor System.String = "#206bc4" optionalposition: 1
Color for filled cells.
emptyColor System.String = "#e9ecef" optionalposition: 2
Color for empty cells.
public ChartJs WorldBubbleMap(Action<ChartJsGeoBubbleOptions> configure) #
Returns: ChartJs

Bubble/point map using chartjs-chart-geo 'bubbleMap' controller. Provide points with latitude/longitude and value.

Parameters

configure System.Action{HtmlForgeX.ChartJsGeoBubbleOptions} requiredposition: 0
public ChartJs WorldChoropleth(Action<ChartJsGeoWorldOptions> configure = null) #
Returns: ChartJs

Configures a world choropleth using chartjs-chart-geo. Data is generated client-side from TopoJSON. Optionally provide value-by-name mapping to color countries.

Parameters

configure System.Action{HtmlForgeX.ChartJsGeoWorldOptions} = null optionalposition: 0
public ChartJs XAxis(Action<ChartJsAxis> configure) #
Returns: ChartJs

Configures the X-axis with fluent API.

Parameters

configure System.Action{HtmlForgeX.ChartJsAxis} requiredposition: 0
XAxisGrid 2 overloads
public ChartJs XAxisGrid(RGBColor color, Int32 lineWidth = 1) #
Returns: ChartJs

Configures X-axis grid with common settings.

Parameters

color System.String = "rgba(0, 0, 0, 0.1)" requiredposition: 0
lineWidth System.Int32 = 1 optionalposition: 1
XAxisGrid(HtmlForgeX.RGBColor color, System.Int32 lineWidth) #

Configures X-axis grid with RGBColor support.

Parameters

color HtmlForgeX.RGBColor required
lineWidth System.Int32 required
public ChartJs XAxisRange(Nullable<Double> min = null, Nullable<Double> max = null) #
Returns: ChartJs

Sets the X-axis range.

Parameters

min System.Nullable{System.Double} = null optionalposition: 0
max System.Nullable{System.Double} = null optionalposition: 1
XAxisTicks 2 overloads
public ChartJs XAxisTicks(RGBColor color, Int32 fontSize = 12) #
Returns: ChartJs

Configures X-axis ticks with common settings.

Parameters

color System.String = "#666" requiredposition: 0
fontSize System.Int32 = 12 optionalposition: 1
XAxisTicks(HtmlForgeX.RGBColor color, System.Int32 fontSize) #

Configures X-axis ticks with RGBColor support.

Parameters

color HtmlForgeX.RGBColor required
fontSize System.Int32 required
public ChartJs XAxisTitle(String text, Boolean display = true) #
Returns: ChartJs

Sets the X-axis title.

Parameters

text System.String requiredposition: 0
display System.Boolean = true optionalposition: 1
public ChartJs YAxis(Action<ChartJsAxis> configure) #
Returns: ChartJs

Configures the Y-axis with fluent API.

Parameters

configure System.Action{HtmlForgeX.ChartJsAxis} requiredposition: 0
public ChartJs YAxisFloat() #
Returns: ChartJs

Sets the Y-axis to NOT begin at zero (allows floating scale).

YAxisGrid 2 overloads
public ChartJs YAxisGrid(RGBColor color, Int32 lineWidth = 1) #
Returns: ChartJs

Configures Y-axis grid with common settings.

Parameters

color System.String = "rgba(0, 0, 0, 0.1)" requiredposition: 0
lineWidth System.Int32 = 1 optionalposition: 1
YAxisGrid(HtmlForgeX.RGBColor color, System.Int32 lineWidth) #

Configures Y-axis grid with RGBColor support.

Parameters

color HtmlForgeX.RGBColor required
lineWidth System.Int32 required
public ChartJs YAxisRange(Nullable<Double> min = null, Nullable<Double> max = null) #
Returns: ChartJs

Sets the Y-axis range.

Parameters

min System.Nullable{System.Double} = null optionalposition: 0
max System.Nullable{System.Double} = null optionalposition: 1
YAxisTicks 2 overloads
public ChartJs YAxisTicks(RGBColor color, Int32 fontSize = 12) #
Returns: ChartJs

Configures Y-axis ticks with common settings.

Parameters

color System.String = "#666" requiredposition: 0
fontSize System.Int32 = 12 optionalposition: 1
YAxisTicks(HtmlForgeX.RGBColor color, System.Int32 fontSize) #

Configures Y-axis ticks with RGBColor support.

Parameters

color HtmlForgeX.RGBColor required
fontSize System.Int32 required
public ChartJs YAxisTitle(String text, Boolean display = true) #
Returns: ChartJs

Sets the Y-axis title.

Parameters

text System.String requiredposition: 0
display System.Boolean = true optionalposition: 1

Properties

public String Id { get; set; } #

Gets or sets the canvas identifier.

public ChartJsType Type { get; set; } #

Gets or sets the chart type.

public List<String> Labels { get; } #

Gets the labels for the dataset.

public List<Double> Data { get; } #

Gets the numeric values for the dataset (for line, bar, pie and radar charts).

public List<ValueTuple<Double, Double>> Points { get; } #

Gets the scatter points for scatter charts.

public List<ValueTuple<Double, Double, Double>> Bubbles { get; } #

Gets the bubble points for bubble charts.

public List<ChartJsDataset> Datasets { get; } #

Gets the datasets for advanced configuration.

public ChartJsOptions Options { get; set; } #

Gets or sets the chart options.

public String Width { get; set; } #

Gets or sets the canvas width.

public String Height { get; set; } #

Gets or sets the canvas height.

public ChartJsTitle Title { get; } #

Provides access to the chart title configuration, mirroring the ApexCharts surface.

Fields

DefaultColors #

Default colors for datasets (RGB values).

Extension Methods

public static ChartJs AfricaChoropleth(ChartJs chart, Action<ChartJsGeoWorldOptions> configure = null) #
Returns: ChartJs

Configures the chart for an Africa-focused choropleth map.

Parameters

chart HtmlForgeX.ChartJs requiredposition: 0
The chart instance to configure.
configure System.Action{HtmlForgeX.ChartJsGeoWorldOptions} = null optionalposition: 1
Optional callback for further customization.

Returns

The configured ChartJs instance.

public static ChartJs AsiaChoropleth(ChartJs chart, Action<ChartJsGeoWorldOptions> configure = null) #
Returns: ChartJs

Configures the chart for an Asia-focused choropleth map.

Parameters

chart HtmlForgeX.ChartJs requiredposition: 0
The chart instance to configure.
configure System.Action{HtmlForgeX.ChartJsGeoWorldOptions} = null optionalposition: 1
Optional callback for further customization.

Returns

The configured ChartJs instance.

public static ChartJs EuropeChoropleth(ChartJs chart, Action<ChartJsGeoWorldOptions> configure = null) #
Returns: ChartJs

Configures the chart for a Europe-focused choropleth map.

Parameters

chart HtmlForgeX.ChartJs requiredposition: 0
The chart instance to configure.
configure System.Action{HtmlForgeX.ChartJsGeoWorldOptions} = null optionalposition: 1
Optional callback for further customization.

Returns

The configured ChartJs instance.

public static ChartJs NorthAmericaChoropleth(ChartJs chart, Action<ChartJsGeoWorldOptions> configure = null) #
Returns: ChartJs

Configures the chart for a North America-focused choropleth map.

Parameters

chart HtmlForgeX.ChartJs requiredposition: 0
The chart instance to configure.
configure System.Action{HtmlForgeX.ChartJsGeoWorldOptions} = null optionalposition: 1
Optional callback for further customization.

Returns

The configured ChartJs instance.

public static ChartJs OceaniaChoropleth(ChartJs chart, Action<ChartJsGeoWorldOptions> configure = null) #
Returns: ChartJs

Configures the chart for an Oceania-focused choropleth map.

Parameters

chart HtmlForgeX.ChartJs requiredposition: 0
The chart instance to configure.
configure System.Action{HtmlForgeX.ChartJsGeoWorldOptions} = null optionalposition: 1
Optional callback for further customization.

Returns

The configured ChartJs instance.

public static ChartJs SouthAmericaChoropleth(ChartJs chart, Action<ChartJsGeoWorldOptions> configure = null) #
Returns: ChartJs

Configures the chart for a South America-focused choropleth map.

Parameters

chart HtmlForgeX.ChartJs requiredposition: 0
The chart instance to configure.
configure System.Action{HtmlForgeX.ChartJsGeoWorldOptions} = null optionalposition: 1
Optional callback for further customization.

Returns

The configured ChartJs instance.