Hi there, Sorry for the delay :-) I have a couple of remarks on what you sent here: 1. You can only use data.setValue after you assign a data cell (i.e. either use the data.addRow or data.addRows prior to the usage of this function) 2. You cannot use data.setFormattedValue to a non assigned value cell. You first need to assign a value to the cell and only then format it. 3. Can you explain the "tooltip: tooltipStrings"? Unless you defined a string with that name and assigned a value to it, nothing will run.
Besides that all is OK and fully functional. On Sat, Dec 3, 2011 at 7:36 PM, padmasree vadlamudi < [email protected]> wrote: > hi > i have tried setFormattedValue but its not working .For data.setcell we > can able to be add the extra data what we want.in the way want to add > data using data .setValue > > > this is my code can u help me > > <!DOCTYPE html> > <html lang="en"> > <head> > <script type="text/javascript" src="https://www.google.com/jsapi > "></script> > <script type="text/javascript"> > google.load("visualization", "1", {packages:["corechart"]}); > google.setOnLoadCallback(drawChart); > function drawChart() { > var data = new google.visualization.DataTable(); > data.addColumn('string', 'Year'); > data.addColumn('number', 'Actual'); > data.addColumn('number', 'Target'); > data.addColumn('number', 'Description'); > data.setValue(0,0,'XYZ'); > data.setValue(0,1,23); > data.setValue(0,2,30); > data.setFormattedValue(0,3, 'test sample data'); > var chart = new > google.visualization.ColumnChart(document.getElementById('chart_div')); > > chart.draw(data, { width: 850, height: 500, title: 'Test',tooltip: > tooltipStrings, > vAxis: { title: 'Range', titleTextStyle: { color: 'red'} }, > hAxis: { title: 'Parameters', titleTextStyle: { color: > 'green'},slantedText: 'true',slantedTextAngle:30,showTextEvery:1 }, > > > legend: 'none', colors: ['#3366CC', '#DC3912'] > }); > } > </script> > </head> > <body> > <div id="chart_div"></div> > </body> > </html> > > > In the tooltip we are able to able x-axis lables and value of the bars > .now in tooltip i want some thing like x-axis lables ,values of the bar and > test sample data > > On Sat, Dec 3, 2011 at 8:10 PM, Roni Biran <[email protected]> wrote: > >> you can use the setFormattedValue to set the tooltip format. >> Is that where you're going? >> >> >> On Sat, Dec 3, 2011 at 11:35 AM, sree <[email protected]>wrote: >> >>> how to add tooltip text to data.setValue >>> >>> -- >>> You received this message because you are subscribed to the Google >>> Groups "Google Visualization API" group. >>> To post to this group, send email to >>> [email protected]. >>> To unsubscribe from this group, send email to >>> [email protected]. >>> For more options, visit this group at >>> http://groups.google.com/group/google-visualization-api?hl=en. >>> >>> >> -- >> You received this message because you are subscribed to the Google Groups >> "Google Visualization API" group. >> To post to this group, send email to >> [email protected]. >> To unsubscribe from this group, send email to >> [email protected]. >> For more options, visit this group at >> http://groups.google.com/group/google-visualization-api?hl=en. >> > > > > -- > Regards, > > Padmasree > > -- > You received this message because you are subscribed to the Google Groups > "Google Visualization API" group. > To post to this group, send email to > [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group at > http://groups.google.com/group/google-visualization-api?hl=en. > -- You received this message because you are subscribed to the Google Groups "Google Visualization API" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/google-visualization-api?hl=en.
