javascript - Changing Google Chart Visual's Graph Hovers -
in google charts making column chart. problem having not being able format bar description liking. have chart work issue not change labels show things want to.
here table (created file):
(index filter)| . | cola | cola | colb | colb | col... colname | . | choicea | choiceb | choicea | choiceb | cola | 12/2017| 10 | 7 | 3 | 6 | colb | 01/2017| 55 | 11 | 4 | 9 | colc | 05/2017| 2 | 32 | 41 | 44 | col... | 06/2017| 11 | 64 | 17 | 7 | | 05/2017| 19 | 12 | 26 | 21 | | 08/2017| 22 | 16 | 33 | 18 | | 04/2017| 31 | 32 | 14 | 3 | here options getting (boxed in black):
here options want show (boxed in red: notice how 2005/06 changed cola , line below either choicea or choiceb): 
google charts allows 1 string , values after charts. way want run x-axis equal date column , nothing else. working tsv file individual changes rows (like in tooltips references have read) not work. post code function creating graph below.
what asking is:
a.) possible do
b.) best way be?
code creating graph:
function drawchart6(data) { //creates data table data pulled in tsv file var table = new google.visualization.datatable(); var data = data; console.log(data); var datarows = data.split("\n"); var headers = datarows[0].split('\t'); table.addcolumn('string', headers[0]); table.addcolumn('string', headers[1]); table.addcolumn('number', headers[2]); table.addcolumn('number', headers[3]); var rs = []; (var x=1; x<(datarows.length); x++) { var cols = datarows[x].split('\t'); var row = []; row.push(cols[0]); row.push(cols[1]); row.push(parseint(cols[2])); row.push(parseint(cols[3])); rs.push(row); } table.addrows(rs); //var table = google.visualization.arraytodatatable(rs); // create dashboard bind filter chart var dashboard = new google.visualization.dashboard(document.getelementbyid('combochartdash')); var colfilter= new google.visualization.controlwrapper({ 'controltype': 'categoryfilter', 'containerid': 'columnfilter', 'options': { 'filtercolumnindex' : 0, 'ui': { 'allowtyping': false, 'allowmultiple': true, 'selectedvalueslayout': 'belowstacked', 'label': 'select column:'} } }); //chart options , chart type var chart = new google.visualization.chartwrapper({ 'charttype': 'combochart', 'containerid': 'combochart', 'options': { 'left': '25%', 'height': '80%', 'width': '80%', 'bar': {'groupwidth': '95%'}, 'legend':{'position': 'none'}, 'haxis': {'title': "date"}, 'width':800, 'height':600} }); dashboard.bind([colfilter], chart); //binds filters , chart dashboard.draw(table); }
Comments
Post a Comment