-
-
Notifications
You must be signed in to change notification settings - Fork 40
Advanced chart options
Rello edited this page Aug 25, 2026
·
12 revisions
Analytics provides common chart settings in the UI. Use Chart options or Data options only when a report needs a Chart.js 4 option that is not exposed there. Invalid JSON or unsupported Chart.js options can prevent a chart from rendering.
Chart options configure the chart and axes; data options configure one series. Consult the Chart.js time-scale documentation for the option model.
Examples:
- Show months rather than days:
{"scales":{"x":{"time":{"unit":"month"}}}} - Parse values such as
12.03:{"scales":{"x":{"time":{"parser":"DD.MM"}}}} - Parse Unix timestamps:
{"scales":{"x":{"time":{"parser":"X"}}}} - Set the primary-axis range:
{"scales":{"primary":{"min":-10,"max":40}}} - Add a primary-axis title:
{"scales":{"primary":{"title":{"display":true,"text":"Duration (ms)"}}}} - Remove a line-area fill for series 0:
{"0":{"fill":false}}
Use JSON booleans (true and false), not quoted strings. For browser-console debugging, the generated Chart.js object is available as OCA.Analytics.chartObject.