Files
redash/client/app/visualizations/chart/plotly/fixtures/prepareData/pie/without-x.json
Levko Kravets 2c98f0425d Allow the user to decide how to handle null values in charts (#4071)
* getredash/redash#2629 Refactor Chart visualization, add option for handling NULL values (keep/convert to 0.0)

* Handle null values in line/area stacking code; some cleanup

* Handle edge case: line/area stacking when last value of one of series is missing

* Mjnor update to line/area stacking code

* Fix line/area normalize to percents feature

* Unit tests

* Refine tests; add tests for prepareLayout function

* Tests for prepareData (heatmap) function

* Tests for prepareData (pie) function

* Tests for prepareData (bar, line, area) function

* Tests for prepareData (scatter, bubble) function

* Tests for prepareData (box) function

* Remove unused file
2019-09-09 13:00:26 +03:00

54 lines
1.4 KiB
JSON

{
"input": {
"options": {
"globalSeriesType": "pie",
"seriesOptions": {},
"numberFormat": "0,0[.]00000",
"percentFormat": "0[.]00%",
"textFormat": "",
"showDataLabels": true,
"direction": { "type": "counterclockwise" },
"xAxis": { "type": "-", "labels": { "enabled": true } },
"yAxis": [
{ "type": "linear" },
{ "type": "linear", "opposite": true }
],
"series": { "stacking": null, "error_y": { "type": "data", "visible": true } }
},
"data": [
{
"name": "a",
"data": [
{ "x": "a1", "y": 10 },
{ "x": "a2", "y": 60 },
{ "x": "a3", "y": 100 },
{ "x": "a4", "y": 30 }
]
}
]
},
"output": {
"series": [
{
"visible": true,
"values": [10, 60, 100, 30],
"labels": ["Slice 0", "Slice 0", "Slice 0", "Slice 0"],
"type": "pie",
"hole": 0.4,
"marker": {
"colors": ["#356AFF", "#E92828", "#3BD973", "#604FE9"]
},
"hoverinfo": "text+label",
"hover": [],
"text": ["15% (30)", "15% (30)", "15% (30)", "15% (30)"],
"textinfo": "percent",
"textposition": "inside",
"textfont": { "color": "#ffffff" },
"name": "a",
"direction": "counterclockwise",
"domain": { "x": [0, 0.98], "y": [0, 0.9] }
}
]
}
}