JavaScript
var data_line = {
labels: ["January", "February", "March", "April", "May", "June", "July"],
datasets: [
{
label: "My First dataset",
fillColor: "rgba(220,220,220,0.2)",
strokeColor: "rgba(220,220,220,1)",
pointColor: "rgba(220,220,220,1)",
pointStrokeColor: "#fff",
pointHighlightFill: "#fff",
pointHighlightStroke: "rgba(220,220,220,1)",
data: [65, 59, 80, 81, 56, 55, 40]
},
{
label: "My First dataset",
fillColor: "rgba(220,220,220,0.2)",
strokeColor: "rgba(220,220,220,1)",
pointColor: "rgba(220,220,220,1)",
pointStrokeColor: "#fff",
pointHighlightFill: "#fff",
pointHighlightStroke: "rgba(220,220,220,1)",
data: [15, 19, 10, 31, 56, 45, 20]
}
]
};
var options =
{
tooltipTemplate: "<%= value %>",
showTooltips: true,
onAnimationComplete: function()
{
this.showTooltip(this.datasets[0, 1].points, true);
},
tooltipEvents: []
}
var context = $('#chart3').get(0).getContext('2d');
var chart = new Chart(context).Line(data_line, options);