Chart (Chart.js)
A RocketRide tool node that asks the pipeline LLM to turn structured data into a ready-to-render Chart.js configuration for an agent response.
About Chart.js
Chart.js is the chart configuration format produced by this node. The node requests a static JSON configuration and returns it in a chartjs fenced block for the RocketRide chat UI to render.
What it does
Use this node when an agent needs a chart, graph, or visualization from supplied data rather than a hand-authored configuration. It is an agent tool with a required LLM connection, not a data-flow lane processor. The node validates the LLM's JSON response and wraps it in the rendering fence, so choose it over a generic LLM call when the response must be a Chart.js chart.
Connections
| Connection | Required | Description |
|---|---|---|
llm | yes | LLM used to generate Chart.js configurations from data. |
The node uses the first controller registered under the llm role. If no LLM is connected, generate_chart fails before it can generate a configuration.
As a tool
The server name defaults to chartjs, registering chartjs.generate_chart.
| Function | Description |
|---|---|
chartjs.generate_chart | Generates a static Chart.js JSON configuration from structured data and returns it as a chartjs fenced block. |
chartjs.generate_chart
data is required and must be a non-empty object or array. Optional chart_type is one of bar, line, pie, doughnut, radar, polarArea, scatter, or bubble; title and description must be strings when supplied. The tool returns a string that must be placed verbatim in the answer—do not wrap it in another code fence. Invalid input, a missing LLM, an empty model response, or model output that is not JSON raises an error.
Configuration
The only setting is the hidden server name. Most pipelines should retain the default.
Server name
The server name determines the advertised namespace and defaults to chartjs. Change it only when multiple Chart.js nodes are attached to the same agent and their function names must be distinct; use the corresponding prefix when calling the tool.
Notes
Input shaping
List input is truncated to its first 200 entries before prompting the LLM. The serialized data is also limited to 20,000 characters; oversized serialized input is shortened before it reaches the model. Use summary-sized data when completeness matters, or pre-aggregate a larger export before calling the tool.
Generated configuration
The internal prompt requires type, data with labels and datasets, and options, with responsiveness and aspect-ratio preservation enabled. It also prohibits JavaScript callbacks, so the output is static JSON rather than executable chart code.
Upstream docs
Schema
| Field | Type | Description | Default |
|---|---|---|---|
tool_chartjs.serverName | string | Server name Namespace prefix for the tool: | "chartjs" |