Current File : //home/tradevaly/www/node_modules/jquery.flot.tooltip/examples/basic.html |
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>flot.tooltip plugin example page</title>
<meta name="author" content="@kenirwin">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<script src="http://code.jquery.com/jquery-1.8.3.min.js"></script>
<script src="js/jquery.flot.js"></script>
<script src="../js/jquery.flot.tooltip.js"></script>
</head>
<body>
<h1>Flot Tooltip Basic Example</h1>
<div id="chart" style="width:600px;height:150px;"></div>
<script>
$(function () {
var chartOptions = {
series: {
lines: { show: true },
points: { show: true }
},
grid: { hoverable: true }, //important! flot.tooltip requires this
tooltip: {
show: true,
content: "%s | x: %x; y: %y"
}
};
var chartData = { label: "Sample Data", data: [
[1,6],
[2,3],
[3,9],
[4,4],
[5,2]
]};
$.plot($("#chart"), [chartData], chartOptions);
});
</script>