Created
October 29, 2012 02:57
-
-
Save dodtsair/3971228 to your computer and use it in GitHub Desktop.
jqplot non working example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> | |
<title>Doesn't Work</title> | |
<script src="../org.jquery/jquery-js/jquery.js"></script> | |
<!--<link rel="stylesheet" type="text/css" href="../com.jqplot/jqplot/jquery.jqplot.css" />--> | |
</head> | |
<body> | |
<div id="info1"></div> | |
<div id="chart1" style="margin-top:20px; margin-left:20px; width:300px; height:300px;" > | |
</div> | |
<script src="../com.jqplot/jqplot/jquery.jqplot.js"></script> | |
<script src="../com.jqplot/jqplot/plugins/jqplot.pieRenderer.js"></script> | |
<script src="../com.jqplot/jqplot/plugins/jqplot.barRenderer.js"></script> | |
<script src="../com.jqplot/jqplot/plugins/jqplot.pointLabels.js"></script> | |
<script src="../com.jqplot/jqplot/plugins/jqplot.pointLabels.js"></script> | |
<script> | |
$(document).ready(function() { | |
$.jqplot.config.enablePlugins = true; | |
var s1 = [2, 6, 7, 10]; | |
var ticks = ['a', 'b', 'c', 'd']; | |
plot1 = $.jqplot('chart1', [s1], { | |
// Only animate if we're not using excanvas (not in IE 7 or IE 8).. | |
animate: !$.jqplot.use_excanvas, | |
seriesDefaults:{ | |
renderer:$.jqplot.BarRenderer, | |
pointLabels: { show: true } | |
}, | |
axes: { | |
xaxis: { | |
renderer: $.jqplot.CategoryAxisRenderer, | |
ticks: ticks | |
} | |
}, | |
highlighter: { show: false } | |
}); | |
$('#chart1').bind('jqplotDataClick', | |
function (ev, seriesIndex, pointIndex, data) { | |
$('#info1').html('series: '+seriesIndex+', point: '+pointIndex+', data: '+data); | |
} | |
); | |
}); | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment