egroupware_official/phpgwapi/js/jquery/jqplot/examples/highlighter.html

104 lines
3.1 KiB
HTML
Raw Normal View History

2011-08-10 01:10:50 +02:00
<!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" />
2011-08-10 01:10:50 +02:00
<link rel="stylesheet" type="text/css" href="examples.css" />
<!-- BEGIN: load jquery -->
<script language="javascript" type="text/javascript" src="../jquery.min.js"></script>
2011-08-10 01:10:50 +02:00
<!-- 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>
2011-08-10 01:10:50 +02:00
<!-- END: load jqplot -->
<script class="code" language="javascript" type="text/javascript">
2011-08-10 01:10:50 +02:00
$(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]];
2011-08-10 01:10:50 +02:00
plot1 = $.jqplot('chart1',[s1],{
2011-08-10 01:10:50 +02:00
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
}
});
2011-08-10 01:10:50 +02:00
});
</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];
2011-08-10 01:10:50 +02:00
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'
}
}
]
});
});
2011-08-10 01:10:50 +02:00
</script>
<script type="text/javascript" src="example.js"></script>
2011-08-10 01:10:50 +02:00
</head>
<body>
<?php include "topbanner.inc"; ?>
<div class="example-content">
<?php include "nav.inc"; ?>
2011-08-10 01:10:50 +02:00
<div id="chart1" class="plot" style="width:500px;height:300px;"></div>
<div id="chart2" class="plot" style="width:500px;height:300px;"></div>
</div>
</body>
2011-08-10 01:10:50 +02:00
</html>