Cleanup of errorbars plugin and example.

Linked the errorbars example to the examples index page, and cleaned up
both the example and documentation at the top of the plugin.
pull/1/head
David Schnur 14 years ago
parent d1a49460a4
commit 2bc8791306

@ -1,13 +1,22 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<script language="javascript" type="text/javascript" src="../jquery.js"></script>
<script language="javascript" type="text/javascript" src="../jquery.flot.js"></script>
<script language="javascript" type="text/javascript" src="../jquery.flot.errorbars.js"></script>
<script language="javascript" type="text/javascript" src="../jquery.flot.navigate.js"></script>
</head>
<body>
<div style="float:left; width:700px; height:500px;" id="flotplot"></div>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Flot Examples</title>
<link href="layout.css" rel="stylesheet" type="text/css">
<!--[if lte IE 8]><script language="javascript" type="text/javascript" src="../excanvas.min.js"></script><![endif]-->
<script language="javascript" type="text/javascript" src="../jquery.js"></script>
<script language="javascript" type="text/javascript" src="../jquery.flot.js"></script>
<script language="javascript" type="text/javascript" src="../jquery.flot.errorbars.js"></script>
<script language="javascript" type="text/javascript" src="../jquery.flot.navigate.js"></script>
</head>
<body>
<h1>Flot Examples</h1>
<div id="placeholder" style="width:600px;height:400px;"></div>
<p>With the errorbars plugin you can plot error bars to show standard deviation and other useful statistical properties.</p>
<script type="text/javascript" language="javascript">
$(function () {
@ -77,9 +86,9 @@ $(function () {
zoom: {interactive: true}, pan: {interactive: true}
};
$.plot($("#flotplot"), data , options);
$.plot($("#placeholder"), data , options);
});
</script>
</body>
</body>
</html>

@ -38,6 +38,7 @@
<li><a href="percentiles.html">Using filled areas to plot percentiles</a> (with fillbetween plugin)</li>
<li><a href="tracking.html">Tracking curves with crosshair</a> (with crosshair plugin)</li>
<li><a href="image.html">Plotting prerendered images</a> (with image plugin)</li>
<li><a href="errorbars.html">Plotting error bars</a> (with errorbars plugin)</li>
<li><a href="pie.html">Pie charts</a> (with pie plugin)</li>
</ul>
</body>

@ -1,5 +1,15 @@
/*
Flot plugin for error-bars
Flot plugin for plotting error bars, i.e. to show standard deviation
and other statistical properties in a plot.
* Created by Rui Pereira - rui (dot) pereira (at) gmail (dot) com
This plugin allows you to plot error-bars over points. Set "errorbars"
inside the points series to the axis name over which there will be
error values in your data array (*even* if you do not intend to plot
them later, by setting "show: null" on xerr/yerr).
Options for the plugin are
series: {
points: {
@ -14,11 +24,6 @@ Flot plugin for error-bars
}
}
This plugin allows you to plot error-bars over points. Set "errorbars"
inside the points series to the axis name over which there will be
error values in your data array (*even* if you do not intend to plot
them later, by setting "show: null" on xerr/yerr).
Each data point array is expected to be of the type
"x" [x,y,xerr]
@ -51,8 +56,6 @@ the interconnecting points (with radius: 0), and still showing end
caps on the error-bars. shadowSize and lineWidth are derived as well
from the points series.
Rui Pereira
rui (dot) pereira (at) gmail (dot) com
*/
(function ($) {

Loading…
Cancel
Save