at path:
ROOT
/
sistema
/
vendors
/
flot
/
jquery.flot.threshold.js
run:
R
W
Run
examples
DIR
2026-04-09 04:12:40
R
W
Run
.bower.json
415 By
2018-11-08 02:46:18
R
W
Run
Delete
Rename
.gitignore
40 By
2018-11-08 02:46:18
R
W
Run
Delete
Rename
.travis.yml
35 By
2018-11-08 02:46:18
R
W
Run
Delete
Rename
API.md
52.32 KB
2018-11-08 02:46:18
R
W
Run
Delete
Rename
CONTRIBUTING.md
3.17 KB
2018-11-08 02:46:18
R
W
Run
Delete
Rename
FAQ.md
3.16 KB
2018-11-08 02:46:18
R
W
Run
Delete
Rename
LICENSE.txt
1.04 KB
2018-11-08 02:46:18
R
W
Run
Delete
Rename
Makefile
285 By
2018-11-08 02:46:18
R
W
Run
Delete
Rename
NEWS.md
39.35 KB
2018-11-08 02:46:18
R
W
Run
Delete
Rename
PLUGINS.md
4.24 KB
2018-11-08 02:46:18
R
W
Run
Delete
Rename
README.md
3.69 KB
2018-11-08 02:46:18
R
W
Run
Delete
Rename
component.json
114 By
2018-11-08 02:46:18
R
W
Run
Delete
Rename
excanvas.js
40.96 KB
2018-11-08 02:46:18
R
W
Run
Delete
Rename
excanvas.min.js
18.86 KB
2018-11-08 02:46:18
R
W
Run
Delete
Rename
flot.jquery.json
837 By
2018-11-08 02:46:18
R
W
Run
Delete
Rename
jquery.colorhelpers.js
6.01 KB
2018-11-08 02:46:18
R
W
Run
Delete
Rename
jquery.flot.canvas.js
9.37 KB
2018-11-08 02:46:18
R
W
Run
Delete
Rename
jquery.flot.categories.js
5.89 KB
2018-11-08 02:46:18
R
W
Run
Delete
Rename
jquery.flot.crosshair.js
5.29 KB
2018-11-08 02:46:18
R
W
Run
Delete
Rename
jquery.flot.errorbars.js
12.32 KB
2018-11-08 02:46:18
R
W
Run
Delete
Rename
jquery.flot.fillbetween.js
5.13 KB
2018-11-08 02:46:18
R
W
Run
Delete
Rename
jquery.flot.image.js
7.19 KB
2018-11-08 02:46:18
R
W
Run
Delete
Rename
jquery.flot.js
120.09 KB
2018-11-08 02:46:18
R
W
Run
Delete
Rename
jquery.flot.navigate.js
13.88 KB
2018-11-08 02:46:18
R
W
Run
Delete
Rename
jquery.flot.pie.js
23.25 KB
2018-11-08 02:46:18
R
W
Run
Delete
Rename
jquery.flot.resize.js
3.24 KB
2018-11-08 02:46:18
R
W
Run
Delete
Rename
jquery.flot.selection.js
12.83 KB
2018-11-08 02:46:18
R
W
Run
Delete
Rename
jquery.flot.stack.js
6.92 KB
2018-11-08 02:46:18
R
W
Run
Delete
Rename
jquery.flot.symbol.js
2.45 KB
2018-11-08 02:46:18
R
W
Run
Delete
Rename
jquery.flot.threshold.js
4.38 KB
2018-11-08 02:46:18
R
W
Run
Delete
Rename
jquery.flot.time.js
11.49 KB
2018-11-08 02:46:18
R
W
Run
Delete
Rename
jquery.js
259.82 KB
2018-11-08 02:46:18
R
W
Run
Delete
Rename
package.json
154 By
2018-11-08 02:46:18
R
W
Run
Delete
Rename
error_log
up
📄
jquery.flot.threshold.js
Save
/* Flot plugin for thresholding data. Copyright (c) 2007-2014 IOLA and Ole Laursen. Licensed under the MIT license. The plugin supports these options: series: { threshold: { below: number color: colorspec } } It can also be applied to a single series, like this: $.plot( $("#placeholder"), [{ data: [ ... ], threshold: { ... } }]) An array can be passed for multiple thresholding, like this: threshold: [{ below: number1 color: color1 },{ below: number2 color: color2 }] These multiple threshold objects can be passed in any order since they are sorted by the processing function. The data points below "below" are drawn with the specified color. This makes it easy to mark points below 0, e.g. for budget data. Internally, the plugin works by splitting the data into two series, above and below the threshold. The extra series below the threshold will have its label cleared and the special "originSeries" attribute set to the original series. You may need to check for this in hover events. */ (function ($) { var options = { series: { threshold: null } // or { below: number, color: color spec} }; function init(plot) { function thresholdData(plot, s, datapoints, below, color) { var ps = datapoints.pointsize, i, x, y, p, prevp, thresholded = $.extend({}, s); // note: shallow copy thresholded.datapoints = { points: [], pointsize: ps, format: datapoints.format }; thresholded.label = null; thresholded.color = color; thresholded.threshold = null; thresholded.originSeries = s; thresholded.data = []; var origpoints = datapoints.points, addCrossingPoints = s.lines.show; var threspoints = []; var newpoints = []; var m; for (i = 0; i < origpoints.length; i += ps) { x = origpoints[i]; y = origpoints[i + 1]; prevp = p; if (y < below) p = threspoints; else p = newpoints; if (addCrossingPoints && prevp != p && x != null && i > 0 && origpoints[i - ps] != null) { var interx = x + (below - y) * (x - origpoints[i - ps]) / (y - origpoints[i - ps + 1]); prevp.push(interx); prevp.push(below); for (m = 2; m < ps; ++m) prevp.push(origpoints[i + m]); p.push(null); // start new segment p.push(null); for (m = 2; m < ps; ++m) p.push(origpoints[i + m]); p.push(interx); p.push(below); for (m = 2; m < ps; ++m) p.push(origpoints[i + m]); } p.push(x); p.push(y); for (m = 2; m < ps; ++m) p.push(origpoints[i + m]); } datapoints.points = newpoints; thresholded.datapoints.points = threspoints; if (thresholded.datapoints.points.length > 0) { var origIndex = $.inArray(s, plot.getData()); // Insert newly-generated series right after original one (to prevent it from becoming top-most) plot.getData().splice(origIndex + 1, 0, thresholded); } // FIXME: there are probably some edge cases left in bars } function processThresholds(plot, s, datapoints) { if (!s.threshold) return; if (s.threshold instanceof Array) { s.threshold.sort(function(a, b) { return a.below - b.below; }); $(s.threshold).each(function(i, th) { thresholdData(plot, s, datapoints, th.below, th.color); }); } else { thresholdData(plot, s, datapoints, s.threshold.below, s.threshold.color); } } plot.hooks.processDatapoints.push(processThresholds); } $.plot.plugins.push({ init: init, options: options, name: 'threshold', version: '1.2' }); })(jQuery);