ChartJS3Tools
Namespace: Wisej.AI.Tools
Assembly: Wisej.AI
Represents a container for ChartJS3 tools, providing functionalities to manipulate and build charts.
- C#
- VB.NET
public class ChartJS3Tools : ToolsContainer
Public Class ChartJS3Tools
Inherits ToolsContainer
This class is designed to work with ChartJS3 objects, allowing the AI to configure and build various types of charts.
Constructors
ChartJS3Tools(chart)
Initializes a new instance of the ChartJS3Tools class with the specified chart.
| Name | Type | Description |
|---|---|---|
| chart | ChartJS3 | The ChartJS3 object to be associated with this tools container. |
Throws:
- ArgumentNullException Thrown when the provided chart is null.
Properties
Chart
ChartJS3: Gets or sets the ChartJS3 object associated with this tools container. (Default: null)
Methods
build_chart(title, labels, dataSets)
Builds a chart with the specified title, labels, and datasets.
| Parameter | Type | Description |
|---|---|---|
| title | String | The title of the chart. |
| labels | String[] | The labels for the chart's data points. |
| dataSets | Object[] | The datasets to be included in the chart. |
This method configures the chart's datasets and appearance based on the provided parameters.
get_dataset_schema(chartType)
Retrieves the dataset schema for the specified chart type.
| Parameter | Type | Description |
|---|---|---|
| chartType | ChartType | The type of chart for which to get the dataset schema. |
Returns: Object. An object representing the dataset schema for the specified chart type.
GetDataSetSchema(chartType)
Retrieves the dataset schema for a given chart type.
| Parameter | Type | Description |
|---|---|---|
| chartType | ChartType | The type of chart for which to retrieve the dataset schema. |
Returns: Object. An object representing the dataset schema for the specified chart type.
TranslateColor(color)
Translates a color object into a Color instance.
| Parameter | Type | Description |
|---|---|---|
| color | Object | The color object to translate. |
Returns: Color. A Color instance representing the translated color.
TranslateColors(colors)
Translates an array of color objects into an array of Color instances.
| Parameter | Type | Description |
|---|---|---|
| colors | Object | The array of color objects to translate. |
Returns: Color[]. An array of Color instances representing the translated colors.
Implements
| Name | Description |
|---|---|
| IToolsContainer | Represents a container for tools, providing access to a hub, adapter, and a collection of parameters. |