Files
redash/client/app/visualizations/chart/plotly/fixtures/prepareData/bar/stacked.json

82 lines
2.2 KiB
JSON

{
"input": {
"options": {
"globalSeriesType": "column",
"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": "stack", "error_y": { "type": "data", "visible": true } },
"seriesOptions": {
"a": { "type": "column", "color": "red" },
"b": { "type": "column", "color": "blue" }
},
"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 }
]
},
{
"name": "b",
"data": [
{ "x": "x1", "y": 1, "yError": 0 },
{ "x": "x2", "y": 2, "yError": 0 },
{ "x": "x3", "y": 3, "yError": 0 },
{ "x": "x4", "y": 4, "yError": 0 }
]
}
]
},
"output": {
"series": [
{
"visible": true,
"type": "bar",
"name": "a",
"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"],
"textposition": "inside",
"marker": { "color": "red" },
"insidetextfont": { "color": "#ffffff" },
"yaxis": "y"
},
{
"visible": true,
"type": "bar",
"name": "b",
"x": ["x1", "x2", "x3", "x4"],
"y": [1, 2, 3, 4],
"error_y": { "array": [0, 0, 0, 0], "color": "blue" },
"hoverinfo": "text+x+name",
"hover": [],
"text": ["1 ± 0", "2 ± 0", "3 ± 0", "4 ± 0"],
"textposition": "inside",
"marker": { "color": "blue" },
"insidetextfont": { "color": "#ffffff" },
"yaxis": "y"
}
]
}
}