sajeevi.b...@gmail.com
unread,Jun 24, 2009, 6:05:41 AM6/24/09Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Google Visualization API
Hi Team,
I can add string for first column to scatterChart if there are two
columns.
function drawChart() {
var data = new google.visualization.DataTable();
data.addColumn('string', 'Name');
data.addColumn('number', 'Sub1 Marks');
data.addRows(3);
data.setCell(0, 0, 'S1');
data.setCell(0, 1, 65);
data.setCell(1, 0, 'S2');
data.setCell(1, 1, 89);
data.setCell(2, 0, 'S3');
data.setCell(2, 1, 76);
var chart = new google.visualization.ScatterChart
(document.getElementById('chart_div'));
chart.draw(data, {width: 400, height: 240, titleX:
'Name',titleY: 'Marks', legend: 'none', pointSize: 5});
}
if if there are more than two columns and if the first column be
string as above the chart is not what i expect.
function drawChart() {
var data = new google.visualization.DataTable();
data.addColumn('string', 'Name');
data.addColumn('number', 'Sub1 Marks');
data.addColumn('number', 'Sub2 Marks');
data.addRows(3);
data.setCell(0, 0, 'S1');
data.setCell(0, 1, 65);
data.setCell(0, 2, 45);
data.setCell(1, 0, 'S2');
data.setCell(1, 1, 89);
data.setCell(1, 2, 48);
data.setCell(2, 0, 'S3');
data.setCell(2, 1, 76);
data.setCell(2, 2, 58);
var chart = new google.visualization.ScatterChart
(document.getElementById('chart_div'));
chart.draw(data, {width: 400, height: 240, titleX:
'Name',titleY: 'Marks', legend: 'none', pointSize: 5});
}
please help me to add string for the first column if there are more
than one columns. i need to display string values for the x-axis
values rather than numbers.
Thanks & best Regards,
Sajeevi