Commit 60aab762 authored by Michael's avatar Michael

Merge pull request #8 from epuidokas/master

Fix compatibility with thresholds by epuidokas 
parents 450f66eb f4bc2096
......@@ -104,13 +104,13 @@
function processOptions(plot, options) {
if (options.series.curvedLines.active) {
plot.hooks.processDatapoints.push(processDatapoints);
plot.hooks.processDatapoints.unshift(processDatapoints);
}
}
//only if the plugin is active
function processDatapoints(plot, series, datapoints) {
if (series.curvedLines.apply == true) {
if (series.curvedLines.apply == true && series.originSeries === undefined) {
if (series.lines.fill) {
var pointsTop = calculateCurvePoints(datapoints, series.curvedLines, 1)
......
$(function () {
//<div id="flotOrig" style="width: 800;height: 400;"></div>
//<div id="flotOrig" style="width: 800px;height: 400px;"></div>
var d1 = [[20,20], [42,60], [54, 20], [80,80]];
......
$(function () {
//<div id="fillAndMultiAxis" style="width: 800;height: 400;"></div>
//<div id="fillAndMultiAxis" style="width: 800px;height: 400px;"></div>
var d1 = [[20,20], [42,60], [54, 20], [80,80]];
var d2 = [[20,700], [80,300]];
......
$(function () {
//<div id="flotFit" style="width: 800;height: 400;"></div>
//<div id="flotFit" style="width: 800px;height: 400px;"></div>
var d1 = [[20,20], [42,60], [54, 30], [80,80]];
......
$(function() {
//<div id="exampleFlotWithDates" style="width: 800;height: 400;"></div>
//<div id="exampleFlotWithDates" style="width: 800px;height: 400px;"></div>
var d1 = [[new Date(2000, 8, 1, 10), 20], [new Date(2000, 8, 1, 12), 60], [new Date(2000, 8, 1, 14), 30], [new Date(2000, 8, 1, 22), 80]];
......
$(function () {
//<div id="flotOrig" style="width: 800px;height: 400px;"></div>
var d1 = [[20,20], [42,60], [54, 20], [80,80]];
var options = { series: {
curvedLines: {
active: true
},
threshold: { below: 40, color: "rgb(0, 0, 0)" }
},
axis: { min:10, max: 100},
yaxis: { min:10, max: 90}
};
$.plot($("#flotOrig"), [{data: d1, lines: { show: true, lineWidth: 3}, curvedLines: {apply:true}}, {data: d1, points: { show: true }}], options);
});
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment