Chart rendering uses Plotly with Kaleido and runs synchronously. For large datasets or complex charts, the request may take several seconds to complete. File cleanup is handled in a background task after the response is sent.
Path parameters
The indicator’s unique identifier. Must be a valid MongoDB ObjectId (24-character hex string).
Request body
Data parameters
Aggregation time window for the chart data. Same values as the data points endpoint:
"0" (no aggregation), "1s", "5m", "1h", "1d", "1w", "1M", "1y".Start of the date range to display. ISO 8601 format (e.g.,
"2024-01-01T00:00:00Z").End of the date range to display. ISO 8601 format (e.g.,
"2024-12-31T23:59:59Z").Optional pre-fetched series data. When omitted, data is fetched directly from the database.
Chart configuration
Chart rendering style. Accepted values:
| Value | Description |
|---|---|
line | Line chart |
area | Area chart (filled) |
bar | Bar chart |
column | Column chart |
scatter | Scatter plot |
Determines how x-axis values are interpreted and formatted.
| Value | Description |
|---|---|
datetime | Parse x values as ISO 8601 datetimes |
category | Treat x values as discrete categories |
numeric | Treat x values as continuous numbers |
Title text displayed above the chart.
Whether to render the chart legend.
When set, applies a logarithmic scale to the y-axis. Pass an integer representing the log base.
Visual styling
Chart color theme.
"light" or "dark".Custom color palette as an array of CSS hex strings (e.g.,
["#E74C3C", "#3498DB"]). When omitted, the theme’s default palette is used.When
true, the exported PNG has a transparent background. Set to false to fill the background with the theme’s background color.Annotations
Whether to overlay annotation lines from the indicator’s stored annotations.
Custom annotations configuration object passed directly to the chart renderer. Use this to provide annotations outside of those stored in the database.
Export dimensions
Output image width in pixels.
Output image height in pixels.
Response
Returns the chart as a binary PNG image.| Header | Value |
|---|---|
Content-Type | image/png |
Content-Disposition | attachment; filename=indicator_{indicator_id}.png |