ChartJS3Tools

Wisej.AI.Tools.ChartJS3Tools

Namespace: Wisej.AI.Tools

Assembly: Wisej.AI (3.5.0.0)

Represents a container for ChartJS3 tools, providing functionalities to manipulate and build charts.

public class ChartJS3Tools : 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

The ChartJS3 object to be associated with this tools container.

Throws:

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

The title of the chart.

labels

The labels for the chart's data points.

dataSets

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

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

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

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

The array of color objects to translate.

Returns: Color[]. An array of Color instances representing the translated colors.

Implements

Name
Description

Represents a container for tools, providing access to a hub, adapter, and a collection of parameters.

Last updated