Comments (6)
hm no unfortunately no ideas. Can you make a small toy example that reproduces the error?
from curvedlines.
Got one! It seems to be a problem of the numbers. If I divide everything by 1000 it seems to work- which is unfortunately not an option :(
var options = {
series: {
curvedLines: {
active: true,
},
},
};
var series = [{
data: [[1364699400000, -0], [1364707500000, 88.889], [1364715600000, 1339.259], [1364723700000, 1955.556], [1364731800000, 2400], [1364739900000, 1179.259], [1364748000000, 80], [1364756400000, -0]],
color: "blue",
lines: {
show: true,
steps: false,
lineWidth: 1,
fill: true
},
curvedLines: {
apply: true,
fit: true,
fitPointDist: 0.000001,
}
}];
$.plot($("#flot"), series, options);
from curvedlines.
I may have found the problem, the "virtual" data points are placed fitPointDist away from their origins.
This is at the moment an absolut value and if your X values are too big adding 0.00001 will have no effect.
(1364699400000 + 0.000001 == 1364699400000)
I should think about a better solution for this maybe adding a warning or relative fitPointDist s however for the moment you can simply adjust your fitPointDist to a higher value.
curvedLines : {
apply : true,
fit : true,
fitPointDist: 100
}
Regards Michael
from curvedlines.
Thanks for tracking down this one. My last question is what the fitPointDist should really depend on- is it x- or y-values?
from curvedlines.
fitPointDist basically defines how far away in x direction the two additional points (that force the curves to meet the data points) are. As you can see the y value equals the points y value.
I think something a bit smaller than a pixel ( plot xrange / (plot width * factor)) should yield good results because you won't notice the data points.
//add point to front
front[X] = points[curX] - fpDist;
front[Y] = points[curY];
//add point to back
back[X] = points[curX] + fpDist;
back[Y] = points[curY];
from curvedlines.
ok I implemented auto guessing for the fitPointDist. Updateing curvedLines should solve your problem now (hopefully)
from curvedlines.
Related Issues (20)
- Fill option throws error using Flot 0.8.0 HOT 3
- tooltip with curvedline HOT 3
- Endless loop when only one datapoint HOT 2
- Lines not being curved HOT 1
- Curved line is crossing the maximum point even after enabling "fit:true" HOT 5
- Curved line is not smooth HOT 3
- CurvedLines not compatible with Stacked HOT 2
- Issue in chrome HOT 1
- Unable to use via rails-assets HOT 1
- Curved line gets cut off if line vertex falls on x-axis HOT 3
- Displaying tooltips only on original datapoints HOT 1
- Smoothing doesn't work on non ordered data HOT 2
- Curveing only selected series HOT 1
- differentiating between "real" datapoints and interpolated spline points HOT 2
- multiple lines with animation issue
- Not versioned and published HOT 5
- Better documentation on how to link HOT 7
- NULL values are not ignored
- jquery.flot.tooltip.min.js is emiting error while using CurvedLines Plugin
- start curved line with first data point instead of (0,0) HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from curvedlines.