Amcharts
Below is an example configuration of a panel using the Amcharts module:
{
"title": "Supplier Screening Status",
"width": 12,
"height": 500,
"full_row": True,
"type": "StackedColumnPercentageSeriesVertical",
"url_name": "frame_amcharts",
"url_action_name": "chart_supplierscreening",
"name": "chart_supplierscreening",
"content": {
"view": custom_views.AmchartsAPIStackedColumnPercentageSeriesChartTier,
"view_params": {
"model": custom_models.SupplierScreening,
"decimal_rounding": 0,
"group_by": [
"tier",
"casestatus__name",
],
"order_by": "tier",
"amcharts_categoryX": "tier",
"amcharts_valueY": "casestatus__name",
"aggregations": [
{
"function": "Count",
"value": "id",
},
],
},
},
},
The view_params are:
model: the model this table is based on
decimal_rounding controls the precision of numerical data display.
group_by and order_by determine how the data is organized.
amcharts_categoryX and amcharts_valueY map data fields to chart axes.
aggregations specify how to summarize the data (e.g., counting records).

Last updated