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
this actual data
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
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
Post a Comment