Issue with any chart widget: not showing second series

0
Hi all, I’m trying to show two series with the any chart widget. However, the widget shows only the first serie of data (in this case budget). I would like to group the two series (both budget and spend). The data of the second series (spend) is in the same way retrieved as the first one. I used {“barmode”: “group”} but this didn’t had any effect. Is there anyone who can help me with the next step to show 2 series? Thanks in advance, Alain
asked
4 answers
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

answered
0

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

answered
0

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
    ]
  }
]

 

answered
0

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"
    ]
  }
]

 

answered