javascript - Google chart stacked column chart. How to style each individual stacked item (data series) -


i've built google chart stacked column chart. able annotate each stacked item. when comes styling each column item, last stacked item effected.

working code last stacked item:

// create data table. var data = google.visualization.arraytodatatable([     ['genre', '', "label", { role: 'annotation', role:'style' } ],     ['column1', 5, 11, 31,  'opacity: 0.2'],     ['column2', 5, 12, 32,  'opacity: 0.2'],     ['column3', 5, 13, 33,  'opacity: 0.2'],     ['column4', 5, 14, 34,  'opacity: 0.2'],     ['column5', 5, 15, 35,  'opacity: 0.2'],     ['column6', 5, 26, 36,  'opacity: 0.2'] ]); 

i've played around code lot receive error. apply styles each of series of data in each data row(stacked columns).

sets style charts, last chart.

var data = google.visualization.arraytodatatable([     ['genre', 'label1', { role: 'annotation', role:'style' }, 'label2', { role: 'annotation', role:'style' }, 'label3', { role: 'annotation', role:'style' } ],     ['column1', 5,  'opacity: 0.2', 11,  'opacity: 0.2', 31,  'opacity: 0.2'],     ['column2', 5,  'opacity: 0.2', 12,  'opacity: 0.2', 32,  'opacity: 0.2'],     ['column3', 5,  'opacity: 0.2', 13,  'opacity: 0.2', 33,  'opacity: 0.2'],     ['column4', 5,  'opacity: 0.2', 14,  'opacity: 0.2', 34,  'opacity: 0.2'],     ['column5', 5,  'opacity: 0.2', 15,  'opacity: 0.2', 35,  'opacity: 0.2'],     ['column6', 5,  'opacity: 0.2', 26,  'opacity: 0.2', 36,  'opacity: 0.2'] ]); 

jsfiddle

ps : forgot 1 index in label array


Comments

Popular posts from this blog

Payment information shows nothing in one page checkout page magento -

tcpdump - How to check if server received packet (acknowledged) -