From dddb14a7d04f5e4f619ab897b4951836d0717999 Mon Sep 17 00:00:00 2001 From: Michael Date: Sat, 24 May 2014 15:40:09 +0200 Subject: [PATCH] Update README --- README | 35 ++++++++++++++++++++++++++++++++--- 1 file changed, 32 insertions(+), 3 deletions(-) diff --git a/README b/README index 0b39907..19c5c29 100644 --- a/README +++ b/README @@ -1,7 +1,36 @@ -CurvedLines is a plugin for flot, which displays lines in a smooth curved way. This is achieved by adding additional points in between the "real" data points. +CurvedLines is a plugin for flot, which displays lines in a smooth curved way. This is achieved by adding additional points in between the "real" data points. See the test files for examples. -The plugin is based on nergal.dev's work and gives you an option to display curved lines. I further extended the code with a 2nd mode, which forces the lines to have their minima/maxima on the original data points. +The plugin is based on nergal.dev's work and gives you an option to display curved lines. I further extended the code with a 2nd mode, which forces the lines to have their minima/maxima on the original data points. Feel free to add additional features and correct errors. -Regards Michael \ No newline at end of file +Regards Michael + + +Update: +added tests/Issue18.htm with a better explanation of the curvePointFactor and fitPointDist parameter! + + + how to use it: + ____________________________________________________ + + var d1 = [[5,5],[7,3],[9,12]]; + + var options = { series: { curvedLines: { active: true }}}; + + //you might want to adjust curvePointFactor + $.plot($("#placeholder"), [{data = d1, lines: { show: true}, curvedLines: {apply: true}}], options); + + _____________________________________________________ + + options: + _____________________________________________________ + + active: bool true => plugin can be used + 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 + curvePointFactor int defines how many "virtual" points are used per "real" data point to + emulate the curvedLines (points total = real points * curvePointFactor) + fitPointDist: int defines the x axis distance of the additional two points that are used + to enforce the min max condition. + _____________________________________________________