Files
redash/client/app/visualizations/chart/plotly/fixtures/prepareData/scatter/default.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

57 lines
1.5 KiB
JSON

{
"input": {
"options": {
"globalSeriesType": "scatter",
"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 } },
"seriesOptions": {
"a": { "type": "scatter", "color": "red" }
},
"columnMapping": {
"x": "x",
"y1": "y"
},
"missingValuesAsZero": true
},
"data": [
{
"name": "a",
"data": [
{ "x": "x1", "y": 10, "yError": 0 },
{ "x": "x2", "y": 20, "yError": 0 },
{ "x": "x3", "y": 30, "yError": 0 },
{ "x": "x4", "y": 40, "yError": 0 }
]
}
]
},
"output": {
"series": [
{
"visible": true,
"name": "a",
"type": "scatter",
"mode": "markers+text",
"x": ["x1", "x2", "x3", "x4"],
"y": [10, 20, 30, 40],
"error_y": { "array": [0, 0, 0, 0], "color": "red" },
"hoverinfo": "text+x+name",
"hover": [],
"text": ["10 ± 0", "20 ± 0", "30 ± 0", "40 ± 0"],
"marker": { "color": "red" },
"insidetextfont": { "color": "#333333" },
"yaxis": "y"
}
]
}
}