Bubble chart to display very small & very large values, (multiplication does not work to balance the values)

108 views
Skip to first unread message

Theo Zizic

unread,
Dec 10, 2012, 1:55:42 PM12/10/12
to google-visua...@googlegroups.com
Hi all,

I urgently need help with a bubble chart. My problem is that I need to display very small numbers on the x axis (eg 0.2345, 0.2678) while at the same time on the y axis very large numbers in millions.

So i ve thought of multiplying the small numbers by the same lets say 10000 factor. However multiplication does not work. The bubbles are still centered around 0


           myarray.setValue(i, 2, Math.round(parseFloat(item.TotalCrimes.value)*10000));
                    
                        
                    var options = {
                    colorAxis: {colors: ['blue', 'red']},
                    sizeAxis: {minValue: 0,  maxSize: 50},
                    hAxis: {title: 'a title', maxValue: '300000', titleTextStyle: {color:'red', fontSize: 22}, textStyle: {fontSize: 17}, logScale: 'false',gridlines:{count: 7}},
                    vAxis: {title: another title', titleTextStyle: {color: 'red', fontSize: 24}, logScale: 'false',gridlines:{count: 3}},
                    chartArea:{left:160,top:80},  

Please if anyone has an idea help

asgallant

unread,
Dec 10, 2012, 5:30:42 PM12/10/12
to google-visua...@googlegroups.com
The x and y axis scales should be independent of one another.  The problem is that you are setting hAxis.maxValue to 300000, which is what causes all of your circles to draw at the origin.  Remove the maxValue from hAxis and you should be fine.

Parasound

unread,
Dec 10, 2012, 5:33:04 PM12/10/12
to google-visua...@googlegroups.com
Thanks asgallant

Theo Zizic

unread,
Dec 10, 2012, 5:37:37 PM12/10/12
to google-visua...@googlegroups.com
Well, I should be thanking?


although my problem is that I cannot now display any value of type 0.3552 as a String.

Thanks again.

Parasound

unread,
Dec 10, 2012, 5:43:13 PM12/10/12
to google-visua...@googlegroups.com
Sorry to have jumped in but I had recently a similar issue

asgallant

unread,
Dec 10, 2012, 5:46:22 PM12/10/12
to google-visua...@googlegroups.com
X coordinates, Y coordinates, color gradient values, and bubble size values must all be number data types, not strings.
Reply all
Reply to author
Forward
0 new messages