Bubble Chart in ZingChart library: Making Bubble size scale independent of y-axis value

StackOverflow https://stackoverflow.com/questions/17145085

  •  31-05-2022
  •  | 
  •  

문제

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?

도움이 되었습니까?

해결책

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]]
    }
]
}
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top