HtmlForgeX

API Reference

Class

ChartJsDataset

Namespace HtmlForgeX
Assembly HtmlForgeX

Represents a dataset in a Chart.js chart with full configuration options.

Inheritance

  • Object
  • ChartJsDataset

Constructors

Methods

SetBackgroundColor 2 overloads
public ChartJsDataset SetBackgroundColor(RGBColor color) #
Returns: ChartJsDataset

Sets the background color using a string.

Parameters

color System.String requiredposition: 0
SetBackgroundColor(HtmlForgeX.RGBColor color) #

Sets the background color using RGBColor.

Parameters

color HtmlForgeX.RGBColor required
SetBackgroundColors 2 overloads
public ChartJsDataset SetBackgroundColors(params RGBColor[] colors) #
Returns: ChartJsDataset

Sets multiple background colors using strings.

Parameters

colors System.String[] requiredposition: 0
SetBackgroundColors(HtmlForgeX.RGBColor[] colors) #

Sets multiple background colors using RGBColor.

Parameters

colors HtmlForgeX.RGBColor[] required
SetBorderColor 2 overloads
public ChartJsDataset SetBorderColor(RGBColor color) #
Returns: ChartJsDataset

Sets the border color using a string.

Parameters

color System.String requiredposition: 0
SetBorderColor(HtmlForgeX.RGBColor color) #

Sets the border color using RGBColor.

Parameters

color HtmlForgeX.RGBColor required
SetBorderColors 2 overloads
public ChartJsDataset SetBorderColors(params RGBColor[] colors) #
Returns: ChartJsDataset

Sets multiple border colors using strings.

Parameters

colors System.String[] requiredposition: 0
SetBorderColors(HtmlForgeX.RGBColor[] colors) #

Sets multiple border colors using RGBColor.

Parameters

colors HtmlForgeX.RGBColor[] required
public ChartJsDataset SetBorderDash(params Int32[] pattern) #
Returns: ChartJsDataset

Sets the border dash pattern.

Parameters

pattern System.Int32[] requiredposition: 0
public ChartJsDataset SetBorderWidth(Int32 width) #
Returns: ChartJsDataset

Sets the border width.

Parameters

width System.Int32 requiredposition: 0
SetData 2 overloads
public ChartJsDataset SetData(IEnumerable<Double> values) #
Returns: ChartJsDataset

Sets the data points for the dataset.

Parameters

values System.Double[] requiredposition: 0
SetData(System.Collections.Generic.IEnumerable{System.Double} values) #

Sets the data points for the dataset.

Parameters

values System.Collections.Generic.IEnumerable{System.Double} required
SetFill 2 overloads
public ChartJsDataset SetFill(Boolean fill) #
Returns: ChartJsDataset

Sets whether to fill the area under the line.

Parameters

fill System.Boolean requiredposition: 0
public ChartJsDataset SetFill(String fill) #
Returns: ChartJsDataset

Sets advanced fill options.

Parameters

fill System.String requiredposition: 0
public ChartJsDataset SetHidden(Boolean hidden) #
Returns: ChartJsDataset

Sets whether the dataset is hidden.

Parameters

hidden System.Boolean requiredposition: 0
public ChartJsDataset SetLabel(String label) #
Returns: ChartJsDataset

Sets the label for the dataset.

Parameters

label System.String requiredposition: 0
SetPointBackgroundColor 2 overloads
public ChartJsDataset SetPointBackgroundColor(RGBColor color) #
Returns: ChartJsDataset

Sets the point background color using a string.

Parameters

color System.String requiredposition: 0
SetPointBackgroundColor(HtmlForgeX.RGBColor color) #

Sets the point background color using RGBColor.

Parameters

color HtmlForgeX.RGBColor required
SetPointBorderColor 2 overloads
public ChartJsDataset SetPointBorderColor(RGBColor color) #
Returns: ChartJsDataset

Sets the point border color using a string.

Parameters

color System.String requiredposition: 0
SetPointBorderColor(HtmlForgeX.RGBColor color) #

Sets the point border color using RGBColor.

Parameters

color HtmlForgeX.RGBColor required
public ChartJsDataset SetPointBorderWidth(Int32 width) #
Returns: ChartJsDataset

Sets the point border width.

Parameters

width System.Int32 requiredposition: 0
SetPointHoverBackgroundColor 2 overloads
public ChartJsDataset SetPointHoverBackgroundColor(RGBColor color) #
Returns: ChartJsDataset

Sets the point hover background color using a string.

Parameters

color System.String requiredposition: 0
SetPointHoverBackgroundColor(HtmlForgeX.RGBColor color) #

Sets the point hover background color using RGBColor.

Parameters

color HtmlForgeX.RGBColor required
SetPointHoverBorderColor 2 overloads
public ChartJsDataset SetPointHoverBorderColor(RGBColor color) #
Returns: ChartJsDataset

Sets the point hover border color using a string.

Parameters

color System.String requiredposition: 0
SetPointHoverBorderColor(HtmlForgeX.RGBColor color) #

Sets the point hover border color using RGBColor.

Parameters

color HtmlForgeX.RGBColor required
public ChartJsDataset SetPointHoverBorderWidth(Int32 width) #
Returns: ChartJsDataset

Sets the point hover border width.

Parameters

