You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
Go to file
LukaszKrawczyk d6ce5904b2 Update bower.json
fixed incorrect file name
12 years ago
flot One way to solve the stacking problem we use still a new sereis for the actual line but disable stacking on new line. Drawback the process data points hook has to be after the stack hook 12 years ago
tests alternative approach the special handling of fill is deactivated => line and fill in one step. Advantage: unshift can be used same ordering of hooks as before. Nicer lines because flot first works better than stack first. However not sure why the special treatment was added in the first place.... 12 years ago
.project Merge branch 'origin/master' 13 years ago
README Update README 12 years ago
bower.json Update bower.json 12 years ago
curvedLines.js increased version to 0.6.4 12 years ago
example.js Fix example comment html 13 years ago
exampleFillMultiAxis.js Fix example comment html 13 years ago
exampleFit.js Fix example comment html 13 years ago
exampleFlotWithDates.js Fix example comment html 13 years ago
exampleThreshold.js Fix example comment html 13 years ago

README

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.

Feel free to add additional features and correct errors.

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.