You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
46 lines
1.1 KiB
46 lines
1.1 KiB
1 year ago
|
<!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>
|