Search code examples
legendboxplotzingchart

Is it a bug in zingchart ( boxplot legend )


I am trying to draw a boxplot using zingchart. I need a legend for the chart, but the legend generated is wrong. is it a bug in zingchart?

Below is the json passed in:

    {
    "type": "boxplot",
    "vertical-labels": true,
    "legend":{},
    "scale-x": {
        "labels": []
    },
    "series": [
        {
            "data-box": [ [760, 801, 848, 895, 965 ],[733, 853, 939, 980, 1080 ]],
            "text":"f1"

        },
        {
            "data-box": [[733, 853, 939, 980, 1080 ],[733, 853, 939, 980, 1080 ]],
            "text":"f2"
        }
            ]
}

And this is the genrated boxplot, which should have two series, but it generated four series. Boxplot

Is it a bug or I passed the wrong json data? Thanks in advance.


Solution

  • sinsin.

    Sorry to see that you're having an issue with our boxplot module. However, this is an issue with the boxplot module itself, and not anything you did! I'm on the ZingChart support team, so I'll be sure to pass this on to our developers. In the meantime, you can create your own legend using shapes with labels on those shapes, as I've done here.

    I'm a big fan of boxplot charts, but this is a relatively new ZingChart module, and it looks like it needs some more love.