> For the complete documentation index, see [llms.txt](https://docs.wisej.com/ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.wisej.com/ai/components/api/tools/wisej.ai.tools.chartjs3tools.md).

# ChartJS3Tools

Namespace: **Wisej.AI.Tools**

Assembly: **Wisej.AI** (3.5.0.0)

* [ToolsContainer](/ai/components/api/tools/wisej.ai.tools.toolscontainer.md)
  * [ChartJS3Tools](/ai/components/api/tools/wisej.ai.tools.chartjs3tools.md)

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

{% tabs %}
{% tab title="C#" %}

```csharp
public class ChartJS3Tools : ToolsContainer
```

{% endtab %}

{% tab title="VB.NET" %}

```visual-basic
Public Class ChartJS3Tools
    Inherits ToolsContainer
```

{% endtab %}
{% endtabs %}

This class is designed to work with ChartJS3 objects, allowing the AI to configure and build various types of charts.

## Constructors

### ![](/files/ptrKjmmRoQB76pvrIqh0) ChartJS3Tools(chart)

Initializes a new instance of the [ChartJS3Tools](/ai/components/api/tools/wisej.ai.tools.chartjs3tools.md) class with the specified chart.

| Name      | Type                                                                     | Description                                                     |
| --------- | ------------------------------------------------------------------------ | --------------------------------------------------------------- |
| **chart** | [ChartJS3](https://docs.wisej.com/api?q=wisej.web.ext.chartjs3.chartjs3) | The ChartJS3 object to be associated with this tools container. |

**Throws:**

* [ArgumentNullException](https://docs.microsoft.com/dotnet/api/system.argumentnullexception)\
  Thrown when the provided chart is null.

## Properties

### ![](/files/ptrKjmmRoQB76pvrIqh0) Chart

[ChartJS3](https://docs.wisej.com/api?q=wisej.web.ext.chartjs3.chartjs3): Gets or sets the ChartJS3 object associated with this tools container. (Default: `null`)

## Methods

### ![](/files/KL0Ik37djZRr8a07Wopd) build\_chart(title, labels, dataSets)

Builds a chart with the specified title, labels, and datasets.

| Parameter    | Type                                                              | Description                               |
| ------------ | ----------------------------------------------------------------- | ----------------------------------------- |
| **title**    | [String](https://docs.microsoft.com/dotnet/api/system.string)     | The title of the chart.                   |
| **labels**   | [String\[\]](https://docs.microsoft.com/dotnet/api/system.string) | The labels for the chart's data points.   |
| **dataSets** | [Object\[\]](https://docs.microsoft.com/dotnet/api/system.object) | The datasets to be included in the chart. |

This method configures the chart's datasets and appearance based on the provided parameters.

### ![](/files/KL0Ik37djZRr8a07Wopd) get\_dataset\_schema(chartType)

Retrieves the dataset schema for the specified chart type.

| Parameter     | Type                                                                       | Description                                            |
| ------------- | -------------------------------------------------------------------------- | ------------------------------------------------------ |
| **chartType** | [ChartType](https://docs.wisej.com/api?q=wisej.web.ext.chartjs3.charttype) | The type of chart for which to get the dataset schema. |

**Returns:** [Object](https://docs.microsoft.com/dotnet/api/system.object). An object representing the dataset schema for the specified chart type.

### ![](/files/KL0Ik37djZRr8a07Wopd) GetDataSetSchema(chartType)

Retrieves the dataset schema for a given chart type.

| Parameter     | Type                                                                       | Description                                                 |
| ------------- | -------------------------------------------------------------------------- | ----------------------------------------------------------- |
| **chartType** | [ChartType](https://docs.wisej.com/api?q=wisej.web.ext.chartjs3.charttype) | The type of chart for which to retrieve the dataset schema. |

**Returns:** [Object](https://docs.microsoft.com/dotnet/api/system.object). An object representing the dataset schema for the specified chart type.

### ![](/files/KL0Ik37djZRr8a07Wopd) TranslateColor(color)

Translates a color object into a [Color](https://docs.microsoft.com/dotnet/api/system.drawing.color) instance.

| Parameter | Type                                                          | Description                    |
| --------- | ------------------------------------------------------------- | ------------------------------ |
| **color** | [Object](https://docs.microsoft.com/dotnet/api/system.object) | The color object to translate. |

**Returns:** [Color](https://docs.microsoft.com/dotnet/api/system.drawing.color). A [Color](https://docs.microsoft.com/dotnet/api/system.drawing.color) instance representing the translated color.

### ![](/files/KL0Ik37djZRr8a07Wopd) TranslateColors(colors)

Translates an array of color objects into an array of [Color](https://docs.microsoft.com/dotnet/api/system.drawing.color) instances.

| Parameter  | Type                                                          | Description                              |
| ---------- | ------------------------------------------------------------- | ---------------------------------------- |
| **colors** | [Object](https://docs.microsoft.com/dotnet/api/system.object) | The array of color objects to translate. |

**Returns:** [Color\[\]](https://docs.microsoft.com/dotnet/api/system.drawing.color). An array of [Color](https://docs.microsoft.com/dotnet/api/system.drawing.color) instances representing the translated colors.

## Implements

| Name                                                                          | Description                                                                                           |
| ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- |
| [IToolsContainer](/ai/components/api/tools/wisej.ai.tools.itoolscontainer.md) | Represents a container for tools, providing access to a hub, adapter, and a collection of parameters. |


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.wisej.com/ai/components/api/tools/wisej.ai.tools.chartjs3tools.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
