Skip to content

Instantly share code, notes, and snippets.

@psibi
Created April 2, 2014 19:52
Show Gist options
  • Save psibi/9941819 to your computer and use it in GitHub Desktop.
Save psibi/9941819 to your computer and use it in GitHub Desktop.
Working jqplot with legends
<!DOCTYPE html>
<html>
<head>
<script src="http://code.jquery.com/jquery.min.js"></script>
<link href="http://getbootstrap.com/dist/css/bootstrap.css" rel="stylesheet" type="text/css" />
<script src="http://getbootstrap.com/dist/js/bootstrap.js"></script>
<link href="http://code.jquery.com/ui/1.10.4/themes/smoothness/jquery-ui.min.css" rel="stylesheet" type="text/css" />
<script src="http://code.jquery.com/ui/1.10.4/jquery-ui.min.js"></script>
<link href="./jquery.jqplot.min.css" rel="stylesheet"
type="text/css" />
<script src="./jquery.jqplot.min.js"></script>
<script>
$(function() {
console.log("hello world");
var options = {
series: [{show: true, color:'#000000', label: "somestuff"}],
legend: { show: true, location: 'se'}
};
$.jqplot('chartdiv', [[[1,
2],[3,5.12],[5,13.1],[7,33.6],[9,85.9],[11,219.9]]], options);
});
</script>
<meta charset="utf-8">
<title>JS Bin</title>
</head>
<body>
<div id="chartdiv" style="height:400px;width:800px; "></div>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment