Hi,
This is working JSON with 3 lines. Maybe it will help you.
[
{
"x": [
"03/2020",
"04/2020",
"05/2020",
"06/2020",
"07/2020",
"08/2020",
"09/2020",
"10/2020",
"11/2020",
"12/2020",
"01/2021",
"02/2021",
"03/2021"
],
"y": [
0,
0,
0,
0,
0,
0,
0,
2,
3,
0,
0,
0,
0
]
},
{
"x": [
"04/2020",
"05/2020",
"06/2020",
"07/2020",
"08/2020",
"09/2020",
"10/2020",
"11/2020",
"12/2020",
"01/2021",
"02/2021",
"03/2021"
],
"y": [
0,
0,
0,
0,
0,
0,
1,
3,
0,
0,
0,
0
]
},
{
"x": [
"04/2020",
"05/2020",
"06/2020",
"07/2020",
"08/2020",
"09/2020",
"10/2020",
"11/2020",
"12/2020",
"01/2021",
"02/2021",
"03/2021"
],
"y": [
0,
0,
0,
0,
0,
0,
0,
2,
0,
0,
0,
0
]
}
]
Hi,
can you post the JSON you generated?
The problem might be that your JSON is not correct or something is missing.
BR.
Dalibor
Hi Dalibor,
Thanks for your reply. This is the JSON:
[
{
"x": [
"Department 1",
"Department 2",
"Department 3",
"Department 4",
"Department 5"
],
"y": [
2.1,
4.3,
3.5,
5.6,
4.3,
9.3
],
"type": "bar",
"orientation": "v",
"Spend": [
2.1,
4.3,
3.5,
5.6,
4.3,
9.3
],
"typeSpend": "bar",
"orientationSpend": "v",
"xSpend": [
"Department 1",
"Department 2",
"Department 3",
"Department 4",
"Department 5"
]
}
]
KR,
Alain
You are missing the second values. here is your JSON with added second bar.
[
{
"x": [
"Department 1",
"Department 2",
"Department 3",
"Department 4",
"Department 5"
],
"y": [
2.1,
4.3,
3.5,
5.6,
4.3,
9.3
],
"type": "bar",
"orientation": "v",
"Spend": [
2.1,
4.3,
3.5,
5.6,
4.3,
9.3
],
"typeSpend": "bar",
"orientationSpend": "v",
"xSpend": [
"Department 1",
"Department 2",
"Department 3",
"Department 4",
"Department 5"
]
},
{
"x": [
"Department 1",
"Department 2",
"Department 3",
"Department 4",
"Department 5"
],
"y": [
9.1,
8.3,
7.5,
6.6,
5.3,
4.3
],
"type": "bar",
"orientation": "v",
"Spend": [
9.1,
8.3,
7.5,
6.6,
5.3,
4.3
],
"typeSpend": "bar",
"orientationSpend": "v",
"xSpend": [
"Department 1",
"Department 2",
"Department 3",
"Department 4",
"Department 5"
]
}
]