google visualization - How do I grouping data in geochart using tooltip column values? -


i using geochart display following data in country map

i have plotted map using state cloumn , totalsales($) value column

now ,the tooltip displays : id totalsales($_113607.00)

i have following summary data in datatable

enter image description here

this actual data

enter image description here

now have added more columns(city,brandname) break data summary data first table

the tooltip displays : va totalsales($_:34943(city fairfax(brandname sony)))- wrong

but want display tooltip : va totalsales($_:7768(city fairfax(brandname sony))) - correct

this data display tooltip

enter image description here

from these, got , geochart takes last row display tooltip,but want display particular brand's totalsales i.e sony -7768$

how do this?

you can group data in geo chart using categoryfilter control. can group data in way.

        var categorypicker = new google.visualization.controlwrapper({         controltype: 'categoryfilter',         containerid: 'brandname',         options: {             filtercolumnindex: 3, // filter brand name             ui: {                 caption: 'choose brand',                 sortvalues: true,                 allownone: true,                 allowmultiple: false,                 allowtyping: true             }         },           state:          {         selectedvalues: ['samsung']     }     }); 

here working sample jqfaq.com. hope you.


Comments

Popular posts from this blog

javascript - Count length of each class -

What design pattern is this code in Javascript? -

hadoop - Restrict secondarynamenode to be installed and run on any other node in the cluster -