跳到主要内容

Reports widget override examples - 知识库 / Deskpro Legacy - Deskpro Support

WARNING: You're browsing documentation for an older version of Deskpro. For the most up-to-date version, see: Examples of Overriding Report Widgets

Reports widget override examples

作者列表

You can format  charts in Reports v2 using JSON with our Widgets Override option. 

You can find the official documentation here: https://docs.amcharts.com/3/javascriptcharts/AmChart but we have included some examples below. You can see the differences in the pie chart after our custom JSON was added.


1) You can use the following format to change the font of the legend and labels of a pie chart:

{"fontFamily":"Georgia","fontSize":15}




2) Here we are removing the legend and labels from the pie chart:

{"legend":false,"labelsEnabled":false,"categoryAxis":{"labelRotation":45,"title":null}}

Hovering your mouse over the chart allows the details to display.



More information about standard AmCharts options could be found here.

You may be particularly interested in: AmBalloon, CategoryAxis, ValueAxes, AmGraph, AmLegend or AmBalloon.


3) In the following example, we have customized the colors of the SLA categories in the pie chart:

{"pieColors": {"ok": "#008000", "fail": "#f80000", "warning": "#fde910"}}






有帮助 没有帮助

105 人中 65 人认为这个页面有帮助

Comments (3)

Gregory Gutshall
Note: The AmCharts library states that the legend JSON tag is an Object. So, you need to specify your values within that JSON object. Like, {"legend": {"enabled": true}}
Andrea Steele
Do you have examples of how to change other Widget types? e.g. line charts.
Christine Loh
A detailed step-by-step guide to change the colour of graphs can be found here: https://support.deskpro.com/en-GB/kb/articles/customising-colour-of-charts-on-report-custom-dashboards

添加一条评论

请登录或注册以提交评论。

是否需要密码提醒?