From d8b5ac4fcb3547a65b304ea5c261542727f3c381 Mon Sep 17 00:00:00 2001 From: Yuanfei Zhu Date: Fri, 20 Jan 2017 18:04:23 +0800 Subject: [PATCH 1/2] avoid closing the path of a coloredarea if it's not filled with color --- .gitignore | 1 + js/multicolor_series.js | 130 ++++++++++++++++---------------- js/multicolor_series.min.js | 27 +++---- js/multicolor_series.min.js.map | 2 +- 4 files changed, 79 insertions(+), 81 deletions(-) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..3c3629e --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +node_modules diff --git a/js/multicolor_series.js b/js/multicolor_series.js index fdbf51a..6dc7ac5 100644 --- a/js/multicolor_series.js +++ b/js/multicolor_series.js @@ -30,7 +30,7 @@ TRACKER_FILL = 'rgba(192,192,192,' + (H.hasSVG ? 0.0001 : 0.002) + ')', // invisible but clickable M = 'M', L = 'L'; - + // handle unsorted data, throw error anyway function error(code, stop) { var msg = 'Highcharts error #' + code + ': www.highcharts.com/errors/' + code; @@ -40,10 +40,10 @@ console.log(msg); // eslint-disable-line } } - + /** If replacing L and M in tracker will be necessary use that getPath(): - + function getPath(arr){ var ret = []; each(arr, function(el, ind) { @@ -59,8 +59,8 @@ return ret; } **/ - - + + function getPath(arr) { var ret = []; each(arr, function (el) { @@ -135,9 +135,9 @@ * ColoredLine series type * **/ - + seriesTypes.coloredline = H.extendClass(seriesTypes.line); - + H.seriesTypes.coloredline.prototype.processData = function (force) { var series = this, processedXData = series.xData, // copied during slice operation below @@ -150,39 +150,39 @@ i, // loop variable options = series.options, isCartesian = series.isCartesian; - + // If the series data or axes haven't changed, don't go through this. Return false to pass // the message on to override methods like in data grouping. if (isCartesian && !series.isDirty && !xAxis.isDirty && !series.yAxis.isDirty && !force) { return false; } - + // Find the closest distance between processed points for (i = processedXData.length - 1; i >= 0; i--) { distance = processedXData[i] - processedXData[i - 1]; if (distance > 0 && (closestPointRange === UNDEFINED || distance < closestPointRange)) { closestPointRange = distance; - + // Unsorted data is not supported by the line tooltip, as well as data grouping and // navigation in Stock charts (#725) and width calculation of columns (#1900) } else if (distance < 0 && series.requireSorting) { error(15); } } - + // Record the properties series.cropped = cropped; // undefined or true series.cropStart = cropStart; series.processedXData = processedXData; series.processedYData = processedYData; - + if (options.pointRange === null) { // null means auto, as for columns, candlesticks and OHLC series.pointRange = closestPointRange || 1; } series.closestPointRange = closestPointRange; return true; }; - + H.seriesTypes.coloredline.prototype.drawTracker = function () { var series = this, options = series.options, @@ -219,7 +219,7 @@ } } } - + // handle single points for (i = 0; i < singlePoints.length; i++) { singlePoint = singlePoints[i]; @@ -228,7 +228,7 @@ L, singlePoint.plotX + snap, singlePoint.plotY); } } - + // draw the tracker if (tracker) { tracker.attr({ d: trackerPath }); @@ -243,7 +243,7 @@ zIndex: 2 }) .add(series.group); - + // The tracker is added to the series group, which is clipped, but is covered // by the marker group. So the marker group also needs to capture events. each([series.tracker, series.markerGroup], function (track) { @@ -251,15 +251,15 @@ .on('mouseover', onMouseOver) .on('mouseout', function (e) { pointer.onTrackerMouseOut(e); }) .css(css); - + if (hasTouch) { track.on('touchstart', onMouseOver); } }); } - + }; - + H.seriesTypes.coloredline.prototype.setState = function (state) { var series = this, options = series.options, @@ -267,20 +267,20 @@ stateOptions = options.states, lineWidth = options.lineWidth, attribs; - + state = state || NORMAL_STATE; - + if (series.state !== state) { series.state = state; - + if (stateOptions[state] && stateOptions[state].enabled === false) { return; } - + if (state) { lineWidth = stateOptions[state].lineWidth || lineWidth + 1; } - + if (graph && !graph.dashstyle) { // hover is turned off for dashed lines in VML attribs = { 'stroke-width': lineWidth @@ -292,7 +292,7 @@ } } }; - + /** * The main change to get multi color isFinite changes segments array. * From array of points to object with color and array of points. @@ -305,9 +305,9 @@ i, points = series.points, pointsLength = points.length; - + if (pointsLength) { // no action required for [] - + // if connect nulls, just remove null points if (series.options.connectNulls) { // iterate backwars for secure point removal @@ -317,7 +317,7 @@ } } pointsLength = points.length; - + each(points, function (point, j) { if (j > 0 && points[j].segmentColor !== points[j - 1].segmentColor) { segments.push({ @@ -334,23 +334,23 @@ color: points[pointsLength - 1].segmentColor }); } - + if (points.length && segments.length === 0) { segments = [points]; } - + // else, split on null points or different colors } else { var previousColor = null; each(points, function (point, j) { var colorChanged = j > 0 && (point.y === null || points[j - 1].y === null || (point.segmentColor !== points[j - 1].segmentColor && points[j].segmentColor !== previousColor)), colorExists = points[j - 1] && points[j - 1].segmentColor && points[j - 1].y !== null ? true : false; - + // handle first point if (!previousColor && point.segmetColor) { previousColor = point.segmentColor; } - + if (colorChanged) { var p = points.slice(lastColor, j + 1); if (p.length > 0) { @@ -361,7 +361,7 @@ p.splice(k, 1); } }); - + segments.push({ points: p, color: colorExists ? points[j - 1].segmentColor : previousColor @@ -388,9 +388,9 @@ }); lastColor = j; } - + } - + // store previous color if (point) { previousColor = point.segmentColor; @@ -401,7 +401,7 @@ // register it series.segments = segments; }; - + H.seriesTypes.coloredline.prototype.getGraphPath = function () { // var ret = f.apply(this, Array.prototype.slice.call(arguments, 1)); var series = this, @@ -418,14 +418,14 @@ singlePoints.push(segment.points); } }); - + // Record it for use in drawGraph and drawTracker, and return graphPath series.singlePoints = singlePoints; series.graphPath = graphPath; - + return graphPath; }; - + H.seriesTypes.coloredline.prototype.drawGraph = function () { var series = this, options = series.options, @@ -436,7 +436,7 @@ graphPath = series.getGraphPath(), graphPathLength = graphPath.length, graphSegmentsLength = 0; - + function getSegment(segment, prop, i) { var attribs = { stroke: prop[1], @@ -452,12 +452,12 @@ if (segment[1]) { attribs.stroke = segment[1]; } - + item = series.chart.renderer.path(segment[0]) .attr(attribs) .add(series.group) .shadow(!i && options.shadow); - + return item; } @@ -466,19 +466,19 @@ var graphKey = prop[0], graph = series[graphKey], g; - + if (graph) { // cancel running animations, #459 // do we have animation each(graphPath, function (segment, j) { // update color and path - + if (series[graphKey][j]) { series[graphKey][j].attr({ d: segment[0], stroke: segment[1] }); } else { series[graphKey][j] = getSegment(segment, prop, i); } }); - + } else if (lineWidth && graphPath.length) { // #1487 graph = []; each(graphPath, function (segment, j) { @@ -497,7 +497,7 @@ } // Checks if series.graph exists. #3 graphSegmentsLength = (series.graph && series.graph.length) || -1; - + for (var j = graphSegmentsLength; j >= graphPathLength; j--) { if (series[graphKey][j]) { series[graphKey][j].destroy(); @@ -513,21 +513,21 @@ this.getSegments(); } }); - - - + + + /** * * ColoredArea series type * **/ seriesTypes.coloredarea = H.extendClass(seriesTypes.coloredline); - + H.seriesTypes.coloredarea.prototype.init = function (chart, options) { options.threshold = options.threshold || null; H.Series.prototype.init.call(this, chart, options); }; - + H.seriesTypes.coloredarea.prototype.closeSegment = function (path, segment, translatedThreshold) { path.push( L, @@ -538,7 +538,7 @@ translatedThreshold ); }; - + H.seriesTypes.coloredarea.prototype.drawGraph = function (f) { H.seriesTypes.coloredline.prototype.drawGraph.call(this, f); var series = this, @@ -548,17 +548,17 @@ each(props, function (prop) { var graphKey = prop[0], graph = series[graphKey]; - + if (graph) { // cancel running animations, #459 // do we have animation each(series.graphPath, function (segment, j) { // update color and path - + if (series[graphKey][j]) { series[graphKey][j].attr({ fill: segment[1] }); } }); - + } }); }; @@ -567,9 +567,10 @@ * Extend the base Series getSegmentPath method by adding the path for the area. * This path is pushed to the series.areaPath property. * @param {object} segment of the path + * @param {boolean} closePath indicates if the path should be closed * @returns {array} Path (SVG) **/ - H.seriesTypes.coloredarea.prototype.getSegmentPath = function (segment) { + H.seriesTypes.coloredarea.prototype.getSegmentPath = function (segment, closePath) { var segmentPath = H.Series.prototype.getSegmentPath.call(this, segment), // call base method areaSegmentPath = [].concat(segmentPath), // work on a copy for the area path i, @@ -578,6 +579,8 @@ translatedThreshold = this.yAxis.getThreshold(options.threshold), // #2181 yBottom; + closePath = closePath || true; // close the path by default + if (segLength === 3) { // for animation from 1 to two points areaSegmentPath.push(L, segmentPath[1], segmentPath[2]); } @@ -592,22 +595,23 @@ } areaSegmentPath.push(segment[i].plotX, yBottom); } - } else { // follow zero line back + } else if (closePath) { // follow zero line back this.closeSegment(areaSegmentPath, segment, translatedThreshold); } return areaSegmentPath; }; - + H.seriesTypes.coloredarea.prototype.getGraphPath = function () { var series = this, graphPath = [], segmentPath, singlePoints = []; // used in drawTracker // Divide into segments and build graph and area paths - + this.areaPath = []; each(series.segments, function (segment) { - segmentPath = series.getSegmentPath(segment.points); + var shouldClosePath = !!segment.color; + segmentPath = series.getSegmentPath(segment.points, shouldClosePath); // add the segment to the graph, or a single point for tracking if (segment.points.length > 1) { graphPath.push([segmentPath, segment.color]); @@ -615,13 +619,13 @@ singlePoints.push(segment.points); } }); - + // Record it for use in drawGraph and drawTracker, and return graphPath series.singlePoints = singlePoints; series.graphPath = graphPath; return graphPath; - + }; - + H.seriesTypes.coloredarea.prototype.drawLegendSymbol = H.LegendSymbolMixin.drawRectangle; })); \ No newline at end of file diff --git a/js/multicolor_series.min.js b/js/multicolor_series.min.js index 6ef2374..6069872 100644 --- a/js/multicolor_series.min.js +++ b/js/multicolor_series.min.js @@ -1,23 +1,16 @@ -/** -* Multicolor Series v2.2.1-0(2016-06-24) -* -* (c) 2012-2016 Black Label -* -* License: Creative Commons Attribution (CC) -*/ (function(){ -'use strict';(function(f){"object"===typeof module&&module.exports?module.exports=f:f(Highcharts)})(function(f){function v(b){var a=[];l(b,function(b){a=a.concat(b[0])});return a}var l=f.each,p=f.seriesTypes,w=f.pick,x=void 0!==document.documentElement.ontouchstart,u="rgba(192,192,192,"+(f.hasSVG?1E-4:.002)+")";f.Series.prototype.getSegmentPath=function(b){var a=this,d=[],c=a.options.step;l(b,function(e,g){var f=e.plotX,h=e.plotY;a.getPointSpline?d.push.apply(d,a.getPointSpline(b,e,g)):(d.push(g? +'use strict';(function(f){"object"===typeof module&&module.exports?module.exports=f:f(Highcharts)})(function(f){function v(b){var a=[];k(b,function(b){a=a.concat(b[0])});return a}var k=f.each,p=f.seriesTypes,w=f.pick,x=void 0!==document.documentElement.ontouchstart,u="rgba(192,192,192,"+(f.hasSVG?1E-4:.002)+")";f.Series.prototype.getSegmentPath=function(b){var a=this,d=[],c=a.options.step;k(b,function(e,g){var f=e.plotX,h=e.plotY;a.getPointSpline?d.push.apply(d,a.getPointSpline(b,e,g)):(d.push(g? "L":"M"),c&&g&&(g=b[g-1],"right"===c?d.push(g.plotX,h,"L"):"center"===c?d.push((g.plotX+f)/2,g.plotY,"L",(g.plotX+f)/2,h,"L"):d.push(f,g.plotY,"L")),d.push(e.plotX,e.plotY))});return d};p.coloredline=f.extendClass(p.line);f.seriesTypes.coloredline.prototype.processData=function(b){var a=this.xData,d=this.yData,c,e=this.xAxis,g=this.options;if(this.isCartesian&&!this.isDirty&&!e.isDirty&&!this.yAxis.isDirty&&!b)return!1;for(e=a.length-1;0<=e;e--)b=a[e]-a[e-1],0b&&this.requireSorting&& window.console&&console.log("Highcharts error #15: www.highcharts.com/errors/15");this.cropped=void 0;this.cropStart=0;this.processedXData=a;this.processedYData=d;null===g.pointRange&&(this.pointRange=c||1);this.closestPointRange=c;return!0};f.seriesTypes.coloredline.prototype.drawTracker=function(){var b=this,a=b.options,d=a.trackByArea,c=[].concat(d?b.areaPath:v(b.graphPath)),e=c.length,g=b.chart,f=g.pointer,h=g.renderer,n=g.options.tooltip.snap,q=b.tracker,m=a.cursor,y=m&&{cursor:m},m=b.singlePoints, -k,t;t=function(){if(g.hoverSeries!==b)b.onMouseOver()};if(e&&!d)for(k=e+1;k--;)"M"===c[k]&&c.splice(k+1,0,c[k+1]-n,c[k+2],"L"),(k&&"M"===c[k]||k===e)&&c.splice(k,0,"L",c[k-2]+n,c[k-1]);for(k=0;k=n;r--)a[f][r]&&(a[f][r].destroy(),a[f].splice(r,1))})};f.wrap(p.coloredline.prototype,"translate",function(b){b.apply(this,[].slice.call(arguments, -1));this.getSegments&&this.getSegments()});p.coloredarea=f.extendClass(p.coloredline);f.seriesTypes.coloredarea.prototype.init=function(b,a){a.threshold=a.threshold||null;f.Series.prototype.init.call(this,b,a)};f.seriesTypes.coloredarea.prototype.closeSegment=function(b,a,d){b.push("L",a[a.length-1].plotX,d,"L",a[0].plotX,d)};f.seriesTypes.coloredarea.prototype.drawGraph=function(b){f.seriesTypes.coloredline.prototype.drawGraph.call(this,b);var a=this;l([["graph",this.options.lineColor||a.color]], -function(b){var c=b[0];a[c]&&l(a.graphPath,function(b,d){a[c][d]&&a[c][d].attr({fill:b[1]})})})};f.seriesTypes.coloredarea.prototype.getSegmentPath=function(b){var a=f.Series.prototype.getSegmentPath.call(this,b),d=[].concat(a),c=this.options,e=a.length,g=this.yAxis.getThreshold(c.threshold);3===e&&d.push("L",a[1],a[2]);if(c.stacking&&!this.closedStacks)for(a=b.length-1;0<=a;a--)e=w(b[a].yBottom,g),a=n;r--)a[f][r]&&(a[f][r].destroy(),a[f].splice(r,1))})};f.wrap(p.coloredline.prototype,"translate",function(b){b.apply(this,[].slice.call(arguments, +1));this.getSegments&&this.getSegments()});p.coloredarea=f.extendClass(p.coloredline);f.seriesTypes.coloredarea.prototype.init=function(b,a){a.threshold=a.threshold||null;f.Series.prototype.init.call(this,b,a)};f.seriesTypes.coloredarea.prototype.closeSegment=function(b,a,d){b.push("L",a[a.length-1].plotX,d,"L",a[0].plotX,d)};f.seriesTypes.coloredarea.prototype.drawGraph=function(b){f.seriesTypes.coloredline.prototype.drawGraph.call(this,b);var a=this;k([["graph",this.options.lineColor||a.color]], +function(b){var c=b[0];a[c]&&k(a.graphPath,function(b,d){a[c][d]&&a[c][d].attr({fill:b[1]})})})};f.seriesTypes.coloredarea.prototype.getSegmentPath=function(b,a){var d=f.Series.prototype.getSegmentPath.call(this,b),c=[].concat(d),e=this.options,g=d.length,k=this.yAxis.getThreshold(e.threshold);a=a||!0;3===g&&c.push("L",d[1],d[2]);if(e.stacking&&!this.closedStacks)for(a=b.length-1;0<=a;a--)d=w(b[a].yBottom,k),a= 0; i--) {\n\t\t\tdistance = processedXData[i] - processedXData[i - 1];\n\t\t\tif (distance > 0 && (closestPointRange === UNDEFINED || distance < closestPointRange)) {\n\t\t\t\tclosestPointRange = distance;\n\t\t\t\t\n\t\t\t\t// Unsorted data is not supported by the line tooltip, as well as data grouping and\n\t\t\t\t// navigation in Stock charts (#725) and width calculation of columns (#1900)\n\t\t\t} else if (distance < 0 && series.requireSorting) {\n\t\t\t\terror(15);\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Record the properties\n\t\tseries.cropped = cropped; // undefined or true\n\t\tseries.cropStart = cropStart;\n\t\tseries.processedXData = processedXData;\n\t\tseries.processedYData = processedYData;\n\t\t\n\t\tif (options.pointRange === null) { // null means auto, as for columns, candlesticks and OHLC\n\t\t\tseries.pointRange = closestPointRange || 1;\n\t\t}\n\t\tseries.closestPointRange = closestPointRange;\n\t\treturn true;\n\t};\n\t\n\tH.seriesTypes.coloredline.prototype.drawTracker = function () {\n\t\tvar series = this,\n\t\t\toptions = series.options,\n\t\t\ttrackByArea = options.trackByArea,\n\t\t\ttrackerPath = [].concat(trackByArea ? series.areaPath : getPath(series.graphPath)),\n\t\t\ttrackerPathLength = trackerPath.length,\n\t\t\tchart = series.chart,\n\t\t\tpointer = chart.pointer,\n\t\t\trenderer = chart.renderer,\n\t\t\tsnap = chart.options.tooltip.snap,\n\t\t\ttracker = series.tracker,\n\t\t\tcursor = options.cursor,\n\t\t\tcss = cursor && { cursor: cursor },\n\t\t\tsinglePoints = series.singlePoints,\n\t\t\tsinglePoint,\n\t\t\ti,\n\t\t\tonMouseOver;\n\n\t\tonMouseOver = function () {\n\t\t\tif (chart.hoverSeries !== series) {\n\t\t\t\tseries.onMouseOver();\n\t\t\t}\n\t\t};\n\t\t// Extend end points. A better way would be to use round linecaps,\n\t\t// but those are not clickable in VML.\n\t\tif (trackerPathLength && !trackByArea) {\n\t\t\ti = trackerPathLength + 1;\n\t\t\twhile (i--) {\n\t\t\t\tif (trackerPath[i] === M) { // extend left side\n\t\t\t\t\ttrackerPath.splice(i + 1, 0, trackerPath[i + 1] - snap, trackerPath[i + 2], L);\n\t\t\t\t}\n\t\t\t\tif ((i && trackerPath[i] === M) || i === trackerPathLength) { // extend right side\n\t\t\t\t\ttrackerPath.splice(i, 0, L, trackerPath[i - 2] + snap, trackerPath[i - 1]);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t// handle single points\n\t\tfor (i = 0; i < singlePoints.length; i++) {\n\t\t\tsinglePoint = singlePoints[i];\n\t\t\tif (singlePoint.plotX && singlePoint.plotY) {\n\t\t\t\ttrackerPath.push(M, singlePoint.plotX - snap, singlePoint.plotY,\n\t\t\t\t\tL, singlePoint.plotX + snap, singlePoint.plotY);\n\t\t\t}\n\t\t}\n\t\t\n\t\t// draw the tracker\n\t\tif (tracker) {\n\t\t\ttracker.attr({ d: trackerPath });\n\t\t} else { // create\n\t\t\tseries.tracker = renderer.path(trackerPath)\n\t\t\t.attr({\n\t\t\t\t'stroke-linejoin': 'round', // #1225\n\t\t\t\tvisibility: series.visible ? VISIBLE : HIDDEN,\n\t\t\t\tstroke: TRACKER_FILL,\n\t\t\t\tfill: trackByArea ? TRACKER_FILL : NONE,\n\t\t\t\t'stroke-width': options.lineWidth + (trackByArea ? 0 : 2 * snap),\n\t\t\t\tzIndex: 2\n\t\t\t})\n\t\t\t.add(series.group);\n\t\t\t\n\t\t\t// The tracker is added to the series group, which is clipped, but is covered\n\t\t\t// by the marker group. So the marker group also needs to capture events.\n\t\t\teach([series.tracker, series.markerGroup], function (track) {\n\t\t\t\ttrack.addClass(PREFIX + 'tracker')\n\t\t\t\t.on('mouseover', onMouseOver)\n\t\t\t\t.on('mouseout', function (e) { pointer.onTrackerMouseOut(e); })\n\t\t\t\t.css(css);\n\t\t\t\t\n\t\t\t\tif (hasTouch) {\n\t\t\t\t\ttrack.on('touchstart', onMouseOver);\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t\t\n\t};\n\t\n\tH.seriesTypes.coloredline.prototype.setState = function (state) {\n\t\tvar series = this,\n\t\t\toptions = series.options,\n\t\t\tgraph = series.graph,\n\t\t\tstateOptions = options.states,\n\t\t\tlineWidth = options.lineWidth,\n\t\t\tattribs;\n\t\t\n\t\tstate = state || NORMAL_STATE;\n\t\t\n\t\tif (series.state !== state) {\n\t\t\tseries.state = state;\n\t\t\t\n\t\t\tif (stateOptions[state] && stateOptions[state].enabled === false) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t\n\t\t\tif (state) {\n\t\t\t\tlineWidth = stateOptions[state].lineWidth || lineWidth + 1;\n\t\t\t}\n\t\t\t\n\t\t\tif (graph && !graph.dashstyle) { // hover is turned off for dashed lines in VML\n\t\t\t\tattribs = {\n\t\t\t\t\t'stroke-width': lineWidth\n\t\t\t\t};\n\t\t\t\t// use attr because animate will cause any other animation on the graph to stop\n\t\t\t\teach(graph, function (seg) {\n\t\t\t\t\tseg.attr(attribs);\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t};\n\t\n\t/**\n\t* The main change to get multi color isFinite changes segments array.\n\t* From array of points to object with color and array of points.\n\t* @returns {undefined}\n\t**/\n\tH.seriesTypes.coloredline.prototype.getSegments = function () {\n\t\tvar series = this,\n\t\t\tlastColor = 0,\n\t\t\tsegments = [],\n\t\t\ti,\n\t\t\tpoints = series.points,\n\t\t\tpointsLength = points.length;\n\t\t\n\t\tif (pointsLength) { // no action required for []\n\t\t\t\n\t\t\t// if connect nulls, just remove null points\n\t\t\tif (series.options.connectNulls) {\n\t\t\t\t// iterate backwars for secure point removal\n\t\t\t\tfor (i = pointsLength - 1; i >= 0; --i) {\n\t\t\t\t\tif (points[i].y === null) {\n\t\t\t\t\t\tpoints.splice(i, 1);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tpointsLength = points.length;\n\t\t\t\t\n\t\t\t\teach(points, function (point, j) {\n\t\t\t\t\tif (j > 0 && points[j].segmentColor !== points[j - 1].segmentColor) {\n\t\t\t\t\t\tsegments.push({\n\t\t\t\t\t\t\tpoints: points.slice(lastColor, j + 1),\n\t\t\t\t\t\t\tcolor: points[j - 1].segmentColor\n\t\t\t\t\t\t});\n\t\t\t\t\t\tlastColor = j;\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\t// add the last segment (only single-point last segement is added)\n\t\t\t\tif (lastColor !== pointsLength - 1) {\n\t\t\t\t\tsegments.push({\n\t\t\t\t\t\tpoints: points.slice(lastColor, pointsLength),\n\t\t\t\t\t\tcolor: points[pointsLength - 1].segmentColor\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (points.length && segments.length === 0) {\n\t\t\t\t\tsegments = [points];\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// else, split on null points or different colors\n\t\t\t} else {\n\t\t\t\tvar previousColor = null;\n\t\t\t\teach(points, function (point, j) {\n\t\t\t\t\tvar colorChanged = j > 0 && (point.y === null || points[j - 1].y === null || (point.segmentColor !== points[j - 1].segmentColor && points[j].segmentColor !== previousColor)),\n\t\t\t\t\t\tcolorExists = points[j - 1] && points[j - 1].segmentColor && points[j - 1].y !== null ? true : false;\n\t\t\t\t\t\n\t\t\t\t\t// handle first point\n\t\t\t\t\tif (!previousColor && point.segmetColor) {\n\t\t\t\t\t\tpreviousColor = point.segmentColor;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif (colorChanged) {\n\t\t\t\t\t\tvar p = points.slice(lastColor, j + 1);\n\t\t\t\t\t\tif (p.length > 0) {\n\t\t\t\t\t\t\t// do not create segments with null ponits\n\t\t\t\t\t\t\teach(p, function (pointObject, k) {\n\t\t\t\t\t\t\t\tif (pointObject.y === null) {\n\t\t\t\t\t\t\t\t\t// remove null points (might be on edges)\n\t\t\t\t\t\t\t\t\tp.splice(k, 1);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tsegments.push({\n\t\t\t\t\t\t\t\tpoints: p,\n\t\t\t\t\t\t\t\tcolor: colorExists ? points[j - 1].segmentColor : previousColor\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\tlastColor = j;\n\t\t\t\t\t\t}\n\t\t\t\t\t} else if (j === pointsLength - 1) {\n\t\t\t\t\t\tvar next = j + 1;\n\t\t\t\t\t\tif (point.y === null) {\n\t\t\t\t\t\t\tnext--;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tp = points.slice(lastColor, next);\n\t\t\t\t\t\tif (p.length > 0) {\n\t\t\t\t\t\t\t// do not create segments with null ponits\n\t\t\t\t\t\t\teach(p, function (pointObject, k) {\n\t\t\t\t\t\t\t\tif (pointObject.y === null) {\n\t\t\t\t\t\t\t\t\t// remove null points (might be on edges)\n\t\t\t\t\t\t\t\t\tp.splice(k, 1);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\tsegments.push({\n\t\t\t\t\t\t\t\tpoints: p,\n\t\t\t\t\t\t\t\tcolor: colorExists ? points[j - 1].segmentColor : previousColor\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\tlastColor = j;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t// store previous color\n\t\t\t\t\tif (point) {\n\t\t\t\t\t\tpreviousColor = point.segmentColor;\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t\t// register it\n\t\tseries.segments = segments;\n\t};\n\t\n\tH.seriesTypes.coloredline.prototype.getGraphPath = function () {\n\t\t// var ret = f.apply(this, Array.prototype.slice.call(arguments, 1));\n\t\tvar series = this,\n\t\t\tgraphPath = [],\n\t\t\tsegmentPath,\n\t\t\tsinglePoints = []; // used in drawTracker\n\t\t// Divide into segments and build graph and area paths\n\t\teach(series.segments, function (segment) {\n\t\t\tsegmentPath = series.getSegmentPath(segment.points);\n\t\t\t// add the segment to the graph, or a single point for tracking\n\t\t\tif (segment.points.length > 1) {\n\t\t\t\tgraphPath.push([segmentPath, segment.color]);\n\t\t\t} else {\n\t\t\t\tsinglePoints.push(segment.points);\n\t\t\t}\n\t\t});\n\t\t\n\t\t// Record it for use in drawGraph and drawTracker, and return graphPath\n\t\tseries.singlePoints = singlePoints;\n\t\tseries.graphPath = graphPath;\n\t\t\n\t\treturn graphPath;\n\t};\n\t\n\tH.seriesTypes.coloredline.prototype.drawGraph = function () {\n\t\tvar series = this,\n\t\t\toptions = series.options,\n\t\t\tprops = [['graph', options.lineColor || series.color]],\n\t\t\tlineWidth = options.lineWidth,\n\t\t\tdashStyle = options.dashStyle,\n\t\t\troundCap = options.linecap !== 'square',\n\t\t\tgraphPath = series.getGraphPath(),\n\t\t\tgraphPathLength = graphPath.length,\n\t\t\tgraphSegmentsLength = 0;\n\t\t\n\t\tfunction getSegment(segment, prop, i) {\n\t\t\tvar attribs = {\n\t\t\t\t\tstroke: prop[1],\n\t\t\t\t\t'stroke-width': lineWidth,\n\t\t\t\t\tzIndex: 1 // #1069\n\t\t\t\t},\n\t\t\t\titem;\n\t\t\tif (dashStyle) {\n\t\t\t\tattribs.dashstyle = dashStyle;\n\t\t\t} else if (roundCap) {\n\t\t\t\tattribs['stroke-linecap'] = attribs['stroke-linejoin'] = 'round';\n\t\t\t}\n\t\t\tif (segment[1]) {\n\t\t\t\tattribs.stroke = segment[1];\n\t\t\t}\n\t\t\t\n\t\t\titem = series.chart.renderer.path(segment[0])\n\t\t\t.attr(attribs)\n\t\t\t.add(series.group)\n\t\t\t.shadow(!i && options.shadow);\n\t\t\t\n\t\t\treturn item;\n\t\t}\n\n\t\t// draw the graph\n\t\teach(props, function (prop, i) {\n\t\t\tvar graphKey = prop[0],\n\t\t\t\tgraph = series[graphKey],\n\t\t\t\tg;\n\t\t\t\n\t\t\tif (graph) { // cancel running animations, #459\n\t\t\t\t// do we have animation\n\t\t\t\teach(graphPath, function (segment, j) {\n\t\t\t\t\t// update color and path\n\t\t\t\t\t\n\t\t\t\t\tif (series[graphKey][j]) {\n\t\t\t\t\t\tseries[graphKey][j].attr({ d: segment[0], stroke: segment[1] });\n\t\t\t\t\t} else {\n\t\t\t\t\t\tseries[graphKey][j] = getSegment(segment, prop, i);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\t\n\t\t\t} else if (lineWidth && graphPath.length) { // #1487\n\t\t\t\tgraph = [];\n\t\t\t\teach(graphPath, function (segment, j) {\n\t\t\t\t\tgraph[j] = getSegment(segment, prop, i);\n\t\t\t\t});\n\t\t\t\tseries[graphKey] = graph;\n\t\t\t\t// add destroying elements\n\t\t\t\tseries[graphKey].destroy = function () {\n\t\t\t\t\tfor (g in series[graphKey]) { // eslint-disable-line\n\t\t\t\t\t\tvar el = series[graphKey][g];\n\t\t\t\t\t\tif (el && el.destroy) {\n\t\t\t\t\t\t\tel.destroy();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t}\n\t\t\t// Checks if series.graph exists. #3\n\t\t\tgraphSegmentsLength = (series.graph && series.graph.length) || -1;\n\t\t\t\n\t\t\tfor (var j = graphSegmentsLength; j >= graphPathLength; j--) {\n\t\t\t\tif (series[graphKey][j]) {\n\t\t\t\t\tseries[graphKey][j].destroy();\n\t\t\t\t\tseries[graphKey].splice(j, 1);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t};\n\n\tH.wrap(seriesTypes.coloredline.prototype, 'translate', function (proceed) {\n\t\tproceed.apply(this, [].slice.call(arguments, 1));\n\t\tif (this.getSegments) {\n\t\t\tthis.getSegments();\n\t\t}\n\t});\n\t\n\t\n\t\n\t/**\n\t*\n\t* ColoredArea series type\n\t*\n\t**/\n\tseriesTypes.coloredarea = H.extendClass(seriesTypes.coloredline);\n\t\n\tH.seriesTypes.coloredarea.prototype.init = function (chart, options) {\n\t\toptions.threshold = options.threshold || null;\n\t\tH.Series.prototype.init.call(this, chart, options);\n\t};\n\t\n\tH.seriesTypes.coloredarea.prototype.closeSegment = function (path, segment, translatedThreshold) {\n\t\tpath.push(\n\t\t\tL,\n\t\t\tsegment[segment.length - 1].plotX,\n\t\t\ttranslatedThreshold,\n\t\t\tL,\n\t\t\tsegment[0].plotX,\n\t\t\ttranslatedThreshold\n\t\t);\n\t};\n\t\n\tH.seriesTypes.coloredarea.prototype.drawGraph = function (f) {\n\t\tH.seriesTypes.coloredline.prototype.drawGraph.call(this, f);\n\t\tvar series = this,\n\t\t\toptions = this.options,\n\t\t\tprops = [['graph', options.lineColor || series.color]];\n\n\t\teach(props, function (prop) {\n\t\t\tvar graphKey = prop[0],\n\t\t\t\tgraph = series[graphKey];\n\t\t\t\n\t\t\tif (graph) { // cancel running animations, #459\n\t\t\t\t// do we have animation\n\t\t\t\teach(series.graphPath, function (segment, j) {\n\t\t\t\t\t// update color and path\n\t\t\t\t\t\n\t\t\t\t\tif (series[graphKey][j]) {\n\t\t\t\t\t\tseries[graphKey][j].attr({ fill: segment[1] });\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\t\n\t\t\t}\n\t\t});\n\t};\n\n\t/**\n\t* Extend the base Series getSegmentPath method by adding the path for the area.\n\t* This path is pushed to the series.areaPath property.\n\t* @param {object} segment of the path\n\t* @returns {array} Path (SVG)\n\t**/\n\tH.seriesTypes.coloredarea.prototype.getSegmentPath = function (segment) {\n\t\tvar segmentPath = H.Series.prototype.getSegmentPath.call(this, segment), // call base method\n\t\t\tareaSegmentPath = [].concat(segmentPath), // work on a copy for the area path\n\t\t\ti,\n\t\t\toptions = this.options,\n\t\t\tsegLength = segmentPath.length,\n\t\t\ttranslatedThreshold = this.yAxis.getThreshold(options.threshold), // #2181\n\t\t\tyBottom;\n\n\t\tif (segLength === 3) { // for animation from 1 to two points\n\t\t\tareaSegmentPath.push(L, segmentPath[1], segmentPath[2]);\n\t\t}\n\t\tif (options.stacking && !this.closedStacks) {\n\t\t\tfor (i = segment.length - 1; i >= 0; i--) {\n\n\t\t\t\tyBottom = pick(segment[i].yBottom, translatedThreshold);\n\n\t\t\t\t// step line?\n\t\t\t\tif (i < segment.length - 1 && options.step) {\n\t\t\t\t\tareaSegmentPath.push(segment[i + 1].plotX, yBottom);\n\t\t\t\t}\n\t\t\t\tareaSegmentPath.push(segment[i].plotX, yBottom);\n\t\t\t}\n\t\t} else { // follow zero line back\n\t\t\tthis.closeSegment(areaSegmentPath, segment, translatedThreshold);\n\t\t}\n\t\treturn areaSegmentPath;\n\t};\n\t\n\tH.seriesTypes.coloredarea.prototype.getGraphPath = function () {\n\t\tvar series = this,\n\t\t\tgraphPath = [],\n\t\t\tsegmentPath,\n\t\t\tsinglePoints = []; // used in drawTracker\n\t\t// Divide into segments and build graph and area paths\n\t\t\n\t\tthis.areaPath = [];\n\t\teach(series.segments, function (segment) {\n\t\t\tsegmentPath = series.getSegmentPath(segment.points);\n\t\t\t// add the segment to the graph, or a single point for tracking\n\t\t\tif (segment.points.length > 1) {\n\t\t\t\tgraphPath.push([segmentPath, segment.color]);\n\t\t\t} else {\n\t\t\t\tsinglePoints.push(segment.points);\n\t\t\t}\n\t\t});\n\t\t\n\t\t// Record it for use in drawGraph and drawTracker, and return graphPath\n\t\tseries.singlePoints = singlePoints;\n\t\tseries.graphPath = graphPath;\n\t\treturn graphPath;\n\t\n\t};\n\t\n\tH.seriesTypes.coloredarea.prototype.drawLegendSymbol = H.LegendSymbolMixin.drawRectangle;\n}));"]} \ No newline at end of file +{"version":3,"sources":["js/multicolor_series.js"],"names":["factory","module","exports","Highcharts","H","getPath","arr","ret","each","el","concat","seriesTypes","pick","hasTouch","UNDEFINED","document","documentElement","ontouchstart","TRACKER_FILL","hasSVG","Series","prototype","getSegmentPath","H.Series.prototype.getSegmentPath","segment","series","segmentPath","step","options","point","i","plotX","plotY","getPointSpline","push","apply","L","M","lastPoint","coloredline","extendClass","line","processData","H.seriesTypes.coloredline.prototype.processData","force","processedXData","xData","processedYData","yData","closestPointRange","xAxis","isCartesian","isDirty","yAxis","length","distance","requireSorting","window","console","log","msg","cropped","cropStart","pointRange","drawTracker","H.seriesTypes.coloredline.prototype.drawTracker","trackByArea","trackerPath","areaPath","graphPath","trackerPathLength","chart","pointer","renderer","snap","tooltip","tracker","cursor","css","singlePoints","onMouseOver","hoverSeries","splice","singlePoint","attr","d","path","visibility","visible","VISIBLE","HIDDEN","stroke","fill","NONE","lineWidth","zIndex","add","group","markerGroup","track","addClass","on","e","onTrackerMouseOut","setState","H.seriesTypes.coloredline.prototype.setState","state","graph","stateOptions","states","attribs","NORMAL_STATE","enabled","dashstyle","seg","getSegments","H.seriesTypes.coloredline.prototype.getSegments","lastColor","segments","points","pointsLength","connectNulls","y","j","segmentColor","slice","color","previousColor","colorChanged","colorExists","segmetColor","p","pointObject","k","next","getGraphPath","H.seriesTypes.coloredline.prototype.getGraphPath","drawGraph","H.seriesTypes.coloredline.prototype.drawGraph","getSegment","prop","dashStyle","roundCap","shadow","item","props","lineColor","linecap","graphPathLength","graphSegmentsLength","graphKey","g","destroy","wrap","proceed","call","arguments","coloredarea","init","H.seriesTypes.coloredarea.prototype.init","threshold","closeSegment","H.seriesTypes.coloredarea.prototype.closeSegment","translatedThreshold","H.seriesTypes.coloredarea.prototype.drawGraph","f","H.seriesTypes.coloredarea.prototype.getSegmentPath","closePath","areaSegmentPath","segLength","getThreshold","stacking","closedStacks","yBottom","H.seriesTypes.coloredarea.prototype.getGraphPath","shouldClosePath","drawLegendSymbol","LegendSymbolMixin","drawRectangle"],"mappings":"A;aAYC,SAAS,CAACA,CAAD,CAAU,CACG,QAAtB,GAAI,MAAOC,OAAX,EAAkCA,MAAAC,QAAlC,CACCD,MAAAC,QADD,CACkBF,CADlB,CAGCA,CAAA,CAAQG,UAAR,CAJkB,CAAnB,CAAA,CAMC,QAAS,CAACC,CAAD,CAAI,CA6CdC,QAASA,EAAO,CAACC,CAAD,CAAM,CACrB,IAAIC,EAAM,EACVC,EAAA,CAAKF,CAAL,CAAU,QAAS,CAACG,CAAD,CAAK,CACvBF,CAAA,CAAMA,CAAAG,OAAA,CAAWD,CAAA,CAAG,CAAH,CAAX,CADiB,CAAxB,CAGA,OAAOF,EALc,CA7CR,IACVC,EAAOJ,CAAAI,KADG,CAEbG,EAAcP,CAAAO,YAFD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CAAkBO,CAAlB;AAAmChJ,CAAnC,CAA4C2I,CAA5C,CAED,OAAOK,EA5B2E,CA+BnFpK,EAAAO,YAAAkJ,YAAAxI,UAAAkH,aAAA,CAAmDuC,QAAS,EAAG,CAAA,IAC1DrJ,EAAS,IADiD,CAE7D4C,EAAY,EAFiD,CAG7D3C,CAH6D,CAI7DqD,EAAe,EAGhB,KAAAX,SAAA,CAAgB,EAChB5D,EAAA,CAAKiB,CAAA6F,SAAL,CAAsB,QAAS,CAAC9F,CAAD,CAAU,CAExCE,CAAA,CAAcD,CAAAH,eAAA,CAAsBE,CAAA+F,OAAtB,CADQwD,CAAEjD,CAAAtG,CAAAsG,MACV,CAEc,EAA5B,CAAItG,CAAA+F,OAAAjE,OAAJ,CACCe,CAAAnC,KAAA,CAAe,CAACR,CAAD,CAAcF,CAAAsG,MAAd,CAAf,CADD,CAGC/C,CAAA7C,KAAA,CAAkBV,CAAA+F,OAAlB,CAPuC,CAAzC,CAYA9F,EAAAsD,aAAA,CAAsBA,CAEtB,OADAtD,EAAA4C,UACA,CADmBA,CArB2C,CA0B/DjE,EAAAO,YAAAkJ,YAAAxI,UAAA2J,iBAAA,CAAuD5K,CAAA6K,kBAAAC,cAnmBzC,CANd","file":"multicolor_series.min.js","sourceRoot":"/source/","sourcesContent":["/**\n* Multicolor Series v2.2.1-0(2016-06-24)\n*\n* (c) 2012-2016 Black Label\n*\n* License: Creative Commons Attribution (CC)\n*/\n/* global Highcharts window document module:true */\n/**\n * @fileoverview\n * @suppress {checkTypes}\n */\n(function (factory) {\n\tif (typeof module === 'object' && module.exports) {\n\t\tmodule.exports = factory;\n\t} else {\n\t\tfactory(Highcharts);\n\t}\n}(function (H) {\n\tvar each = H.each,\n\t\tseriesTypes = H.seriesTypes,\n\t\tpick = H.pick,\n\t\tUNDEFINED,\n\t\tNORMAL_STATE = '',\n\t\tVISIBLE = 'visible',\n\t\tHIDDEN = 'hidden',\n\t\tPREFIX = 'highcharts-',\n\t\tNONE = 'none',\n\t\thasTouch = document.documentElement.ontouchstart !== UNDEFINED,\n\t\tTRACKER_FILL = 'rgba(192,192,192,' + (H.hasSVG ? 0.0001 : 0.002) + ')', // invisible but clickable\n\t\tM = 'M',\n\t\tL = 'L';\n\n\t// handle unsorted data, throw error anyway\n\tfunction error(code, stop) {\n\t\tvar msg = 'Highcharts error #' + code + ': www.highcharts.com/errors/' + code;\n\t\tif (stop) {\n\t\t\tthrow msg;\n\t\t} else if (window.console) {\n\t\t\tconsole.log(msg); // eslint-disable-line\n\t\t}\n\t}\n\n\t/**\n\tIf replacing L and M in tracker will be necessary use that getPath():\n\n\tfunction getPath(arr){\n\tvar ret = [];\n\teach(arr, function(el, ind) {\n\tvar len = el[0].length;\n\tfor(var i = 0; i < len; i++){\n\tvar p = el[0][i];\n\tif(p == M && ind != 0 && i == 0) {\n\tp = L;\n\t}\n\tret.push(p);\n\t}\n\t});\n\treturn ret;\n\t}\n\t**/\n\n\n\tfunction getPath(arr) {\n\t\tvar ret = [];\n\t\teach(arr, function (el) {\n\t\t\tret = ret.concat(el[0]);\n\t\t});\n\t\treturn ret;\n\t}\n\n\t/**\n\t * Return the graph path of a segment - compatibility with 4.2.3+\n\t * @param {object} segment of the path\n\t * @returns {array} Path (SVG)\n\t */\n\tH.Series.prototype.getSegmentPath = function (segment) {\n\t\tvar series = this,\n\t\t\tsegmentPath = [],\n\t\t\tstep = series.options.step;\n\n\t\t// build the segment line\n\t\teach(segment, function (point, i) {\n\t\t\tvar plotX = point.plotX,\n\t\t\t\tplotY = point.plotY,\n\t\t\t\tlastPoint;\n\n\t\t\tif (series.getPointSpline) {\n\t\t\t\t// generate the spline as defined in the SplineSeries object\n\t\t\t\tsegmentPath.push.apply(segmentPath, series.getPointSpline(segment, point, i));\n\t\t\t} else {\n\t\t\t\t// moveTo or lineTo\n\t\t\t\tsegmentPath.push(i ? L : M);\n\n\t\t\t\t// step line?\n\t\t\t\tif (step && i) {\n\t\t\t\t\tlastPoint = segment[i - 1];\n\t\t\t\t\tif (step === 'right') {\n\t\t\t\t\t\tsegmentPath.push(\n\t\t\t\t\t\t\tlastPoint.plotX,\n\t\t\t\t\t\t\tplotY,\n\t\t\t\t\t\t\tL\n\t\t\t\t\t\t);\n\t\t\t\t\t} else if (step === 'center') {\n\t\t\t\t\t\tsegmentPath.push(\n\t\t\t\t\t\t\t(lastPoint.plotX + plotX) / 2,\n\t\t\t\t\t\t\tlastPoint.plotY,\n\t\t\t\t\t\t\tL,\n\t\t\t\t\t\t\t(lastPoint.plotX + plotX) / 2,\n\t\t\t\t\t\t\tplotY,\n\t\t\t\t\t\t\tL\n\t\t\t\t\t\t);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tsegmentPath.push(\n\t\t\t\t\t\t\tplotX,\n\t\t\t\t\t\t\tlastPoint.plotY,\n\t\t\t\t\t\t\tL\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// normal line to next point\n\t\t\t\tsegmentPath.push(\n\t\t\t\t\tpoint.plotX,\n\t\t\t\t\tpoint.plotY\n\t\t\t\t);\n\t\t\t}\n\t\t});\n\n\t\treturn segmentPath;\n\t};\n\n\t/**\n\t*\n\t* ColoredLine series type\n\t*\n\t**/\n\n\tseriesTypes.coloredline = H.extendClass(seriesTypes.line);\n\n\tH.seriesTypes.coloredline.prototype.processData = function (force) {\n\t\tvar series = this,\n\t\t\tprocessedXData = series.xData, // copied during slice operation below\n\t\t\tprocessedYData = series.yData,\n\t\t\tcropStart = 0,\n\t\t\tcropped,\n\t\t\tdistance,\n\t\t\tclosestPointRange,\n\t\t\txAxis = series.xAxis,\n\t\t\ti, // loop variable\n\t\t\toptions = series.options,\n\t\t\tisCartesian = series.isCartesian;\n\n\t\t// If the series data or axes haven't changed, don't go through this. Return false to pass\n\t\t// the message on to override methods like in data grouping.\n\t\tif (isCartesian && !series.isDirty && !xAxis.isDirty && !series.yAxis.isDirty && !force) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Find the closest distance between processed points\n\t\tfor (i = processedXData.length - 1; i >= 0; i--) {\n\t\t\tdistance = processedXData[i] - processedXData[i - 1];\n\t\t\tif (distance > 0 && (closestPointRange === UNDEFINED || distance < closestPointRange)) {\n\t\t\t\tclosestPointRange = distance;\n\n\t\t\t\t// Unsorted data is not supported by the line tooltip, as well as data grouping and\n\t\t\t\t// navigation in Stock charts (#725) and width calculation of columns (#1900)\n\t\t\t} else if (distance < 0 && series.requireSorting) {\n\t\t\t\terror(15);\n\t\t\t}\n\t\t}\n\n\t\t// Record the properties\n\t\tseries.cropped = cropped; // undefined or true\n\t\tseries.cropStart = cropStart;\n\t\tseries.processedXData = processedXData;\n\t\tseries.processedYData = processedYData;\n\n\t\tif (options.pointRange === null) { // null means auto, as for columns, candlesticks and OHLC\n\t\t\tseries.pointRange = closestPointRange || 1;\n\t\t}\n\t\tseries.closestPointRange = closestPointRange;\n\t\treturn true;\n\t};\n\n\tH.seriesTypes.coloredline.prototype.drawTracker = function () {\n\t\tvar series = this,\n\t\t\toptions = series.options,\n\t\t\ttrackByArea = options.trackByArea,\n\t\t\ttrackerPath = [].concat(trackByArea ? series.areaPath : getPath(series.graphPath)),\n\t\t\ttrackerPathLength = trackerPath.length,\n\t\t\tchart = series.chart,\n\t\t\tpointer = chart.pointer,\n\t\t\trenderer = chart.renderer,\n\t\t\tsnap = chart.options.tooltip.snap,\n\t\t\ttracker = series.tracker,\n\t\t\tcursor = options.cursor,\n\t\t\tcss = cursor && { cursor: cursor },\n\t\t\tsinglePoints = series.singlePoints,\n\t\t\tsinglePoint,\n\t\t\ti,\n\t\t\tonMouseOver;\n\n\t\tonMouseOver = function () {\n\t\t\tif (chart.hoverSeries !== series) {\n\t\t\t\tseries.onMouseOver();\n\t\t\t}\n\t\t};\n\t\t// Extend end points. A better way would be to use round linecaps,\n\t\t// but those are not clickable in VML.\n\t\tif (trackerPathLength && !trackByArea) {\n\t\t\ti = trackerPathLength + 1;\n\t\t\twhile (i--) {\n\t\t\t\tif (trackerPath[i] === M) { // extend left side\n\t\t\t\t\ttrackerPath.splice(i + 1, 0, trackerPath[i + 1] - snap, trackerPath[i + 2], L);\n\t\t\t\t}\n\t\t\t\tif ((i && trackerPath[i] === M) || i === trackerPathLength) { // extend right side\n\t\t\t\t\ttrackerPath.splice(i, 0, L, trackerPath[i - 2] + snap, trackerPath[i - 1]);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// handle single points\n\t\tfor (i = 0; i < singlePoints.length; i++) {\n\t\t\tsinglePoint = singlePoints[i];\n\t\t\tif (singlePoint.plotX && singlePoint.plotY) {\n\t\t\t\ttrackerPath.push(M, singlePoint.plotX - snap, singlePoint.plotY,\n\t\t\t\t\tL, singlePoint.plotX + snap, singlePoint.plotY);\n\t\t\t}\n\t\t}\n\n\t\t// draw the tracker\n\t\tif (tracker) {\n\t\t\ttracker.attr({ d: trackerPath });\n\t\t} else { // create\n\t\t\tseries.tracker = renderer.path(trackerPath)\n\t\t\t.attr({\n\t\t\t\t'stroke-linejoin': 'round', // #1225\n\t\t\t\tvisibility: series.visible ? VISIBLE : HIDDEN,\n\t\t\t\tstroke: TRACKER_FILL,\n\t\t\t\tfill: trackByArea ? TRACKER_FILL : NONE,\n\t\t\t\t'stroke-width': options.lineWidth + (trackByArea ? 0 : 2 * snap),\n\t\t\t\tzIndex: 2\n\t\t\t})\n\t\t\t.add(series.group);\n\n\t\t\t// The tracker is added to the series group, which is clipped, but is covered\n\t\t\t// by the marker group. So the marker group also needs to capture events.\n\t\t\teach([series.tracker, series.markerGroup], function (track) {\n\t\t\t\ttrack.addClass(PREFIX + 'tracker')\n\t\t\t\t.on('mouseover', onMouseOver)\n\t\t\t\t.on('mouseout', function (e) { pointer.onTrackerMouseOut(e); })\n\t\t\t\t.css(css);\n\n\t\t\t\tif (hasTouch) {\n\t\t\t\t\ttrack.on('touchstart', onMouseOver);\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\n\t};\n\n\tH.seriesTypes.coloredline.prototype.setState = function (state) {\n\t\tvar series = this,\n\t\t\toptions = series.options,\n\t\t\tgraph = series.graph,\n\t\t\tstateOptions = options.states,\n\t\t\tlineWidth = options.lineWidth,\n\t\t\tattribs;\n\n\t\tstate = state || NORMAL_STATE;\n\n\t\tif (series.state !== state) {\n\t\t\tseries.state = state;\n\n\t\t\tif (stateOptions[state] && stateOptions[state].enabled === false) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif (state) {\n\t\t\t\tlineWidth = stateOptions[state].lineWidth || lineWidth + 1;\n\t\t\t}\n\n\t\t\tif (graph && !graph.dashstyle) { // hover is turned off for dashed lines in VML\n\t\t\t\tattribs = {\n\t\t\t\t\t'stroke-width': lineWidth\n\t\t\t\t};\n\t\t\t\t// use attr because animate will cause any other animation on the graph to stop\n\t\t\t\teach(graph, function (seg) {\n\t\t\t\t\tseg.attr(attribs);\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t};\n\n\t/**\n\t* The main change to get multi color isFinite changes segments array.\n\t* From array of points to object with color and array of points.\n\t* @returns {undefined}\n\t**/\n\tH.seriesTypes.coloredline.prototype.getSegments = function () {\n\t\tvar series = this,\n\t\t\tlastColor = 0,\n\t\t\tsegments = [],\n\t\t\ti,\n\t\t\tpoints = series.points,\n\t\t\tpointsLength = points.length;\n\n\t\tif (pointsLength) { // no action required for []\n\n\t\t\t// if connect nulls, just remove null points\n\t\t\tif (series.options.connectNulls) {\n\t\t\t\t// iterate backwars for secure point removal\n\t\t\t\tfor (i = pointsLength - 1; i >= 0; --i) {\n\t\t\t\t\tif (points[i].y === null) {\n\t\t\t\t\t\tpoints.splice(i, 1);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tpointsLength = points.length;\n\n\t\t\t\teach(points, function (point, j) {\n\t\t\t\t\tif (j > 0 && points[j].segmentColor !== points[j - 1].segmentColor) {\n\t\t\t\t\t\tsegments.push({\n\t\t\t\t\t\t\tpoints: points.slice(lastColor, j + 1),\n\t\t\t\t\t\t\tcolor: points[j - 1].segmentColor\n\t\t\t\t\t\t});\n\t\t\t\t\t\tlastColor = j;\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\t// add the last segment (only single-point last segement is added)\n\t\t\t\tif (lastColor !== pointsLength - 1) {\n\t\t\t\t\tsegments.push({\n\t\t\t\t\t\tpoints: points.slice(lastColor, pointsLength),\n\t\t\t\t\t\tcolor: points[pointsLength - 1].segmentColor\n\t\t\t\t\t});\n\t\t\t\t}\n\n\t\t\t\tif (points.length && segments.length === 0) {\n\t\t\t\t\tsegments = [points];\n\t\t\t\t}\n\n\t\t\t\t// else, split on null points or different colors\n\t\t\t} else {\n\t\t\t\tvar previousColor = null;\n\t\t\t\teach(points, function (point, j) {\n\t\t\t\t\tvar colorChanged = j > 0 && (point.y === null || points[j - 1].y === null || (point.segmentColor !== points[j - 1].segmentColor && points[j].segmentColor !== previousColor)),\n\t\t\t\t\t\tcolorExists = points[j - 1] && points[j - 1].segmentColor && points[j - 1].y !== null ? true : false;\n\n\t\t\t\t\t// handle first point\n\t\t\t\t\tif (!previousColor && point.segmetColor) {\n\t\t\t\t\t\tpreviousColor = point.segmentColor;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (colorChanged) {\n\t\t\t\t\t\tvar p = points.slice(lastColor, j + 1);\n\t\t\t\t\t\tif (p.length > 0) {\n\t\t\t\t\t\t\t// do not create segments with null ponits\n\t\t\t\t\t\t\teach(p, function (pointObject, k) {\n\t\t\t\t\t\t\t\tif (pointObject.y === null) {\n\t\t\t\t\t\t\t\t\t// remove null points (might be on edges)\n\t\t\t\t\t\t\t\t\tp.splice(k, 1);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t});\n\n\t\t\t\t\t\t\tsegments.push({\n\t\t\t\t\t\t\t\tpoints: p,\n\t\t\t\t\t\t\t\tcolor: colorExists ? points[j - 1].segmentColor : previousColor\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\tlastColor = j;\n\t\t\t\t\t\t}\n\t\t\t\t\t} else if (j === pointsLength - 1) {\n\t\t\t\t\t\tvar next = j + 1;\n\t\t\t\t\t\tif (point.y === null) {\n\t\t\t\t\t\t\tnext--;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tp = points.slice(lastColor, next);\n\t\t\t\t\t\tif (p.length > 0) {\n\t\t\t\t\t\t\t// do not create segments with null ponits\n\t\t\t\t\t\t\teach(p, function (pointObject, k) {\n\t\t\t\t\t\t\t\tif (pointObject.y === null) {\n\t\t\t\t\t\t\t\t\t// remove null points (might be on edges)\n\t\t\t\t\t\t\t\t\tp.splice(k, 1);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\tsegments.push({\n\t\t\t\t\t\t\t\tpoints: p,\n\t\t\t\t\t\t\t\tcolor: colorExists ? points[j - 1].segmentColor : previousColor\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\tlastColor = j;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t\t// store previous color\n\t\t\t\t\tif (point) {\n\t\t\t\t\t\tpreviousColor = point.segmentColor;\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t\t// register it\n\t\tseries.segments = segments;\n\t};\n\n\tH.seriesTypes.coloredline.prototype.getGraphPath = function () {\n\t\t// var ret = f.apply(this, Array.prototype.slice.call(arguments, 1));\n\t\tvar series = this,\n\t\t\tgraphPath = [],\n\t\t\tsegmentPath,\n\t\t\tsinglePoints = []; // used in drawTracker\n\t\t// Divide into segments and build graph and area paths\n\t\teach(series.segments, function (segment) {\n\t\t\tsegmentPath = series.getSegmentPath(segment.points);\n\t\t\t// add the segment to the graph, or a single point for tracking\n\t\t\tif (segment.points.length > 1) {\n\t\t\t\tgraphPath.push([segmentPath, segment.color]);\n\t\t\t} else {\n\t\t\t\tsinglePoints.push(segment.points);\n\t\t\t}\n\t\t});\n\n\t\t// Record it for use in drawGraph and drawTracker, and return graphPath\n\t\tseries.singlePoints = singlePoints;\n\t\tseries.graphPath = graphPath;\n\n\t\treturn graphPath;\n\t};\n\n\tH.seriesTypes.coloredline.prototype.drawGraph = function () {\n\t\tvar series = this,\n\t\t\toptions = series.options,\n\t\t\tprops = [['graph', options.lineColor || series.color]],\n\t\t\tlineWidth = options.lineWidth,\n\t\t\tdashStyle = options.dashStyle,\n\t\t\troundCap = options.linecap !== 'square',\n\t\t\tgraphPath = series.getGraphPath(),\n\t\t\tgraphPathLength = graphPath.length,\n\t\t\tgraphSegmentsLength = 0;\n\n\t\tfunction getSegment(segment, prop, i) {\n\t\t\tvar attribs = {\n\t\t\t\t\tstroke: prop[1],\n\t\t\t\t\t'stroke-width': lineWidth,\n\t\t\t\t\tzIndex: 1 // #1069\n\t\t\t\t},\n\t\t\t\titem;\n\t\t\tif (dashStyle) {\n\t\t\t\tattribs.dashstyle = dashStyle;\n\t\t\t} else if (roundCap) {\n\t\t\t\tattribs['stroke-linecap'] = attribs['stroke-linejoin'] = 'round';\n\t\t\t}\n\t\t\tif (segment[1]) {\n\t\t\t\tattribs.stroke = segment[1];\n\t\t\t}\n\n\t\t\titem = series.chart.renderer.path(segment[0])\n\t\t\t.attr(attribs)\n\t\t\t.add(series.group)\n\t\t\t.shadow(!i && options.shadow);\n\n\t\t\treturn item;\n\t\t}\n\n\t\t// draw the graph\n\t\teach(props, function (prop, i) {\n\t\t\tvar graphKey = prop[0],\n\t\t\t\tgraph = series[graphKey],\n\t\t\t\tg;\n\n\t\t\tif (graph) { // cancel running animations, #459\n\t\t\t\t// do we have animation\n\t\t\t\teach(graphPath, function (segment, j) {\n\t\t\t\t\t// update color and path\n\n\t\t\t\t\tif (series[graphKey][j]) {\n\t\t\t\t\t\tseries[graphKey][j].attr({ d: segment[0], stroke: segment[1] });\n\t\t\t\t\t} else {\n\t\t\t\t\t\tseries[graphKey][j] = getSegment(segment, prop, i);\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t} else if (lineWidth && graphPath.length) { // #1487\n\t\t\t\tgraph = [];\n\t\t\t\teach(graphPath, function (segment, j) {\n\t\t\t\t\tgraph[j] = getSegment(segment, prop, i);\n\t\t\t\t});\n\t\t\t\tseries[graphKey] = graph;\n\t\t\t\t// add destroying elements\n\t\t\t\tseries[graphKey].destroy = function () {\n\t\t\t\t\tfor (g in series[graphKey]) { // eslint-disable-line\n\t\t\t\t\t\tvar el = series[graphKey][g];\n\t\t\t\t\t\tif (el && el.destroy) {\n\t\t\t\t\t\t\tel.destroy();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t}\n\t\t\t// Checks if series.graph exists. #3\n\t\t\tgraphSegmentsLength = (series.graph && series.graph.length) || -1;\n\n\t\t\tfor (var j = graphSegmentsLength; j >= graphPathLength; j--) {\n\t\t\t\tif (series[graphKey][j]) {\n\t\t\t\t\tseries[graphKey][j].destroy();\n\t\t\t\t\tseries[graphKey].splice(j, 1);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t};\n\n\tH.wrap(seriesTypes.coloredline.prototype, 'translate', function (proceed) {\n\t\tproceed.apply(this, [].slice.call(arguments, 1));\n\t\tif (this.getSegments) {\n\t\t\tthis.getSegments();\n\t\t}\n\t});\n\n\n\n\t/**\n\t*\n\t* ColoredArea series type\n\t*\n\t**/\n\tseriesTypes.coloredarea = H.extendClass(seriesTypes.coloredline);\n\n\tH.seriesTypes.coloredarea.prototype.init = function (chart, options) {\n\t\toptions.threshold = options.threshold || null;\n\t\tH.Series.prototype.init.call(this, chart, options);\n\t};\n\n\tH.seriesTypes.coloredarea.prototype.closeSegment = function (path, segment, translatedThreshold) {\n\t\tpath.push(\n\t\t\tL,\n\t\t\tsegment[segment.length - 1].plotX,\n\t\t\ttranslatedThreshold,\n\t\t\tL,\n\t\t\tsegment[0].plotX,\n\t\t\ttranslatedThreshold\n\t\t);\n\t};\n\n\tH.seriesTypes.coloredarea.prototype.drawGraph = function (f) {\n\t\tH.seriesTypes.coloredline.prototype.drawGraph.call(this, f);\n\t\tvar series = this,\n\t\t\toptions = this.options,\n\t\t\tprops = [['graph', options.lineColor || series.color]];\n\n\t\teach(props, function (prop) {\n\t\t\tvar graphKey = prop[0],\n\t\t\t\tgraph = series[graphKey];\n\n\t\t\tif (graph) { // cancel running animations, #459\n\t\t\t\t// do we have animation\n\t\t\t\teach(series.graphPath, function (segment, j) {\n\t\t\t\t\t// update color and path\n\n\t\t\t\t\tif (series[graphKey][j]) {\n\t\t\t\t\t\tseries[graphKey][j].attr({ fill: segment[1] });\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t}\n\t\t});\n\t};\n\n\t/**\n\t* Extend the base Series getSegmentPath method by adding the path for the area.\n\t* This path is pushed to the series.areaPath property.\n\t* @param {object} segment of the path\n\t* @param {boolean} closePath indicates if the path should be closed\n\t* @returns {array} Path (SVG)\n\t**/\n\tH.seriesTypes.coloredarea.prototype.getSegmentPath = function (segment, closePath) {\n\t\tvar segmentPath = H.Series.prototype.getSegmentPath.call(this, segment), // call base method\n\t\t\tareaSegmentPath = [].concat(segmentPath), // work on a copy for the area path\n\t\t\ti,\n\t\t\toptions = this.options,\n\t\t\tsegLength = segmentPath.length,\n\t\t\ttranslatedThreshold = this.yAxis.getThreshold(options.threshold), // #2181\n\t\t\tyBottom;\n\n\t\tclosePath = closePath || true; // close the path by default\n\n\t\tif (segLength === 3) { // for animation from 1 to two points\n\t\t\tareaSegmentPath.push(L, segmentPath[1], segmentPath[2]);\n\t\t}\n\t\tif (options.stacking && !this.closedStacks) {\n\t\t\tfor (i = segment.length - 1; i >= 0; i--) {\n\n\t\t\t\tyBottom = pick(segment[i].yBottom, translatedThreshold);\n\n\t\t\t\t// step line?\n\t\t\t\tif (i < segment.length - 1 && options.step) {\n\t\t\t\t\tareaSegmentPath.push(segment[i + 1].plotX, yBottom);\n\t\t\t\t}\n\t\t\t\tareaSegmentPath.push(segment[i].plotX, yBottom);\n\t\t\t}\n\t\t} else if (closePath) { // follow zero line back\n\t\t\tthis.closeSegment(areaSegmentPath, segment, translatedThreshold);\n\t\t}\n\t\treturn areaSegmentPath;\n\t};\n\n\tH.seriesTypes.coloredarea.prototype.getGraphPath = function () {\n\t\tvar series = this,\n\t\t\tgraphPath = [],\n\t\t\tsegmentPath,\n\t\t\tsinglePoints = []; // used in drawTracker\n\t\t// Divide into segments and build graph and area paths\n\n\t\tthis.areaPath = [];\n\t\teach(series.segments, function (segment) {\n\t\t\tvar shouldClosePath = !!segment.color;\n\t\t\tsegmentPath = series.getSegmentPath(segment.points, shouldClosePath);\n\t\t\t// add the segment to the graph, or a single point for tracking\n\t\t\tif (segment.points.length > 1) {\n\t\t\t\tgraphPath.push([segmentPath, segment.color]);\n\t\t\t} else {\n\t\t\t\tsinglePoints.push(segment.points);\n\t\t\t}\n\t\t});\n\n\t\t// Record it for use in drawGraph and drawTracker, and return graphPath\n\t\tseries.singlePoints = singlePoints;\n\t\tseries.graphPath = graphPath;\n\t\treturn graphPath;\n\n\t};\n\n\tH.seriesTypes.coloredarea.prototype.drawLegendSymbol = H.LegendSymbolMixin.drawRectangle;\n}));"]} \ No newline at end of file From 54d72a9e76239fefec9d1f0a03520abfab81a909 Mon Sep 17 00:00:00 2001 From: Yuanfei Zhu Date: Fri, 20 Jan 2017 21:03:19 +0800 Subject: [PATCH 2/2] fix always close path --- js/multicolor_series.js | 2 -- 1 file changed, 2 deletions(-) diff --git a/js/multicolor_series.js b/js/multicolor_series.js index 6dc7ac5..8318849 100644 --- a/js/multicolor_series.js +++ b/js/multicolor_series.js @@ -579,8 +579,6 @@ translatedThreshold = this.yAxis.getThreshold(options.threshold), // #2181 yBottom; - closePath = closePath || true; // close the path by default - if (segLength === 3) { // for animation from 1 to two points areaSegmentPath.push(L, segmentPath[1], segmentPath[2]); }