Class TrinityChartWidget<T>
- Namespace
- Abanoub
Nassem .Trinity.Components.TrinityWidget
- Assembly
- AbanoubNassem.Trinity.dll
A base class for creating chart widgets that inherit from the TrinityWidget<T> base class.
public abstract class TrinityChartWidget<T> : TrinityWidget<T>, ITrinityWidget, ITrinityComponent where T : TrinityChartWidget<T>
Type Parameters
T
The type of the TrinityChartWidget.
- Inheritance
-
TrinityChartWidget<T>
- Implements
- Derived
- Inherited Members
Constructors
TrinityChartWidget()
Initializes a new instance of the T
class.
Properties
BackgroundColors
Gets or sets the background colors.
Property Value
- string[]
The background colors.
ChartLabels
Gets or sets the chart labels.
Property Value
ChartValues
Gets or sets the chart values.
Property Value
Options
Gets or sets the options for the chart.
Property Value
- Dictionary<string, object>
The chart options.
Methods
SetBackgroundColors(params string[])
Sets the background colors with the specified colors.
Parameters
colors
string[]The colors.
Returns
- T
The current instance of the
T
widget.
SetChart(params object[])
Sets the chart with the specified chart values.
Parameters
chartValues
object[]The chart values.
Returns
- T
The current instance of the
T
widget.
SetChart(params (object, object)[])
Sets the chart with the specified chart label values.
Parameters
Returns
- T
The current instance of the
T
widget.
SetDataset(List<object>, string, string?, string?)
Sets the dataset with the specified data, label, background color, and border color.
public virtual T SetDataset(List<object> data, string label, string? backgroundColor = null, string? borderColor = null)
Parameters
data
List<object>The data.
label
stringThe label.
backgroundColor
stringThe background color.
borderColor
stringThe border color.
Returns
- T
The current instance of the
T
widget.
SetLabels(params object[])
Sets The chart labels.
Parameters
labels
object[]The chart labels.
Returns
- T
SetOptions(Dictionary<string, object>)
Sets the options for the chart with the specified options.
Parameters
options
Dictionary<string, object>The chart options.
Returns
- T
The current instance of the
T
widget.