egroupware/phpgwapi/js/jquery/jqplot/examples/highlighter.html
Nathan Gray f8489c0ed1 Update jqplot to
jquery.jqplot.1.0.0b2_r947
2011-11-07 20:37:55 +00:00

104 lines
3.1 KiB
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Highlighter Test</title>
<!--[if lt IE 9]><script language="javascript" type="text/javascript" src="../excanvas.js"></script><![endif]-->
<link rel="stylesheet" type="text/css" href="../jquery.jqplot.min.css" />
<link rel="stylesheet" type="text/css" href="examples.css" />
<!-- BEGIN: load jquery -->
<script language="javascript" type="text/javascript" src="../jquery.min.js"></script>
<!-- END: load jquery -->
<!-- BEGIN: load jqplot -->
<script language="javascript" type="text/javascript" src="../jquery.jqplot.min.js"></script>
<script language="javascript" type="text/javascript" src="../plugins/jqplot.dateAxisRenderer.min.js"></script>
<script language="javascript" type="text/javascript" src="../plugins/jqplot.highlighter.min.js"></script>
<script language="javascript" type="text/javascript" src="../plugins/jqplot.cursor.min.js"></script>
<!-- END: load jqplot -->
<script class="code" language="javascript" type="text/javascript">
$(document).ready(function(){
$.jqplot.config.enablePlugins = true;
var s1 = [['23-May-08', 1],['24-May-08', 4],['25-May-08', 2],['26-May-08', 6]];
plot1 = $.jqplot('chart1',[s1],{
title: 'Highlighting',
axes: {
xaxis: {
renderer: $.jqplot.DateAxisRenderer,
tickOptions: {
formatString: '%b %#d, %Y'
},
numberTicks: 4
},
yaxis: {
tickOptions: {
formatString: '$%.2f'
}
}
},
highlighter: {
sizeAdjust: 10,
tooltipLocation: 'n',
useAxesFormatters: false,
formatString: 'Hello %s dayglow %d'
},
cursor: {
show: true,
zoom: true
}
});
});
</script>
<script class="code" language="javascript" type="text/javascript">
$(document).ready(function(){
var s2 = [3,5,7,4,8];
var s3 = [9,11,15,8,15];
var s4 = [8,7,12,18,4];
var s5 = [13,17,21,19,11];
plot2 = $.jqplot('chart2', [s2, s3, s4, s5], {
highlighter: {
bringSeriesToFront: true,
tooltipLocation: 'e',
tooltipOffset: 0,
formatString: '<div class="jqplot-highlighter"><span>Point </span>%s: <strong>%s</strong></div>'
},
series: [
{
highlighter: {
useAxesFormatters: false,
tooltipFormatString: '%6.1f%%'
}
},
{
highlighter: {
formatString: '$%6.2f'
}
}
]
});
});
</script>
<script type="text/javascript" src="example.js"></script>
</head>
<body>
<?php include "topbanner.inc"; ?>
<div class="example-content">
<?php include "nav.inc"; ?>
<div id="chart1" class="plot" style="width:500px;height:300px;"></div>
<div id="chart2" class="plot" style="width:500px;height:300px;"></div>
</div>
</body>
</html>