JavaScript
google.load("visualization", "1", {
packages: ["corechart"]
});
google.setOnLoadCallback(drawChart_1);
google.setOnLoadCallback(drawChart_2);
function drawChart_1() {
var data = google.visualization.arrayToDataTable([
["Y", "Your X & Y", "Product 1", "Product 2", "Product 3"],
[419, 589, null, null, null],
[386, null, 504, null, null],
[386, null, 526, null, null],
[387, null, 543, null, null],
[395, null, 564, null, null],
[402, null, 591, null, null],
[408, null, 612, null, null],
[378, null, null, 501, null],
[398, null, null, null, 600],
[460, null, null, null, 500]
]);
var options = {
title: 'Multiple lines: y values with non-sharing x points',
pointSize: 10
};
var chart = new google.visualization.LineChart(document.getElementById('chart_div_1'));
chart.draw(data, options);
}
function drawChart_2() {
var data = google.visualization.arrayToDataTable([
["Y","Your X & Y","Product 1","Product 2","Product 3","Tooltip"],[419,589,null,null,null,"tooltip info about your x & y"],[386,null,504,null,null,"tooltip info about "],[386,null,526,null,null,"tooltip info about "],[387,null,543,null,null,"tooltip info about "],[395,null,564,null,null,"tooltip info about "],[402,null,591,null,null,"tooltip info about "],[408,null,612,null,null,"tooltip info about "],[378,null,null,501,null,"tooltip info about "],[383,null,null,511,null,"tooltip info about "],[387,null,null,526,null,"tooltip info about "],[392,null,null,541,null,"tooltip info about "],[396,null,null,556,null,"tooltip info about "],[401,null,null,571,null,"tooltip info about "],[405,null,null,586,null,"tooltip info about "],[368,null,null,null,526,"tooltip info about "],[373,null,null,null,547,"tooltip info about "],[378,null,null,null,568,"tooltip info about "],[383,null,null,null,589,"tooltip info about "],[388,null,null,null,610,"tooltip info about "]
...