Question

I have been trying to plot a bubble chart using zingchart library. I did not find any option by which we can make bubble radius value independent of y-axis scale. For example in googlecharts bubble radius does not depend on y-axis scale (observe that in given example fertility rate is in single digits where as population(bubble size) is in millions). If we try the same example on zingchart, chart will be flooded since bubble size considers y-axis scale. How to achieve this feature in zingchart?

Was it helpful?

Solution

I'm on the team here at ZingChart. There is an attribute you can use to adjust the bubble radius that is not dependent on "scale-y":{}. Here is some code that will be helpful.

    {
"type":"bubble",

"plot":{
    "max-size":200   */the "max-size": attribute accepts numeric values and will adjust the radius of the bubbles independently from the y axis values/*
},
"scale-y":{
    "values":"0:20:5",

},
"series":[
    {
        "values":[[1,15,4],
        [2,4,2],
        [5,10,1],
        [6,7,3],
        [3,6,2],
        [7,15,1],
        [8,2,4],
        [1,7,3],
        [2,12,3],
        [4,4,4],
        [5,1,2],
        [6,3,1],
        [8,16,2]]
    },
    {
        "values":[[3,5,1],
        [2,17,2],
        [8,8,3],
        [4,6,2],
        [7,3,4],
        [2,12,1],
        [1,4,1],
        [6,2,2],
        [4,10,3],
        [6,14,2],
        [2,6,2]]
    },
    {
        "values":[[3,11,4],
        [6,7,4],
        [8,14,3],
        [3,2,3],
        [5,5,2],
        [7,10,2],
        [2,1,1],
        [7,4,1],
        [6,16,2],
        [1,8,3],
        [5,14,1]]
    }
]
}
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top