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

133 lines
3.5 KiB
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<!-- Use Compatibility mode in IE -->
<title>Bar Charts</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.barRenderer.min.js"></script>
<script language="javascript" type="text/javascript" src="../plugins/jqplot.categoryAxisRenderer.min.js"></script>
<script language="javascript" type="text/javascript" src="../plugins/jqplot.cursor.min.js"></script>
<!-- END: load jqplot -->
<style type="text/css">
.jqplot-target {
margin-bottom: 2em;
}
pre {
background: #D8F4DC;
border: 1px solid rgb(200, 200, 200);
padding-top: 1em;
padding-left: 3em;
padding-bottom: 1em;
margin-top: 1em;
margin-bottom: 4em;
}
p {
margin: 2em 0;
}
.note {
font-size: 0.8em;
}
</style>
<script class="code" type="text/javascript">
$(document).ready(function(){
var s1 = [200, 600, 700, 1000];
var s2 = [460, -210, 690, 820];
var s3 = [-260, -440, 320, 200];
var ticks = ['a', 'b', 'c', 'd'];
plot1 = $.jqplot('chart1', [s1, s2, s3], {
seriesDefaults:{
renderer:$.jqplot.BarRenderer,
rendererOptions: {fillToZero: true}
},
series:[
{label:'Hotel'},
{label:'Event Regristration'},
{label:'Airfare'}
],
legend: {
show: true,
placement: 'outsideGrid'
},
axes: {
xaxis: {
renderer: $.jqplot.CategoryAxisRenderer,
ticks: ticks
},
yaxis: {
autoscale: true,
tickOptions: {formatString: '$%d'}
}
}
});
});
</script>
<script class="code" type="text/javascript">
$(document).ready(function(){
var s1 = [[2006, 850], [2007, 960], [2008, 700], [2009, 600], [2010, 700], [2011, 900]];
plot2 = $.jqplot('chart2', [s1], {
cursor: {
show: true,
zoom: true
},
seriesDefaults:{
renderer:$.jqplot.BarRenderer,
rendererOptions: {fillToZero: true}
},
series:[
{label:'Hotel'},
{label:'Event Regristration'},
{label:'Airfare'}
],
legend: {
show: true,
placement: 'outsideGrid'
},
axes: {
xaxis: {
renderer: $.jqplot.CategoryAxisRenderer
},
yaxis: {
autoscale: true,
tickOptions: {formatString: '$%d'}
}
}
});
});
</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" style="margin-top:20px; margin-left:20px; width:600px; height:300px;"></div>
<div id="chart2" style="margin-top:20px; margin-left:20px; width:600px; height:300px;"></div>
</div>
</body>
</html>