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">
|
|
|
|
<!-- Use Compatibility mode in IE -->
|
|
|
|
<title>Bar Charts</title>
|
|
|
|
<!--[if lt IE 9]><script language="javascript" type="text/javascript" src="../excanvas.js"></script><![endif]-->
|
|
|
|
|
2011-11-07 21:37:55 +01:00
|
|
|
<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 -->
|
2011-11-07 21:37:55 +01:00
|
|
|
<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 -->
|
2011-11-07 21:37:55 +01:00
|
|
|
<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>
|
2011-08-10 01:10:50 +02:00
|
|
|
<!-- 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>
|
|
|
|
|
2011-11-07 21:37:55 +01:00
|
|
|
<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>
|
2011-08-10 01:10:50 +02:00
|
|
|
|
|
|
|
</head>
|
|
|
|
<body>
|
2011-11-07 21:37:55 +01:00
|
|
|
<?php include "topbanner.inc"; ?>
|
|
|
|
<div class="example-content">
|
|
|
|
<?php include "nav.inc"; ?>
|
2011-08-10 01:10:50 +02:00
|
|
|
|
|
|
|
<div id="chart1" style="margin-top:20px; margin-left:20px; width:600px; height:300px;"></div>
|
2011-11-07 21:37:55 +01:00
|
|
|
<div id="chart2" style="margin-top:20px; margin-left:20px; width:600px; height:300px;"></div>
|
2011-08-10 01:10:50 +02:00
|
|
|
|
2011-11-07 21:37:55 +01:00
|
|
|
|
|
|
|
</div>
|
|
|
|
</body>
|
2011-08-10 01:10:50 +02:00
|
|
|
</html>
|