mirror of
https://github.com/getredash/redash.git
synced 2026-03-22 19:00:09 -04:00
* 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
58 lines
1.4 KiB
JSON
58 lines
1.4 KiB
JSON
{
|
|
"input": {
|
|
"options": {
|
|
"globalSeriesType": "pie",
|
|
"seriesOptions": {},
|
|
"numberFormat": "0,0[.]00000",
|
|
"percentFormat": "0[.]00%",
|
|
"textFormat": "",
|
|
"showDataLabels": false,
|
|
"direction": { "type": "counterclockwise" },
|
|
"xAxis": { "type": "-", "labels": { "enabled": true } },
|
|
"yAxis": [
|
|
{ "type": "linear" },
|
|
{ "type": "linear", "opposite": true }
|
|
],
|
|
"series": { "stacking": null, "error_y": { "type": "data", "visible": true } },
|
|
"columnMapping": {
|
|
"x": "x",
|
|
"y": "y"
|
|
}
|
|
},
|
|
"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": ["a1", "a2", "a3", "a4"],
|
|
"type": "pie",
|
|
"hole": 0.4,
|
|
"marker": {
|
|
"colors": ["#356AFF", "#E92828", "#3BD973", "#604FE9"]
|
|
},
|
|
"hoverinfo": "text+label",
|
|
"hover": [],
|
|
"text": ["5% (10)", "30% (60)", "50% (100)", "15% (30)"],
|
|
"textinfo": "none",
|
|
"textposition": "inside",
|
|
"textfont": { "color": "#ffffff" },
|
|
"name": "a",
|
|
"direction": "counterclockwise",
|
|
"domain": { "x": [0, 0.98], "y": [0, 0.9] }
|
|
}
|
|
]
|
|
}
|
|
}
|