{"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","colorExists","p","pointObject","k","next","getGraphPath","H.seriesTypes.coloredline.prototype.getGraphPath","drawGraph","H.seriesTypes.coloredline.prototype.drawGraph","getSegment","prop","dashStyle","roundCap","item","shadow","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","areaSegmentPath","segLength","getThreshold","stacking","closedStacks","yBottom","H.seriesTypes.coloredarea.prototype.getGraphPath","drawLegendSymbol","LegendSymbolMixin","drawRectangle"],"mappings":"A;a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CAAA,CAAQM,CAAR,CAAA4I,QAAL,CAAyBT,CAAzB,CAMV,CAHInI,CAGJ,CAHQN,CAAA8B,OAGR,CAHyB,CAGzB,EAH8B1B,CAAAD,KAG9B,EAFC0I,CAAAnI,KAAA,CAAqBV,CAAA,CAAQM,CAAR,CAAY,CAAZ,CAAAC,MAArB,CAA2C2I,CAA3C,CAED,CAAAL,CAAAnI,KAAA,CAAqBV,CAAA,CAAQM,CAAR,CAAAC,MAArB,CAAuC2I,CAAvC,CATF,KAYC,KAAAX,aAAA,CAAkBM,CAAlB,CAAmC7I,CAAnC,CAA4CyI,CAA5C,CAED,OAAOI,EA1BgE,CA6BxEjK,EAAAO,YAAAgJ,YAAAtI,UAAAgH,aAAA;AAAmDsC,QAAS,EAAG,CAAA,IAC1DlJ,EAAS,IADiD,CAE7D4C,EAAY,EAFiD,CAG7D3C,CAH6D,CAI7DqD,EAAe,EAGhB,KAAAX,SAAA,CAAgB,EAChB5D,EAAA,CAAKiB,CAAA6F,SAAL,CAAsB,QAAS,CAAC9F,CAAD,CAAU,CACxCE,CAAA,CAAcD,CAAAH,eAAA,CAAsBE,CAAA+F,OAAtB,CAEc,EAA5B,CAAI/F,CAAA+F,OAAAjE,OAAJ,CACCe,CAAAnC,KAAA,CAAe,CAACR,CAAD,CAAcF,CAAAsG,MAAd,CAAf,CADD,CAGC/C,CAAA7C,KAAA,CAAkBV,CAAA+F,OAAlB,CANuC,CAAzC,CAWA9F,EAAAsD,aAAA,CAAsBA,CAEtB,OADAtD,EAAA4C,UACA,CADmBA,CApB2C,CAyB/DjE,EAAAO,YAAAgJ,YAAAtI,UAAAuJ,iBAAA,CAAuDxK,CAAAyK,kBAAAC,cAlmBzC,CANd","file":"multicolor_series.min.js","sourceRoot":"/source/","sourcesContent":["/**\n* Multicolor Series v2.2.2(2017-09-29)\n*\n* (c) 2012-2016 Black Label\n*\n* License: Creative Commons Attribution (CC)\n*/\n/* global Highcharts window document module:true */\r\n/**\r\n * @fileoverview\r\n * @suppress {checkTypes}\r\n */\r\n(function (factory) {\r\n\tif (typeof module === 'object' && module.exports) {\r\n\t\tmodule.exports = factory;\r\n\t} else {\r\n\t\tfactory(Highcharts);\r\n\t}\r\n}(function (H) {\r\n\tvar each = H.each,\r\n\t\tseriesTypes = H.seriesTypes,\r\n\t\tpick = H.pick,\r\n\t\tUNDEFINED,\r\n\t\tNORMAL_STATE = '',\r\n\t\tVISIBLE = 'visible',\r\n\t\tHIDDEN = 'hidden',\r\n\t\tPREFIX = 'highcharts-',\r\n\t\tNONE = 'none',\r\n\t\thasTouch = document.documentElement.ontouchstart !== UNDEFINED,\r\n\t\tTRACKER_FILL = 'rgba(192,192,192,' + (H.hasSVG ? 0.0001 : 0.002) + ')', // invisible but clickable\r\n\t\tM = 'M',\r\n\t\tL = 'L';\r\n\t\r\n\t// handle unsorted data, throw error anyway\r\n\tfunction error(code, stop) {\r\n\t\tvar msg = 'Highcharts error #' + code + ': www.highcharts.com/errors/' + code;\r\n\t\tif (stop) {\r\n\t\t\tthrow msg;\r\n\t\t} else if (window.console) {\r\n\t\t\tconsole.log(msg); // eslint-disable-line\r\n\t\t}\r\n\t}\r\n\t\r\n\t/**\r\n\tIf replacing L and M in tracker will be necessary use that getPath():\r\n\t\r\n\tfunction getPath(arr){\r\n\tvar ret = [];\r\n\teach(arr, function(el, ind) {\r\n\tvar len = el[0].length;\r\n\tfor(var i = 0; i < len; i++){\r\n\tvar p = el[0][i];\r\n\tif(p == M && ind != 0 && i == 0) {\r\n\tp = L;\r\n\t}\r\n\tret.push(p);\r\n\t}\r\n\t});\r\n\treturn ret;\r\n\t}\r\n\t**/\r\n\t\r\n\t\r\n\tfunction getPath(arr) {\r\n\t\tvar ret = [];\r\n\t\teach(arr, function (el) {\r\n\t\t\tret = ret.concat(el[0]);\r\n\t\t});\r\n\t\treturn ret;\r\n\t}\r\n\r\n\t/**\r\n\t * Return the graph path of a segment - compatibility with 4.2.3+\r\n\t * @param {Object} segment of the path\r\n\t * @returns {Array} Path (SVG)\r\n\t */\r\n\tH.Series.prototype.getSegmentPath = function (segment) {\r\n\t\tvar series = this,\r\n\t\t\tsegmentPath = [],\r\n\t\t\tstep = series.options.step;\r\n\r\n\t\t// build the segment line\r\n\t\teach(segment, function (point, i) {\r\n\t\t\tvar plotX = point.plotX,\r\n\t\t\t\tplotY = point.plotY,\r\n\t\t\t\tlastPoint;\r\n\r\n\t\t\tif (series.getPointSpline) {\r\n\t\t\t\t// generate the spline as defined in the SplineSeries object\r\n\t\t\t\tsegmentPath.push.apply(segmentPath, series.getPointSpline(segment, point, i));\r\n\t\t\t} else {\r\n\t\t\t\t// moveTo or lineTo\r\n\t\t\t\tsegmentPath.push(i ? L : M);\r\n\r\n\t\t\t\t// step line?\r\n\t\t\t\tif (step && i) {\r\n\t\t\t\t\tlastPoint = segment[i - 1];\r\n\t\t\t\t\tif (step === 'right') {\r\n\t\t\t\t\t\tsegmentPath.push(\r\n\t\t\t\t\t\t\tlastPoint.plotX,\r\n\t\t\t\t\t\t\tplotY,\r\n\t\t\t\t\t\t\tL\r\n\t\t\t\t\t\t);\r\n\t\t\t\t\t} else if (step === 'center') {\r\n\t\t\t\t\t\tsegmentPath.push(\r\n\t\t\t\t\t\t\t(lastPoint.plotX + plotX) / 2,\r\n\t\t\t\t\t\t\tlastPoint.plotY,\r\n\t\t\t\t\t\t\tL,\r\n\t\t\t\t\t\t\t(lastPoint.plotX + plotX) / 2,\r\n\t\t\t\t\t\t\tplotY,\r\n\t\t\t\t\t\t\tL\r\n\t\t\t\t\t\t);\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tsegmentPath.push(\r\n\t\t\t\t\t\t\tplotX,\r\n\t\t\t\t\t\t\tlastPoint.plotY,\r\n\t\t\t\t\t\t\tL\r\n\t\t\t\t\t\t);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// normal line to next point\r\n\t\t\t\tsegmentPath.push(\r\n\t\t\t\t\tpoint.plotX,\r\n\t\t\t\t\tpoint.plotY\r\n\t\t\t\t);\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn segmentPath;\r\n\t};\r\n\r\n\t/**\r\n\t*\r\n\t* ColoredLine series type\r\n\t*\r\n\t**/\r\n\t\r\n\tseriesTypes.coloredline = H.extendClass(seriesTypes.line);\r\n\t\r\n\tH.seriesTypes.coloredline.prototype.processData = function (force) {\r\n\t\tvar series = this,\r\n\t\t\tprocessedXData = series.xData, // copied during slice operation below\r\n\t\t\tprocessedYData = series.yData,\r\n\t\t\tcropStart = 0,\r\n\t\t\tcropped,\r\n\t\t\tdistance,\r\n\t\t\tclosestPointRange,\r\n\t\t\txAxis = series.xAxis,\r\n\t\t\ti, // loop variable\r\n\t\t\toptions = series.options,\r\n\t\t\tisCartesian = series.isCartesian;\r\n\t\t\r\n\t\t// If the series data or axes haven't changed, don't go through this. Return false to pass\r\n\t\t// the message on to override methods like in data grouping.\r\n\t\tif (isCartesian && !series.isDirty && !xAxis.isDirty && !series.yAxis.isDirty && !force) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t\t// Find the closest distance between processed points\r\n\t\tfor (i = processedXData.length - 1; i >= 0; i--) {\r\n\t\t\tdistance = processedXData[i] - processedXData[i - 1];\r\n\t\t\tif (distance > 0 && (closestPointRange === UNDEFINED || distance < closestPointRange)) {\r\n\t\t\t\tclosestPointRange = distance;\r\n\t\t\t\t\r\n\t\t\t\t// Unsorted data is not supported by the line tooltip, as well as data grouping and\r\n\t\t\t\t// navigation in Stock charts (#725) and width calculation of columns (#1900)\r\n\t\t\t} else if (distance < 0 && series.requireSorting) {\r\n\t\t\t\terror(15);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t// Record the properties\r\n\t\tseries.cropped = cropped; // undefined or true\r\n\t\tseries.cropStart = cropStart;\r\n\t\tseries.processedXData = processedXData;\r\n\t\tseries.processedYData = processedYData;\r\n\t\t\r\n\t\tif (options.pointRange === null) { // null means auto, as for columns, candlesticks and OHLC\r\n\t\t\tseries.pointRange = closestPointRange || 1;\r\n\t\t}\r\n\t\tseries.closestPointRange = closestPointRange;\r\n\t\treturn true;\r\n\t};\r\n\t\r\n\tH.seriesTypes.coloredline.prototype.drawTracker = function () {\r\n\t\tvar series = this,\r\n\t\t\toptions = series.options,\r\n\t\t\ttrackByArea = options.trackByArea,\r\n\t\t\ttrackerPath = [].concat(trackByArea ? series.areaPath : getPath(series.graphPath)),\r\n\t\t\ttrackerPathLength = trackerPath.length,\r\n\t\t\tchart = series.chart,\r\n\t\t\tpointer = chart.pointer,\r\n\t\t\trenderer = chart.renderer,\r\n\t\t\tsnap = chart.options.tooltip.snap,\r\n\t\t\ttracker = series.tracker,\r\n\t\t\tcursor = options.cursor,\r\n\t\t\tcss = cursor && { cursor: cursor },\r\n\t\t\tsinglePoints = series.singlePoints,\r\n\t\t\tsinglePoint,\r\n\t\t\ti,\r\n\t\t\tonMouseOver;\r\n\r\n\t\tonMouseOver = function () {\r\n\t\t\tif (chart.hoverSeries !== series) {\r\n\t\t\t\tseries.onMouseOver();\r\n\t\t\t}\r\n\t\t};\r\n\t\t// Extend end points. A better way would be to use round linecaps,\r\n\t\t// but those are not clickable in VML.\r\n\t\tif (trackerPathLength && !trackByArea) {\r\n\t\t\ti = trackerPathLength + 1;\r\n\t\t\twhile (i--) {\r\n\t\t\t\tif (trackerPath[i] === M) { // extend left side\r\n\t\t\t\t\ttrackerPath.splice(i + 1, 0, trackerPath[i + 1] - snap, trackerPath[i + 2], L);\r\n\t\t\t\t}\r\n\t\t\t\tif ((i && trackerPath[i] === M) || i === trackerPathLength) { // extend right side\r\n\t\t\t\t\ttrackerPath.splice(i, 0, L, trackerPath[i - 2] + snap, trackerPath[i - 1]);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t// handle single points\r\n\t\tfor (i = 0; i < singlePoints.length; i++) {\r\n\t\t\tsinglePoint = singlePoints[i];\r\n\t\t\tif (singlePoint.plotX && singlePoint.plotY) {\r\n\t\t\t\ttrackerPath.push(M, singlePoint.plotX - snap, singlePoint.plotY,\r\n\t\t\t\t\tL, singlePoint.plotX + snap, singlePoint.plotY);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t// draw the tracker\r\n\t\tif (tracker) {\r\n\t\t\ttracker.attr({ d: trackerPath });\r\n\t\t} else { // create\r\n\t\t\tseries.tracker = renderer.path(trackerPath)\r\n\t\t\t.attr({\r\n\t\t\t\t'stroke-linejoin': 'round', // #1225\r\n\t\t\t\tvisibility: series.visible ? VISIBLE : HIDDEN,\r\n\t\t\t\tstroke: TRACKER_FILL,\r\n\t\t\t\tfill: trackByArea ? TRACKER_FILL : NONE,\r\n\t\t\t\t'stroke-width': options.lineWidth + (trackByArea ? 0 : 2 * snap),\r\n\t\t\t\tzIndex: 2\r\n\t\t\t})\r\n\t\t\t.add(series.group);\r\n\t\t\t\r\n\t\t\t// The tracker is added to the series group, which is clipped, but is covered\r\n\t\t\t// by the marker group. So the marker group also needs to capture events.\r\n\t\t\teach([series.tracker, series.markerGroup], function (track) {\r\n\t\t\t\ttrack.addClass(PREFIX + 'tracker')\r\n\t\t\t\t.on('mouseover', onMouseOver)\r\n\t\t\t\t.on('mouseout', function (e) { pointer.onTrackerMouseOut(e); })\r\n\t\t\t\t.css(css);\r\n\t\t\t\t\r\n\t\t\t\tif (hasTouch) {\r\n\t\t\t\t\ttrack.on('touchstart', onMouseOver);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\t\t\r\n\t};\r\n\t\r\n\tH.seriesTypes.coloredline.prototype.setState = function (state) {\r\n\t\tvar series = this,\r\n\t\t\toptions = series.options,\r\n\t\t\tgraph = series.graph,\r\n\t\t\tstateOptions = options.states,\r\n\t\t\tlineWidth = options.lineWidth,\r\n\t\t\tattribs;\r\n\t\t\r\n\t\tstate = state || NORMAL_STATE;\r\n\t\t\r\n\t\tif (series.state !== state) {\r\n\t\t\tseries.state = state;\r\n\t\t\t\r\n\t\t\tif (stateOptions[state] && stateOptions[state].enabled === false) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif (state) {\r\n\t\t\t\tlineWidth = stateOptions[state].lineWidth || lineWidth + 1;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif (graph && !graph.dashstyle) { // hover is turned off for dashed lines in VML\r\n\t\t\t\tattribs = {\r\n\t\t\t\t\t'stroke-width': lineWidth\r\n\t\t\t\t};\r\n\t\t\t\t// use attr because animate will cause any other animation on the graph to stop\r\n\t\t\t\teach(graph, function (seg) {\r\n\t\t\t\t\tseg.attr(attribs);\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t}\r\n\t};\r\n\t\r\n\t/**\r\n\t* The main change to get multi color isFinite changes segments array.\r\n\t* From array of points to object with color and array of points.\r\n\t* @returns {undefined}\r\n\t**/\r\n\tH.seriesTypes.coloredline.prototype.getSegments = function () {\r\n\t\tvar series = this,\r\n\t\t\tlastColor = 0,\r\n\t\t\tsegments = [],\r\n\t\t\ti,\r\n\t\t\tpoints = series.points,\r\n\t\t\tpointsLength = points.length;\r\n\t\t\r\n\t\tif (pointsLength) { // no action required for []\r\n\t\t\t\r\n\t\t\t// if connect nulls, just remove null points\r\n\t\t\tif (series.options.connectNulls) {\r\n\t\t\t\t// iterate backwars for secure point removal\r\n\t\t\t\tfor (i = pointsLength - 1; i >= 0; --i) {\r\n\t\t\t\t\tif (points[i].y === null) {\r\n\t\t\t\t\t\tpoints.splice(i, 1);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tpointsLength = points.length;\r\n\t\t\t\t\r\n\t\t\t\teach(points, function (point, j) {\r\n\t\t\t\t\tif (j > 0 && points[j].segmentColor !== points[j - 1].segmentColor) {\r\n\t\t\t\t\t\tsegments.push({\r\n\t\t\t\t\t\t\tpoints: points.slice(lastColor, j + 1),\r\n\t\t\t\t\t\t\tcolor: points[j - 1].segmentColor\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t\tlastColor = j;\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\r\n\t\t\t\tif (pointsLength) {\r\n\t\t\t\t\t// add the last segment (only single-point last segement is added)\r\n\t\t\t\t\tif (lastColor !== pointsLength - 1) {\r\n\t\t\t\t\t\tsegments.push({\r\n\t\t\t\t\t\t\tpoints: points.slice(lastColor, pointsLength),\r\n\t\t\t\t\t\t\tcolor: points[pointsLength - 1].segmentColor\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tif (points.length && segments.length === 0) {\r\n\t\t\t\t\tsegments = [points];\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t// else, split on null points or different colors\r\n\t\t\t} else {\r\n\t\t\t\tvar previousColor = null;\r\n\t\t\t\teach(points, function (point, j) {\r\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)),\r\n\t\t\t\t\t\tcolorExists = points[j - 1] && points[j - 1].segmentColor && points[j - 1].y !== null ? true : false;\r\n\t\t\t\t\t\r\n\t\t\t\t\tif (colorChanged) {\r\n\t\t\t\t\t\tvar p = points.slice(lastColor, j + 1);\r\n\t\t\t\t\t\tif (p.length > 0) {\r\n\t\t\t\t\t\t\t// do not create segments with null ponits\r\n\t\t\t\t\t\t\teach(p, function (pointObject, k) {\r\n\t\t\t\t\t\t\t\tif (pointObject.y === null) {\r\n\t\t\t\t\t\t\t\t\t// remove null points (might be on edges)\r\n\t\t\t\t\t\t\t\t\tp.splice(k, 1);\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tsegments.push({\r\n\t\t\t\t\t\t\t\tpoints: p,\r\n\t\t\t\t\t\t\t\tcolor: colorExists ? points[j - 1].segmentColor : previousColor\r\n\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t\tlastColor = j;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} else if (j === pointsLength - 1) {\r\n\t\t\t\t\t\tvar next = j + 1;\r\n\t\t\t\t\t\tif (point.y === null) {\r\n\t\t\t\t\t\t\tnext--;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tp = points.slice(lastColor, next);\r\n\t\t\t\t\t\tif (p.length > 0) {\r\n\t\t\t\t\t\t\t// do not create segments with null ponits\r\n\t\t\t\t\t\t\teach(p, function (pointObject, k) {\r\n\t\t\t\t\t\t\t\tif (pointObject.y === null) {\r\n\t\t\t\t\t\t\t\t\t// remove null points (might be on edges)\r\n\t\t\t\t\t\t\t\t\tp.splice(k, 1);\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t\tsegments.push({\r\n\t\t\t\t\t\t\t\tpoints: p,\r\n\t\t\t\t\t\t\t\tcolor: colorExists ? points[j - 1].segmentColor : previousColor\r\n\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t\tlastColor = j;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\t// store previous color\r\n\t\t\t\t\tif (point) {\r\n\t\t\t\t\t\tpreviousColor = point.segmentColor;\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t}\r\n\t\t// register it\r\n\t\tseries.segments = segments;\r\n\t};\r\n\t\r\n\tH.seriesTypes.coloredline.prototype.getGraphPath = function () {\r\n\t\t// var ret = f.apply(this, Array.prototype.slice.call(arguments, 1));\r\n\t\tvar series = this,\r\n\t\t\tgraphPath = [],\r\n\t\t\tsegmentPath,\r\n\t\t\tsinglePoints = []; // used in drawTracker\r\n\t\t// Divide into segments and build graph and area paths\r\n\t\teach(series.segments, function (segment) {\r\n\t\t\tsegmentPath = series.getSegmentPath(segment.points);\r\n\t\t\t// add the segment to the graph, or a single point for tracking\r\n\t\t\tif (segment.points.length > 1) {\r\n\t\t\t\tgraphPath.push([segmentPath, segment.color]);\r\n\t\t\t} else {\r\n\t\t\t\tsinglePoints.push(segment.points);\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\t// Record it for use in drawGraph and drawTracker, and return graphPath\r\n\t\tseries.singlePoints = singlePoints;\r\n\t\tseries.graphPath = graphPath;\r\n\t\t\r\n\t\treturn graphPath;\r\n\t};\r\n\t\r\n\tH.seriesTypes.coloredline.prototype.drawGraph = function () {\r\n\t\tvar series = this,\r\n\t\t\toptions = series.options,\r\n\t\t\tprops = [['graph', options.lineColor || series.color]],\r\n\t\t\tlineWidth = options.lineWidth,\r\n\t\t\tdashStyle = options.dashStyle,\r\n\t\t\troundCap = options.linecap !== 'square',\r\n\t\t\tgraphPath = series.getGraphPath(),\r\n\t\t\tgraphPathLength = graphPath.length,\r\n\t\t\tgraphSegmentsLength = 0;\r\n\t\t\r\n\t\tfunction getSegment(segment, prop, i) {\r\n\t\t\tvar attribs = {\r\n\t\t\t\t\tstroke: prop[1],\r\n\t\t\t\t\t'stroke-width': lineWidth,\r\n\t\t\t\t\tfill: 'none',\r\n\t\t\t\t\tzIndex: 1 // #1069\r\n\t\t\t\t},\r\n\t\t\t\titem;\r\n\t\t\tif (dashStyle) {\r\n\t\t\t\tattribs.dashstyle = dashStyle;\r\n\t\t\t} else if (roundCap) {\r\n\t\t\t\tattribs['stroke-linecap'] = attribs['stroke-linejoin'] = 'round';\r\n\t\t\t}\r\n\t\t\tif (segment[1]) {\r\n\t\t\t\tattribs.stroke = segment[1];\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\titem = series.chart.renderer.path(segment[0])\r\n\t\t\t.attr(attribs)\r\n\t\t\t.add(series.group);\r\n\r\n\r\n\t\t\tif (item.shadow) {\r\n\t\t\t\titem.shadow(!i && options.shadow);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\treturn item;\r\n\t\t}\r\n\r\n\t\t// draw the graph\r\n\t\teach(props, function (prop, i) {\r\n\t\t\tvar graphKey = prop[0],\r\n\t\t\t\tgraph = series[graphKey],\r\n\t\t\t\tg;\r\n\t\t\t\r\n\t\t\tif (graph) { // cancel running animations, #459\r\n\t\t\t\t// do we have animation\r\n\t\t\t\teach(graphPath, function (segment, j) {\r\n\t\t\t\t\t// update color and path\r\n\t\t\t\t\t\r\n\t\t\t\t\tif (series[graphKey][j]) {\r\n\t\t\t\t\t\tseries[graphKey][j].attr({ d: segment[0], stroke: segment[1] });\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tseries[graphKey][j] = getSegment(segment, prop, i);\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\t\t\t\t\r\n\t\t\t} else if (graphPath.length) { // #1487\r\n\t\t\t\tgraph = [];\r\n\t\t\t\teach(graphPath, function (segment, j) {\r\n\t\t\t\t\tgraph[j] = getSegment(segment, prop, i);\r\n\t\t\t\t});\r\n\t\t\t\tseries[graphKey] = graph;\r\n\t\t\t\t// add destroying elements\r\n\t\t\t\tseries[graphKey].destroy = function () {\r\n\t\t\t\t\tfor (g in series[graphKey]) { // eslint-disable-line\r\n\t\t\t\t\t\tvar el = series[graphKey][g];\r\n\t\t\t\t\t\tif (el && el.destroy) {\r\n\t\t\t\t\t\t\tel.destroy();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t};\r\n\t\t\t}\r\n\t\t\t// Checks if series.graph exists. #3\r\n\t\t\tgraphSegmentsLength = (series.graph && series.graph.length) || -1;\r\n\t\t\t\r\n\t\t\tfor (var j = graphSegmentsLength; j >= graphPathLength; j--) {\r\n\t\t\t\tif (series[graphKey][j]) {\r\n\t\t\t\t\tseries[graphKey][j].destroy();\r\n\t\t\t\t\tseries[graphKey].splice(j, 1);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t};\r\n\r\n\tH.wrap(seriesTypes.coloredline.prototype, 'translate', function (proceed) {\r\n\t\tproceed.apply(this, [].slice.call(arguments, 1));\r\n\t\tif (this.getSegments) {\r\n\t\t\tthis.getSegments();\r\n\t\t}\r\n\t});\r\n\t\r\n\t\r\n\t\r\n\t/**\r\n\t*\r\n\t* ColoredArea series type\r\n\t*\r\n\t**/\r\n\tseriesTypes.coloredarea = H.extendClass(seriesTypes.coloredline);\r\n\t\r\n\tH.seriesTypes.coloredarea.prototype.init = function (chart, options) {\r\n\t\toptions.threshold = options.threshold || null;\r\n\t\tH.Series.prototype.init.call(this, chart, options);\r\n\t};\r\n\t\r\n\tH.seriesTypes.coloredarea.prototype.closeSegment = function (path, segment, translatedThreshold) {\r\n\t\tpath.push(\r\n\t\t\tL,\r\n\t\t\tsegment[segment.length - 1].plotX,\r\n\t\t\ttranslatedThreshold,\r\n\t\t\tL,\r\n\t\t\tsegment[0].plotX,\r\n\t\t\ttranslatedThreshold\r\n\t\t);\r\n\t};\r\n\t\r\n\tH.seriesTypes.coloredarea.prototype.drawGraph = function (f) {\r\n\t\tH.seriesTypes.coloredline.prototype.drawGraph.call(this, f);\r\n\t\tvar series = this,\r\n\t\t\toptions = this.options,\r\n\t\t\tprops = [['graph', options.lineColor || series.color]];\r\n\r\n\t\teach(props, function (prop) {\r\n\t\t\tvar graphKey = prop[0],\r\n\t\t\t\tgraph = series[graphKey];\r\n\t\t\t\r\n\t\t\tif (graph) { // cancel running animations, #459\r\n\t\t\t\t// do we have animation\r\n\t\t\t\teach(series.graphPath, function (segment, j) {\r\n\t\t\t\t\t// update color and path\r\n\t\t\t\t\t\r\n\t\t\t\t\tif (series[graphKey][j]) {\r\n\t\t\t\t\t\tseries[graphKey][j].attr({ fill: segment[1] });\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t});\r\n\t};\r\n\r\n\t/**\r\n\t* Extend the base Series getSegmentPath method by adding the path for the area.\r\n\t* This path is pushed to the series.areaPath property.\r\n\t* @param {Object} segment of the path\r\n\t* @returns {Array} Path (SVG)\r\n\t**/\r\n\tH.seriesTypes.coloredarea.prototype.getSegmentPath = function (segment) {\r\n\t\tvar segmentPath = H.Series.prototype.getSegmentPath.call(this, segment), // call base method\r\n\t\t\tareaSegmentPath = [].concat(segmentPath), // work on a copy for the area path\r\n\t\t\ti,\r\n\t\t\toptions = this.options,\r\n\t\t\tsegLength = segmentPath.length,\r\n\t\t\ttranslatedThreshold = this.yAxis.getThreshold(options.threshold), // #2181\r\n\t\t\tyBottom;\r\n\r\n\t\tif (segLength === 3) { // for animation from 1 to two points\r\n\t\t\tareaSegmentPath.push(L, segmentPath[1], segmentPath[2]);\r\n\t\t}\r\n\t\tif (options.stacking && !this.closedStacks) {\r\n\t\t\tfor (i = segment.length - 1; i >= 0; i--) {\r\n\r\n\t\t\t\tyBottom = pick(segment[i].yBottom, translatedThreshold);\r\n\r\n\t\t\t\t// step line?\r\n\t\t\t\tif (i < segment.length - 1 && options.step) {\r\n\t\t\t\t\tareaSegmentPath.push(segment[i + 1].plotX, yBottom);\r\n\t\t\t\t}\r\n\t\t\t\tareaSegmentPath.push(segment[i].plotX, yBottom);\r\n\t\t\t}\r\n\t\t} else { // follow zero line back\r\n\t\t\tthis.closeSegment(areaSegmentPath, segment, translatedThreshold);\r\n\t\t}\r\n\t\treturn areaSegmentPath;\r\n\t};\r\n\t\r\n\tH.seriesTypes.coloredarea.prototype.getGraphPath = function () {\r\n\t\tvar series = this,\r\n\t\t\tgraphPath = [],\r\n\t\t\tsegmentPath,\r\n\t\t\tsinglePoints = []; // used in drawTracker\r\n\t\t// Divide into segments and build graph and area paths\r\n\t\t\r\n\t\tthis.areaPath = [];\r\n\t\teach(series.segments, function (segment) {\r\n\t\t\tsegmentPath = series.getSegmentPath(segment.points);\r\n\t\t\t// add the segment to the graph, or a single point for tracking\r\n\t\t\tif (segment.points.length > 1) {\r\n\t\t\t\tgraphPath.push([segmentPath, segment.color]);\r\n\t\t\t} else {\r\n\t\t\t\tsinglePoints.push(segment.points);\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\t// Record it for use in drawGraph and drawTracker, and return graphPath\r\n\t\tseries.singlePoints = singlePoints;\r\n\t\tseries.graphPath = graphPath;\r\n\t\treturn graphPath;\r\n\t\r\n\t};\r\n\t\r\n\tH.seriesTypes.coloredarea.prototype.drawLegendSymbol = H.LegendSymbolMixin.drawRectangle;\r\n}));"]}