Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.cometly.com/llms.txt

Use this file to discover all available pages before exploring further.

Returns a populated Chart.js v4 config skeleton for a given chart type. Saves the agent from reinventing the config shape — which is where most malformed-chart errors come from.

Parameters

ParameterTypeRequiredDescription
chart_typestringYesline, bar, pie, doughnut, radar, or stacked_bar.

Output

{
  "type": "bar",
  "data": {
    "labels":   ["<x_label_1>", "<x_label_2>"],
    "datasets": [{ "label": "<series_name>", "data": ["<y_value_1>", "<y_value_2>"] }]
  },
  "options": {
    "responsive": true,
    "plugins":    { "legend": { "position": "top" }, "title": { "display": true, "text": "<chart_title>" } },
    "scales":     { "y": { "beginAtZero": true } }
  }
}
The agent populates data.labels and data.datasets[].data from the analytics tool result, then renders inside Ask AI’s chart block.