jqPlot Dragable and Trend Line Tests and Examples

The plot(s) on this page use the following plugins:

<script type="text/javascript" src="../plugins/jqplot.dragable.min.js"></script>
<script type="text/javascript" src="../plugins/jqplot.trendline.min.js"></script>

The dragable plugin allows you to mouse over a data point, drag it, and drop it somewhere else on the plot. It automatically redraws the series after the point is dragged and dropped. The underlying plot data is updated as well.

The trend line plugin automatically computes a linear regression trend line of the series data. The trend line is automatically recalculated as data is changed. So when you drag and drop a point, the trend line updates.

Plugins like dragable and trendline don't require any additional options to be set. Just include the plugin file in your source and they're active!

line1=[4, 25, 13, 22, 14, 17, 15];
plot1 = $.jqplot('chart1', [line1],
    {title:'Dragable and Trend Line Example'}
);