fillColor: null or the color that should be used for filling
active: bool true => plugin can be used
active: bool true => plugin can be used
show: bool true => series will be drawn as curved line
apply: bool true => series will be drawn as curved line
fit: bool true => forces the max,mins of the curve to be on the datapoints
fit: bool true => forces the max,mins of the curve to be on the datapoints
lineWidth: int width of the line
curvePointFactor int defines how many "virtual" points are used per "real" data point to
curvePointFactor int defines how many "virtual" points are used per "real" data point to
emulate the curvedLines
emulate the curvedLines
fitPointDist: int defines the x axis distance of the additional two points that are used
fitPointDist: int defines the x axis distance of the additional two points that are used
to enforce the min max condition. (you will get curvePointFactor * 3 * |datapoints|
to enforce the min max condition. (you will get curvePointFactor * 3 * |datapoints|
"virtual" points if fit is true)
"virtual" points if fit is true)
+ line options (since v0.5 curved lines use flots line implementation for drawing
=> line options like fill, show ... are supported out of the box)
*/
*/
/*
/*
* v0.1 initial commit
* v0.1 initial commit
* v0.15 negative values should work now (outcommented a negative -> 0 hook hope it does no harm)
* v0.15 negative values should work now (outcommented a negative -> 0 hook hope it does no harm)
* v0.2 added fill option (thanks to monemihir) and multi axis support (thanks to soewono effendi)
* v0.2 added fill option (thanks to monemihir) and multi axis support (thanks to soewono effendi)
* v0.3 improved saddle handling and added basic handling of Dates
* v0.3 improved saddle handling and added basic handling of Dates
*
* v0.4 rewritten fill option (thomas ritou) mostly from original flot code (now fill between points rather than to graph bottom), corrected fill Opacity bug
* v0.5 rewritten instead of implementing a own draw function CurvedLines is now based on the processDatapoints flot hook (credits go to thomas ritou).
* This change breakes existing code however CurvedLines are now just many tiny straight lines to flot and therefore all flot lines options (like gradient fill,
* shadow) are now supported out of the box
*/
*/
(function($){
(function($){
varoptions={
varoptions={
series:{
series:{
curvedLines:{
curvedLines:{
active:false,
active:false,
show:false,
apply:false,
fit:false,
fit:false,
fill:false,
fillColor:null,
lineWidth:2,
curvePointFactor:20,
curvePointFactor:20,
fitPointDist:0.0001
fitPointDist:0.0001
}
}
...
@@ -96,239 +100,163 @@
...
@@ -96,239 +100,163 @@
plot.hooks.processOptions.push(processOptions);
plot.hooks.processOptions.push(processOptions);
//if the plugin is active register draw method
//if the plugin is active register processDatapoints method