score:0

Maybe you just want to use step option? See API.

If not (since threshold can be on start/middle/end of the line between points) then wrap getSegmentPath method: http://jsfiddle.net/sqdLj33a/

(function (H) {
    H.wrap(H.seriesTypes.line.prototype, 'getSegmentPath', function (p, segment) {
        var s = this,
            segmentPath = [],
            level;

        if (s.options.customStep) {
            level = s.options.levelStep;
            // build the segment line
            H.each(segment, function (point, i) {

                var plotX = point.plotX,
                    plotY = point.plotY,
                    lastPoint;

                // moveTo or lineTo
                segmentPath.push(i ? 'L' : 'M');

                // step line 'center':
                if (i) {
                    lastPoint = segment[i - 1];
                    segmentPath.push(
                    plotX + (lastPoint.plotX - plotX) * level,
                    lastPoint.plotY, 
                    plotX + (lastPoint.plotX - plotX) * level,
                    plotY);
                }

                // normal line to next point
                segmentPath.push(point.plotX, point.plotY);
            });
        } else {
            segmentPath = p.call(s, segment);
        }
        return segmentPath;
    });
})(Highcharts);

And series options:

    series: [{
        customStep: true,
        levelStep: 0.2, // 80%
        data: [29.9, 71.5, 106.4, 129.2, 144.0, 176.0, 135.6, 148.5, 216.4, 194.1, 95.6, 54.4]
    }]

Of course, if you want different path, then simply change segmentPath array.


Related Query

More Query from same tag