width System.Int32 requiredposition: 0
public ChartJsDataset SetPointHoverRadius(Int32 radius) #
Returns: ChartJsDataset

Sets the point hover radius.

Parameters

radius System.Int32 requiredposition: 0
public ChartJsDataset SetPointRadius(Int32 radius) #
Returns: ChartJsDataset

Sets the point radius.

Parameters

radius System.Int32 requiredposition: 0
public ChartJsDataset SetShowLine(Boolean show) #
Returns: ChartJsDataset

Sets whether to show the line (for scatter plots).

Parameters

show System.Boolean requiredposition: 0
public ChartJsDataset SetStack(String stack) #
Returns: ChartJsDataset

Sets the stack group for stacked charts.

Parameters

stack System.String requiredposition: 0
public ChartJsDataset SetTension(Double tension) #
Returns: ChartJsDataset

Sets the line tension for curved lines.

Parameters

tension System.Double requiredposition: 0
SetType 2 overloads
public ChartJsDataset SetType(ChartJsType type) #
Returns: ChartJsDataset

Sets the chart type for mixed charts.

Parameters

type System.String requiredposition: 0
SetType(HtmlForgeX.ChartJsType type) #

Sets the chart type for mixed charts using ChartJsType.

Parameters

type HtmlForgeX.ChartJsType required
public ChartJsDataset SetYAxisID(String id) #
Returns: ChartJsDataset

Sets the Y axis ID.

Parameters

id System.String requiredposition: 0

Properties

public String Label { get; set; } #
JsonPropertyName("label")

Gets or sets the label for the dataset.

public List<Double> Data { get; set; } #
JsonIgnore

Gets or sets the data points for standard charts (line, bar, etc).

public List<Object> PointData { get; set; } #
JsonIgnore

Gets or sets the scatter/bubble data points.

public Object JsonData { get; } #
JsonPropertyName("data") JsonIgnore(Condition = 3)

Gets the data for JSON serialization (returns either Data or PointData).

public Object BackgroundColor { get; set; } #
JsonPropertyName("backgroundColor") JsonIgnore(Condition = 3)

Gets or sets the background color(s).

public Object BorderColor { get; set; } #
JsonPropertyName("borderColor") JsonIgnore(Condition = 3)

Gets or sets the border color(s).

public Nullable<Int32> BorderWidth { get; set; } #
JsonPropertyName("borderWidth") JsonIgnore(Condition = 3)

Gets or sets the border width.

public Object PointBackgroundColor { get; set; } #
JsonPropertyName("pointBackgroundColor") JsonIgnore(Condition = 3)

Gets or sets the point background color(s).

public Object PointBorderColor { get; set; } #
JsonPropertyName("pointBorderColor") JsonIgnore(Condition = 3)

Gets or sets the point border color(s).

public Object PointHoverBackgroundColor { get; set; } #
JsonPropertyName("pointHoverBackgroundColor") JsonIgnore(Condition = 3)

Gets or sets the point hover background color(s).

public Object PointHoverBorderColor { get; set; } #
JsonPropertyName("pointHoverBorderColor") JsonIgnore(Condition = 3)

Gets or sets the point hover border color(s).

public Nullable<Int32> PointRadius { get; set; } #
JsonPropertyName("pointRadius") JsonIgnore(Condition = 3)

Gets or sets the point radius.

public Nullable<Int32> PointHoverRadius { get; set; } #
JsonPropertyName("pointHoverRadius") JsonIgnore(Condition = 3)

Gets or sets the point hover radius.

public Nullable<Int32> PointBorderWidth { get; set; } #
JsonPropertyName("pointBorderWidth") JsonIgnore(Condition = 3)

Gets or sets the point border width.

public Nullable<Int32> PointHoverBorderWidth { get; set; } #
JsonPropertyName("pointHoverBorderWidth") JsonIgnore(Condition = 3)

Gets or sets the point hover border width.

public Object Fill { get; set; } #
JsonPropertyName("fill") JsonIgnore(Condition = 3)

Gets or sets the fill mode.

public Nullable<Double> Tension { get; set; } #
JsonPropertyName("tension") JsonIgnore(Condition = 3)

Gets or sets the line tension (for curved lines).

public Nullable<Boolean> ShowLine { get; set; } #
JsonPropertyName("showLine") JsonIgnore(Condition = 3)

Gets or sets whether to show the line.

public List<Int32> BorderDash { get; set; } #
JsonPropertyName("borderDash") JsonIgnore(Condition = 3)

Gets or sets the border dash pattern.

public String Type { get; set; } #
JsonPropertyName("type") JsonIgnore(Condition = 3)

Gets or sets the type of chart for mixed charts.

public String YAxisID { get; set; } #
JsonPropertyName("yAxisID") JsonIgnore(Condition = 3)

Gets or sets the Y axis ID.

public Nullable<Boolean> Hidden { get; set; } #
JsonPropertyName("hidden") JsonIgnore(Condition = 3)

Gets or sets whether this dataset is hidden.

public String Stack { get; set; } #
JsonPropertyName("stack") JsonIgnore(Condition = 3)

Gets or sets the stack group for stacked charts.

public Dictionary<String, Object> ExtensionData { get; set; } #
JsonExtensionData

Gets or sets additional properties for extensibility.