{"version":3,"sources":["webpack:///../../../../../src/.internal/charts/series/RadarSeries.ts","webpack:///../../../../../src/.internal/charts/axes/AxisFillCircular.ts","webpack:///../../../../../src/.internal/charts/axes/GridCircular.ts","webpack:///../../../../../src/.internal/charts/axes/AxisRendererCircular.ts","webpack:///../../../../../src/.internal/charts/axes/AxisRendererRadial.ts","webpack:///../../../../../src/.internal/charts/types/RadarChart.ts","webpack:///../../../../../src/.internal/charts/elements/ClockHand.ts","webpack:///../../../../../src/.internal/charts/types/GaugeChart.ts","webpack:///../../../../../src/.internal/charts/series/PieSeries3D.ts","webpack:///../../../../../src/.internal/charts/types/PieChart3D.ts","webpack:///../../../../../src/.internal/charts/types/SlicedChart.ts","webpack:///../../../../../src/.internal/charts/elements/FlowDiagramNode.ts","webpack:///../../../../../src/.internal/charts/elements/FlowDiagramLink.ts","webpack:///../../../../../src/.internal/charts/types/FlowDiagram.ts","webpack:///../../../../../src/.internal/charts/elements/LabelBullet.ts","webpack:///../../../../../src/.internal/charts/elements/SankeyNode.ts","webpack:///../../../../../src/.internal/charts/elements/SankeyLink.ts","webpack:///../../../../../src/.internal/charts/types/SankeyDiagram.ts","webpack:///../../../../../src/.internal/charts/elements/ChordNode.ts","webpack:///../../../../../src/.internal/core/elements/QuadraticCurve.ts","webpack:///../../../../../src/.internal/charts/elements/ChordLink.ts","webpack:///../../../../../src/.internal/charts/types/ChordDiagram.ts","webpack:///../../../../../src/.internal/charts/series/TreeMapSeries.ts","webpack:///../../../../../src/.internal/charts/types/TreeMap.ts","webpack:///../../../../../src/.internal/charts/axes/AxisRendererX3D.ts","webpack:///../../../../../src/.internal/charts/axes/AxisRendererY3D.ts","webpack:///../../../../../src/.internal/charts/elements/Column3D.ts","webpack:///../../../../../src/.internal/charts/series/ColumnSeries3D.ts","webpack:///../../../../../src/.internal/charts/types/XYChart3D.ts","webpack:///../../../../../src/.internal/charts/elements/Candlestick.ts","webpack:///../../../../../src/.internal/charts/series/CandlestickSeries.ts","webpack:///../../../../../src/.internal/charts/elements/OHLC.ts","webpack:///../../../../../src/.internal/charts/series/OHLCSeries.ts","webpack:///../../../../../src/.internal/charts/series/StepLineSeriesSegment.ts","webpack:///../../../../../src/.internal/charts/series/StepLineSeries.ts","webpack:///../../../../../src/.internal/charts/elements/RadarColumn.ts","webpack:///../../../../../src/.internal/charts/series/RadarColumnSeries.ts","webpack:///../../../../../src/.internal/charts/elements/FunnelSlice.ts","webpack:///../../../../../src/.internal/charts/elements/FunnelTick.ts","webpack:///../../../../../src/.internal/charts/series/FunnelSeries.ts","webpack:///../../../../../src/.internal/charts/series/PyramidSeries.ts","webpack:///../../../../../src/.internal/charts/series/PictorialStackedSeries.ts","webpack:///../../../../../src/.internal/charts/elements/ConeColumn.ts","webpack:///../../../../../src/.internal/charts/series/ConeSeries.ts","webpack:///../../../../../src/.internal/charts/elements/CurvedColumn.ts","webpack:///../../../../../src/.internal/charts/series/CurvedColumnSeries.ts","webpack:///../../../../../src/.internal/charts/elements/CircleBullet.ts","webpack:///../../../../../src/.internal/charts/elements/ErrorBullet.ts","webpack:///../../../../../src/.internal/charts/elements/NavigationBar.ts","webpack:///../../../../../src/.internal/charts/cursors/RadarCursor.ts","webpack:///./charts.js"],"names":["RadarSeries_RadarSeriesDataItem","_super","RadarSeriesDataItem","_this","call","this","className","setLocation","applyTheme","Object","tslib_es6","LineSeries","RadarSeries_RadarSeries","RadarSeries","connectEnds","prototype","validate","chart","invalid","createDataItem","getPoint","dataItem","xKey","yKey","locationX","locationY","stackKeyX","stackKeyY","x","yAxis","getX","y","getY","radius","utils_Math","angle","xAxis","getAngle","startAngle","endAngle","addPoints","points","xField","yField","backwards","point","locations","push","getMaskPath","renderer","Path","pixelRadius","pixelInnerRadius","drawSegment","segment","closePoints","Math","abs","dataFields","_xOpenField","_yOpenField","stacked","length","unshift","defineProperty","getPropertyValue","value","setPropertyValue","positionBulletReal","bullet","positionX","positionY","start","end","visible","moveTo","positionToPoint","setXAxis","axis","updateRendererRefs","setYAxis","rendererX","rendererY","axisRendererY","Registry","registeredClasses","AxisFillCircular_AxisFillCircular","AxisFillCircular","element","paper","add","Percent","draw","__disabled","disabled","fillPath","getPositionRangePath","startPosition","endPosition","Type","innerRadius","cornerRadius","path","setPercentProperty","AxisFill","GridCircular_GridCircular","GridCircular","pixelPerfect","Grid","AxisRendererCircular_AxisRendererCircular","AxisRendererCircular","pixelRadiusReal","layout","isMeasured","useChartAngles","grid","template","location","labels","ticks","tooltipLocation","line","strokeOpacity","setAxis","tooltip","adapter","target","Utils","pixelX","pixelY","cos","atan2","sin","PI","invalidate","mr","max","min","plotContainer","innerHeight","innerWidth","innerRadiusModifyer","position","position2","coordinate","positionToCoordinate","axisLength","realRadius","Infinity","positionToAngle","arc","inversed","angleToPosition","updateAxisLine","updateGridElement","gridInnerRadius","zIndex","toggleVisibility","updateTickElement","tick","tickLength","inside","updateBullet","AxisBullet","positionItem","updateLabelElement","label","fixPosition","minLabelPosition","maxLabelPosition","fitsToBounds","invalidateAxisItems","invalidateSeries","createGrid","createFill","createLabel","AxisLabelCircular","pointToPosition","coordinateToPosition","AxisRenderer","AxisRendererRadial_AxisRendererRadial","AxisRendererRadial","_chart","Disposer","minGridDistance","gridType","axisAngle","horizontalCenter","_disposers","title","valign","verticalCenter","rotation","opposite","xAxes","getIndex","count","series","dataItems","CategoryAxis","gridLocation","i","cellEndLocation","updateBaseGridElement","updateBreakElement","axisBreak","startLine","endLine","fillShape","startPoint","endPoint","createBreakSprites","WavedCircle","updateTooltip","tooltipOrientation","width","bigNum","height","round","axisFullLength","get","set","AxisRendererY","RadarChart_RadarChartDataItem","RadarChartDataItem","XYChart","RadarChart_RadarChart","RadarChart","_axisRendererX","_axisRendererY","radarContainer","createChild","Container","shouldClone","align","seriesContainer","parent","bulletsContainer","axisBulletsContainer","_cursorContainer","chartContainer","events","on","_bulletMask","Circle","opacity","applyInternalDefaults","readerTitle","language","translate","processAxis","gridContainer","breakContainer","toBack","handleXAxisRangeChange","Iterator","yAxes","iterator","handleYAxisRangeChange","processConfig","config","cursor","type","len","beforeDraw","rect","innerRect","wr","hr","maxRadius","diameter","_pixelInnerRadius","definedBBox","validatePosition","createSeries","updateXAxis","processRenderer","updateYAxis","ClockHand_ClockHand","ClockHand","_axis","interfaceColors","InterfaceColorSet","fill","getFor","stroke","pin","startWidth","endWidth","hand","Trapezoid","pixelWidth","h","leftSide","rightSide","x0","x1","_pin","removeDispose","_hand","showValue","duration","easing","_value","undefined","newAngle","anyToPosition","currentAngle","rotationDirection","animate","property","to","updateValue","map","hasKey","getKey","GaugeChart_GaugeChartDataItem","GaugeChartDataItem","GaugeChart_GaugeChart","GaugeChart","hands","List","processHand","event","newValue","configOrder","a","b","PieSeries3D_PieSeries3DDataItem","PieSeries3DDataItem","values","depthValue","setValue","PieSeries","PieSeries3D_PieSeries3D","PieSeries3D","createSlice","Slice3D","validateDataElement","slice","depth","depthPercent","percent","_workingStartIndex","_workingEndIndex","toFront","positionBullet","PieChart3D_PieChart3DDataItem","PieChart3DDataItem","PieChart","PieChart3D_PieChart3D","PieChart3D","invalidateDataUsers","SlicedChart_SlicedChartDataItem","SlicedChartDataItem","PercentChart","SlicedChart_SlicedChart","SlicedChart","padding","FlowDiagramNode_FlowDiagramNode","FlowDiagramNode","legendSettings","Legend","draggable","inert","setStateOnChildren","invalidateLinks","handleHit","isHidden","isHiding","show","hide","animation","outgoingDataItems","each","toNode","setWorkingValue","getValue","link","incomingDataItems","fromNode","isDisposed","colorMode","color","gradient","stop_1","stops","stop_2","_incomingDataItems","sortBy","_incomingSorted","utils_String","fromName","Order","utils_Number","_outgoingDataItems","_outgoingSorted","setColorProperty","_background","createLegendMarker","marker","w","pixelHeight","removeChildren","column","RoundedRectangle","utils_Object","Sprite","copyFrom","legendDataItem","colorOrig","_legendDataItem","itemContainer","deepInvalidate","FlowDiagramLink_FlowDiagramLink","FlowDiagramLink","maskBullets","tooltipText","setElement","fillOpacity","positionBullets","bullets","maxWidth","maxHeight","_bulletsContainer","_bulletsMask","bulletsMask","middleLine","rotationField","propertyFields","dataContext","clear","Color","addColor","setFill","_gradient","measureElement","_bullets","Bullet","source","Line","Polyline","getTooltipX","getTooltipY","LinearGradient","FlowDiagram_FlowDiagramDataItem","FlowDiagramDataItem","properties","setProperty","toName","_link","link_1","component","links","create","addSprite","removeValue","Chart","FlowDiagram_FlowDiagram","FlowDiagram","colors","ColorSet","nodePadding","sequencedInterpolation","step","minNodeSize","linksContainer","nodesContainer","dispose","validateData","_parseDataFrom","nodes","sortNodes","reset","low","high","sum","node","name","strokeModifier","LinearGradientModifier","opacities","fillModifier","key","setCalculatedValue","strNode","next","getNodeValue","feedLegend","handleDataItemWorkingValueChange","_sorted","sortedIterator","total","incomingTotal","outgoingTotal","getWorkingValue","totalIncoming","totalOutgoing","changeSorting","_nodes","createNode","Dictionary","_links","createLink","legend","legendData_1","data","disposeData","LabelBullet_LabelBullet","LabelBullet","Label","truncate","hideOversized","handleMaxSize","SankeyNode_SankeyNode","SankeyNode","nextInCoord","nextOutCoord","nameLabel","text","valueLabel","hiddenState","background","orientation_1","orientation","dx","dy","endX","endY","linkWidth","valueHeight","startX","startY","measuredWidth","measuredHeight","SankeyLink_SankeyLink","SankeyLink","tension","controlPointDistance","Polyspline","makeBackwards","states","setState","isTemplate","y0","y1","_a","_b","_c","_d","xt0","yt0","xt1","yt1","xb0","xb1","yb0","yb1","xm0","xm1","ym0","ym1","index","tensionX","tensionY","minX","minY","maxX","maxY","_bbox","cpd","kxt0","kyt0","kxt1","kyt1","kxm0","kym0","kxm1","kym1","kxb0","kyb0","kxb1","kyb1","segments","Smoothing","smooth","mask","SankeyDiagram_SankeyDiagramDataItem","SankeyDiagramDataItem","SankeyDiagram_SankeyDiagram","SankeyDiagram","nodeAlign","_valueHeight","_levelCount","level","getNodeLevel","levels","_counter","checkLoop","apply","calculateValueHeight","_levelSum","_levelNodesCount","maxSum","availableHeight","maxSumLevel","minHeight","realValue","levelNodeCount","_maxSumLevel","maxSumLevelNodeCount","finalHeight","_heightAnimation","animationOptions","err","interpolationDuration","transitionDuration","Animation","from","interpolationEasing","container","nextCoordinate","delta","levelCoordinate","nodeCount","showReal","preventShow","container_1","i_1","delay","sequencedInterpolationDelay","isFinished","nodeHeight","ChordNode_ChordNode","ChordNode","updateRotation","Slice","tooltipX","ix","tooltipY","iy","arc_1","sliceStartAngle_1","children","child","childAngle","childRadius","labelAngle","adjustedTotal","nextAngle","nonRibbon","percentWidth","valueAngle","mAngle","trueStartAngle","tx","ty","QuadraticCurve_QuadraticCurve","QuadraticCurve","x2","y2","cpx","cpy","p1","p2","cp","d","point1","point2","ChordLink_ChordLink","ChordLink","fromX","fromY","toX","toY","mAngle1","mAngle2","ChordDiagram_ChordDiagramDataItem","ChordDiagramDataItem","ChordDiagram_ChordDiagram","ChordDiagram","chordContainer","newTotal","invalidateLayout","TreeMapSeries_TreeMapSeriesDataItem","TreeMapSeriesDataItem","treeMapDataItem","_dataContext","toValue","fields","ColumnSeries","TreeMapSeries_TreeMapSeries","TreeMapSeries","minBulletDistance","columns","configField","openValueX","valueX","openValueY","valueY","showOnInit","processDataItem","seriesDataItem","defaultState","hideReal","processValues","getStartLocation","getEndLocation","dataChangeUpdate","disableUnusedColumns","TreeMap_TreeMapDataItem","TreeMapDataItem","rows","workingValue","hasChildren","getDuration","childValue","_series","TreeMap_TreeMap","TreeMap","layoutAlgorithm","squarify","zoomable","_usesData","maxLevels","currentLevel","hideParentColumns","sorting","ValueAxis","strictMinMax","xRenderer","axisFills","baseGrid","yRenderer","seriesTemplates","virtualParent","zoomOutButton","zoomToChartDataItem","_homeDataItem","_navigationBar","navigationBar","createTreeSeries","_tempSeries","homeDataItem","clone","_homeText","getMinMax","layoutItems","sort","_updateDataItemIndexes","navigationData","parentDataItem","initSeries","reverse","createTreeSeriesReal","utils_Array","indexOf","setData","currentlyZoomed","seriesAppeared","toString","dataUsers","columnsContainer","remove","cursorOverStyle","Mouse","pointer","zoomToSeriesDataItem","toggleBullets","zoomToValues","rangeChangeAnimation","_dataDisposers","once","binaryTree","dice","sliceDice","validateLayout","validateDataItems","validateRawData","n","sums","Array","partition","j","valueOffset","valueTarget","k","hi","mid","valueLeft","valueRight","xk","yk","nodeValue","sumValue","minValue","maxValue","newRatio","minRatio","alpha","beta","ratio","sqrt","i0","i1","row","handleSeriesAdded2","handleDataItemValueChange","invalidateDataItems","getLegendLevel","handleLegendSeriesAdded","legendParent","getExporting","exporting","info","format","AxisRendererX3D_AxisRendererX3D","AxisRendererX3D","dx3D","dy3D","getHeight","handle3DChanged","AxisRendererX","AxisRendererY3D_AxisRendererY3D","AxisRendererY3D","getWidth","Column3D_Column3D","Column3D","createAssets","column3D","Rectangle3D","Column","ColumnSeries3D_ColumnSeries3DDataItem","ColumnSeries3DDataItem","ColumnSeries3D_ColumnSeries3D","ColumnSeries3D","applyOnClones","leftAxesContainer","rightAxesContainer","bottomAxesContainer","topAxesContainer","_columnsContainer","validateDataElementReal","validateDataElements","createColumnTemplate","XYChart3D_XYChart3DDataItem","XYChart3DDataItem","XYChart3D_XYChart3D","XYChart3D","updateSeriesMasks","fixLayout","fixColumns","marginTop","paddingRight","scrollbarX","scrollbarY","clustered","depthIndex","s","inversed_1","baseAxis","maskColumns","Candlestick_Candlestick","Candlestick","lowLine","highLine","CandlestickSeries_CandlestickSeriesDataItem","CandlestickSeriesDataItem","lowValueX","lowValueY","highValueX","highValueY","CandlestickSeries_CandlestickSeries","CandlestickSeries","groupFields","positiveColor","negativeColor","dropFromOpenState","riseFromOpenState","validateCandlestick","lowLine_1","highLine_1","open_1","yOpenField","close_1","yOpen","yClose","yLow","yLowField","yHigh","yHighField","open_2","xOpenField","close_2","xOpen","xClose","xLow","xLowField","xHigh","xHighField","axisRanges","axisRange","rangeColumn","rangesColumns","uid","rangeLowLine","rangehighLine","_xLowField","_yLowField","_xHighField","_yHighField","defineFields","yAxisFieldName","axisFieldName","xAxisFieldName","addValueField","_xValueFields","_yValueFields","cw","ch","OHLC_OHLC","OHLC","openLine","highLowLine","closeLine","OHLCSeries_OHLCSeriesDataItem","OHLCSeriesDataItem","OHLCSeries_OHLCSeries","OHLCSeries","openLine_1","highLowLine_1","closeLine_1","rangeOpenLine","rangeCloseLine","rangeHighLowLine","StepLineSeriesSegment_StepLineSeriesSegment","StepLineSeriesSegment","smoothnessX","smoothnessY","noRisers","vertical","strokeSprite","fillSprite","LineSeriesSegment","StepLineSeries_StepLineSeriesDataItem","StepLineSeriesDataItem","StepLineSeries_StepLineSeries","StepLineSeries","startLocation","endLocation","startLocationX","endLocationX","startLocationY","endLocationY","getAdjustedXLocation","prevPoint","point0","createSegment","RadarColumn_RadarColumn","RadarColumn","radarColumn","RadarColumnSeries_RadarColumnSeriesDataItem","RadarColumnSeriesDataItem","RadarColumnSeries_RadarColumnSeries","RadarColumnSeries","lAngle","rAngle","tRadius","bRadius","cellAngle","setColumnStates","offset","temp","contents","sprites","setKey","FunnelSlice_FunnelSlice","FunnelSlice","bottomWidth","topWidth","expandDistance","pt","pixelPaddingTop","pb","pixelPaddingBottom","pr","pixelPaddingRight","pl","pixelPaddingLeft","ed","tl","tw","tr","br","bw","bl","cpr","cpl","qp1","qp2","tickPoint","tt","tb","bt","bb","mlx","mty","FunnelTick_FunnelTick","FunnelTick","_label","_slice","p0","labelsOpposite","maxRight","maxBottom","Tick","FunnelSeries_FunnelSeriesDataItem","FunnelSeriesDataItem","_sliceLink","sliceLink_1","sliceLinks","slicesContainer","PercentSeries","FunnelSeries_FunnelSeries","FunnelSeries","_nextY","labelsContainer","bottomRatio","createTick","initSlice","scale","observe","handleSliceScale","handleSliceMove","initLabel","labelTemplate","alignLabels","interactionsEnabled","dItem","ignoreZeroValues","_total","_count","arrangeLabels","getNextValue","nextValue","nextItem","formDataElement","sliceLink","decorateSlice","sprite","linkHeight","getLastLabel","lastLabel","lastY","lastX","_sliceLinks","startIndex","endIndex","Options","animationsEnabled","setAlignLabels","margin","labelAlign","labelValign","PyramidSeries_PyramidSeriesDataItem","PyramidSeriesDataItem","PyramidSeries_PyramidSeries","PyramidSeries","pyramidHeight","valueIs","_nextWidth","relValue","_pyramidHeight","_pyramidWidth","ticksContainer","absoluteSum","pyramidWidth","sliceTopWidth","c","tan","sliceHeight","sliceBottomWidth","square","sliceWidth","PictorialStackedSeries_PictorialStackedSeriesDataItem","PictorialStackedSeriesDataItem","PictorialStackedSeries_PictorialStackedSeries","PictorialStackedSeries","_maskSprite","maskSprite","pictureWidth","pictureHeight","newWidth","newHeight","slices","hs","ConeColumn_ConeColumn","ConeColumn","coneColumn","Cone","ConeSeries_ConeSeriesDataItem","ConeSeriesDataItem","ConeSeries_ConeSeries","ConeSeries","CurvedColumn_CurvedColumn","CurvedColumn","curvedColumn","realWidth","realHeight","realX","realY","CurvedColumnSeries_CurvedColumnSeriesDataItem","CurvedColumnSeriesDataItem","CurvedColumnSeries_CurvedColumnSeries","CurvedColumnSeries","CircleBullet_CircleBullet","CircleBullet","circle","ErrorBullet_ErrorBullet","ErrorBullet","errorLine","isDynamic","NavigationBar_NavigationBarDataItem","NavigationBarDataItem","DataItem","NavigationBar_NavigationBar","NavigationBar","textLink","TextLink","paddingTop","paddingBottom","_linksIterator","createNewItems","triangle","Triangle","direction","marginLeft","marginRight","separators","activeLink","fontWeight","getLast","separator","Component","RadarCursor_RadarCursor","RadarCursor","truePixelRadius","triggerMoveReal","force","cursorTooltipEnabled","updateLineX","updateLineY","updateSelection","lineX","fullWidthLineX","currentItemStartPoint","currentItemEndPoint","fillStartAngle","lineY","fullWidthLineY","_usesSelection","downPoint","downAngle","downRadius","currentRadius","_prevAngle","downSin","downCos","behavior","selection","getPositions","xPosition","yPosition","updatePoint","handleXTooltipPosition","handleYTooltipPosition","updateLinePositions","getRanges","upPoint","upAngle","upRadius","xRange","yRange","updateSize","fixPoint","XYCursor","window","am4charts","charts_namespaceObject"],"mappings":";;;;;;;;;;;;;;;;;;;kyLAoCAA,EAAA,SAAAC,GAUC,SAAAC,IAAA,IAAAC,EACCF,EAAAG,KAAAC,OAAOA,YACPF,E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,EAAAlF,CAAQ,IAAM2F,EAAYlC,MAAQ7D,KAAKY,MAAM4H,sBAGrDd,EAAA,sBAA6B3B,EAAa/F,KAAKqnC,kBAAoB,mCASjED,EAAA1mC,UAAAipC,SAAV,SAAmBnnC,GAElB,OAAOA,GAET4kC,EA9dA,CAAiCwC,GAAA,GAsejC7kC,EAAA,EAASC,kBAA+B,YAAImiC,GCtjB5C0C,OAAAC,UAAmBC","file":"charts.js","sourcesContent":["/**\r\n * Radar series module.\r\n */\r\n\r\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\r\nimport { LineSeries, LineSeriesDataItem, ILineSeriesDataFields, ILineSeriesProperties, ILineSeriesAdapters, ILineSeriesEvents } from \"./LineSeries\";\r\nimport { LineSeriesSegment } from \"./LineSeriesSegment\";\r\nimport { IPoint } from \"../../core/defs/IPoint\";\r\nimport { AxisRendererRadial } from \"../axes/AxisRendererRadial\";\r\nimport { AxisRendererCircular } from \"../axes/AxisRendererCircular\";\r\nimport { Axis } from \"../axes/Axis\";\r\nimport { RadarChart } from \"../types/RadarChart\";\r\nimport { registry } from \"../../core/Registry\";\r\nimport { Sprite } from \"../../core/Sprite\";\r\nimport * as $math from \"../../core/utils/Math\";\r\nimport * as $path from \"../../core/rendering/Path\";\r\n//import { AxisRendererCircular } from \"../axes/AxisRendererCircular\";\r\n//import { Sprite } from \"../../core/Sprite\";\r\n\r\n/**\r\n * ============================================================================\r\n * DATA ITEM\r\n * ============================================================================\r\n * @hidden\r\n */\r\n\r\n/**\r\n * Defines a [[DataItem]] for [[RadarSeries]].\r\n *\r\n * @see {@link DataItem}\r\n */\r\nexport class RadarSeriesDataItem extends LineSeriesDataItem {\r\n\r\n\t/**\r\n\t * Defines a type of [[Component]] this data item is used for.\r\n\t */\r\n\tpublic _component!: RadarSeries;\r\n\r\n\t/**\r\n\t * Constructor\r\n\t */\r\n\tconstructor() {\r\n\t\tsuper();\r\n\t\tthis.className = \"RadarSeriesDataItem\";\r\n\r\n\t\tthis.setLocation(\"dateX\", 0, 0);\r\n\t\tthis.setLocation(\"dateY\", 0, 0);\r\n\r\n\t\tthis.setLocation(\"categoryX\", 0, 0);\r\n\t\tthis.setLocation(\"categoryY\", 0, 0);\r\n\r\n\t\tthis.applyTheme();\r\n\t}\r\n\r\n}\r\n\r\n\r\n/**\r\n * ============================================================================\r\n * REQUISITES\r\n * ============================================================================\r\n * @hidden\r\n */\r\n\r\n/**\r\n * Defines data fields for [[RadarSeries]].\r\n */\r\nexport interface IRadarSeriesDataFields extends ILineSeriesDataFields { }\r\n\r\n/**\r\n * Defines properties for [[RadarSeries]].\r\n */\r\nexport interface IRadarSeriesProperties extends ILineSeriesProperties {\r\n\r\n\t/**\r\n\t * Should the last and and first data points be connected, forming a complete\r\n\t * closed circle?\r\n\t *\r\n\t * @default true\r\n\t */\r\n\tconnectEnds?: boolean;\r\n\r\n}\r\n\r\n/**\r\n * Defines events for [[RadarSeries]].\r\n */\r\nexport interface IRadarSeriesEvents extends ILineSeriesEvents { }\r\n\r\n/**\r\n * Defines adapters for [[RadarSeries]].\r\n *\r\n * @see {@link Adapter}\r\n */\r\nexport interface IRadarSeriesAdapters extends ILineSeriesAdapters, IRadarSeriesProperties { }\r\n\r\n\r\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\r\n\r\n/**\r\n * Defines [[Series]] for a radar graph.\r\n *\r\n * @see {@link IRadarSeriesEvents} for a list of available Events\r\n * @see {@link IRadarSeriesAdapters} for a list of available Adapters\r\n * @todo Example\r\n * @important\r\n */\r\nexport class RadarSeries extends LineSeries {\r\n\r\n\t/**\r\n\t * Defines the type of data fields used for the series.\r\n\t */\r\n\tpublic _dataFields: IRadarSeriesDataFields;\r\n\r\n\t/**\r\n\t * Defines available properties.\r\n\t */\r\n\tpublic _properties!: IRadarSeriesProperties;\r\n\r\n\t/**\r\n\t * Defines available adapters.\r\n\t */\r\n\tpublic _adapter!: IRadarSeriesAdapters;\r\n\r\n\t/**\r\n\t * Defines available events.\r\n\t */\r\n\tpublic _events!: IRadarSeriesEvents;\r\n\r\n\t/**\r\n\t * Defines the type of data item.\r\n\t */\r\n\tpublic _dataItem: RadarSeriesDataItem;\r\n\r\n\t/**\r\n\t * A chart series belongs to.\r\n\t */\r\n\tpublic _chart: RadarChart;\r\n\r\n\t/**\r\n\t * Constructor\r\n\t */\r\n\tconstructor() {\r\n\t\tsuper();\r\n\t\tthis.className = \"RadarSeries\";\r\n\t\tthis.connectEnds = true;\r\n\t\tthis.applyTheme();\r\n\t}\r\n\r\n\t/**\r\n\t * (Re)validates the whole series, effectively causing it to redraw.\r\n\t *\r\n\t * @ignore Exclude from docs\r\n\t */\r\n\tpublic validate(): void {\r\n\r\n\t\t// so that radius would be updated\r\n\t\tif (this.chart.invalid) {\r\n\t\t\tthis.chart.validate();\r\n\t\t}\r\n\r\n\t\tsuper.validate();\r\n\t}\r\n\r\n\t/**\r\n\t * Returns a new/empty DataItem of the type appropriate for this object.\r\n\t *\r\n\t * @see {@link DataItem}\r\n\t * @return Data Item\r\n\t */\r\n\tprotected createDataItem(): this[\"_dataItem\"] {\r\n\t\treturn new RadarSeriesDataItem();\r\n\t}\r\n\r\n\t/**\r\n\t * Returns an [[IPoint]] coordinates of the specific Serie's data point.\r\n\t *\r\n\t * @param dataItem Data item\r\n\t * @param xKey Name of X data field\r\n\t * @param yKey Name of Y data field\r\n\t * @param locationX X location\r\n\t * @param locationY Y location\r\n\t * @param stackKeyX ?\r\n\t * @param stackKeyY ?\r\n\t * @returns Coordinates\r\n\t */\r\n\tpublic getPoint(dataItem: RadarSeriesDataItem, xKey: string, yKey: string, locationX?: number, locationY?: number, stackKeyX?: string, stackKeyY?: string) {\r\n\t\tif (!stackKeyX) {\r\n\t\t\tstackKeyX = \"valueX\";\r\n\t\t}\r\n\t\tif (!stackKeyY) {\r\n\t\t\tstackKeyY = \"valueY\";\r\n\t\t}\r\n\r\n\t\tlet x: number = this.yAxis.getX(dataItem, yKey, locationY, stackKeyY);\r\n\t\tlet y: number = this.yAxis.getY(dataItem, yKey, locationY, stackKeyY);\r\n\r\n\t\tlet radius: number = $math.getDistance({ x: x, y: y });\r\n\r\n\t\t// hack to be able to determine angle later\r\n\t\tif (radius == 0) {\r\n\t\t\tradius = 0.00001;\r\n\t\t}\r\n\r\n\t\tlet angle: number = this.xAxis.getAngle(dataItem, xKey, locationX, stackKeyX);\r\n\r\n\t\tlet startAngle = this.chart.startAngle;\r\n\t\tlet endAngle = this.chart.endAngle;\r\n\r\n\t\t//\t\tangle = $math.fitToRange(angle, startAngle, endAngle);\r\n\t\tif (angle < startAngle || angle > endAngle) {\r\n\t\t\treturn undefined;\r\n\t\t}\r\n\t\telse {\r\n\t\t\treturn { x: radius * $math.cos(angle), y: radius * $math.sin(angle) };\r\n\t\t}\r\n\t}\r\n\r\n\r\n\t/**\r\n\t * [addPoints description]\r\n\t *\r\n\t * @todo Description\r\n\t * @param points [description]\r\n\t * @param dataItem [description]\r\n\t * @param xField [description]\r\n\t * @param yField [description]\r\n\t * @param backwards [description]\r\n\t */\r\n\tprotected addPoints(points: IPoint[], dataItem: this[\"_dataItem\"], xField: string, yField: string, backwards?: boolean): void {\r\n\t\tlet point = this.getPoint(dataItem, xField, yField, dataItem.locations[xField], dataItem.locations[yField]);\r\n\t\tif (point) {\r\n\t\t\tpoints.push(point);\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Returns an SVG path to be used as a mask for the series.\r\n\t *\r\n\t * @return SVG path\r\n\t */\r\n\tprotected getMaskPath(): string {\r\n\t\tlet renderer: AxisRendererRadial = this.yAxis.renderer;\r\n\t\treturn $path.arc(renderer.startAngle, renderer.endAngle - renderer.startAngle, renderer.pixelRadius, renderer.pixelInnerRadius);\r\n\t}\r\n\r\n\t/**\r\n\t * [drawSegment description]\r\n\t *\r\n\t * @todo Description\r\n\t * @param segment [description]\r\n\t * @param points [description]\r\n\t * @param closePoints [description]\r\n\t */\r\n\tprotected drawSegment(segment: LineSeriesSegment, points: IPoint[], closePoints: IPoint[]): void {\r\n\t\tlet axis: Axis = this.yAxis;\r\n\t\tlet renderer: AxisRendererRadial = axis.renderer;\r\n\r\n\t\tif (this.connectEnds && Math.abs(renderer.endAngle - renderer.startAngle) == 360) {\r\n\t\t\t// adds one point to the beginning of closePoints array, if needed\r\n\t\t\tif (this.dataFields[this._xOpenField] ||\r\n\t\t\t\tthis.dataFields[this._yOpenField] ||\r\n\t\t\t\tthis.stacked) {\r\n\t\t\t\tpoints.push(points[0]);\r\n\t\t\t\tif (closePoints.length > 0) {\r\n\t\t\t\t\tclosePoints.unshift(closePoints[closePoints.length - 1]);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tsuper.drawSegment(segment, points, closePoints);\r\n\t}\r\n\r\n\t/**\r\n\t * Should the last and and first data points be connected, forming a complete\r\n\t * closed circle?\r\n\t *\r\n\t * @default true\r\n\t * @param value Connect?\r\n\t */\r\n\tpublic set connectEnds(value: boolean) {\r\n\t\tthis.setPropertyValue(\"connectEnds\", value, true);\r\n\t}\r\n\r\n\t/**\r\n\t * @return Connect?\r\n\t */\r\n\tpublic get connectEnds(): boolean {\r\n\t\treturn this.getPropertyValue(\"connectEnds\");\r\n\t}\r\n\r\n\tprotected positionBulletReal(bullet:Sprite, positionX:number, positionY:number){\r\n\t\tlet xAxis = this.xAxis;\r\n\t\tlet yAxis = this.yAxis;\r\n\r\n\t\tif(positionX < xAxis.start || positionX > xAxis.end || positionY < yAxis.start || positionY > yAxis.end){\r\n\t\t\tbullet.visible = false;\r\n\t\t}\r\n\t\t\r\n\t\tbullet.moveTo(this.xAxis.renderer.positionToPoint(positionX, positionY));\t\t\r\n\t}\r\n\r\n\r\n\tprotected setXAxis(axis: Axis) {\r\n\t\tsuper.setXAxis(axis);\r\n\t\tthis.updateRendererRefs();\r\n\t}\r\n\r\n\tprotected setYAxis(axis: Axis) {\r\n\t\tsuper.setYAxis(axis);\r\n\t\tthis.updateRendererRefs();\r\n\t}\r\n\r\n\tprotected updateRendererRefs() {\r\n\t\tlet rendererX = this.xAxis.renderer;\r\n\t\tlet rendererY = this.yAxis.renderer;\r\n\r\n\t\trendererX.axisRendererY = rendererY;\r\n\t}\r\n}\r\n\r\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\r\nregistry.registeredClasses[\"RadarSeries\"] = RadarSeries;\r\nregistry.registeredClasses[\"RadarSeriesDataItem\"] = RadarSeriesDataItem;\r\n\n\n\n// WEBPACK FOOTER //\n// ../../../../../src/.internal/charts/series/RadarSeries.ts","/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\r\nimport { AxisFill, IAxisFillProperties, IAxisFillAdapters, IAxisFillEvents } from \"./AxisFill\";\r\nimport { Axis } from \"./Axis\";\r\nimport { Percent, percent } from \"../../core/utils/Percent\";\r\nimport { AxisRendererCircular } from \"./AxisRendererCircular\";\r\nimport { registry } from \"../../core/Registry\";\r\nimport * as $type from \"../../core/utils/Type\";\r\n\r\n/**\r\n * ============================================================================\r\n * REQUISITES\r\n * ============================================================================\r\n * @hidden\r\n */\r\n\r\n/**\r\n * Defines properties for [[AxisFillCircular]].\r\n */\r\nexport interface IAxisFillCircularProperties extends IAxisFillProperties {\r\n\r\n\t/**\r\n\t * Inner radius. Relative ir absolute.\r\n\t */\r\n\tinnerRadius?: number | Percent;\r\n\r\n\t/**\r\n\t * Outer radius. Relative or absolute.\r\n\t */\r\n\tradius?: number | Percent;\r\n\r\n\t/**\r\n\t * Corner radius for the fill. In pixels.\r\n\t */\r\n\tcornerRadius?: number;\r\n\r\n}\r\n\r\n/**\r\n * Defines events for [[AxisFillCircular]].\r\n */\r\nexport interface IAxisFillCircularEvents extends IAxisFillEvents { }\r\n\r\n/**\r\n * Defines adapters for [[AxisFillCircular]].\r\n *\r\n * @see {@link Adapter}\r\n */\r\nexport interface IAxisFillCircularAdapters extends IAxisFillAdapters, IAxisFillCircularProperties { }\r\n\r\n\r\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\r\n\r\n/**\r\n * Provides fill element functionality for circular Axes.\r\n *\r\n * @see {@link IAxisFillCircularEvents} for a list of available events\r\n * @see {@link IAxisFillCircularAdapters} for a list of available Adapters\r\n * @todo Needs description\r\n */\r\nexport class AxisFillCircular extends AxisFill {\r\n\r\n\t/**\r\n\t * Defines available properties.\r\n\t */\r\n\tpublic _properties!: IAxisFillCircularProperties;\r\n\r\n\t/**\r\n\t * Defines available adapters.\r\n\t */\r\n\tpublic _adapter!: IAxisFillCircularAdapters;\r\n\r\n\t/**\r\n\t * Defines available events.\r\n\t */\r\n\tpublic _events!: IAxisFillCircularEvents;\r\n\r\n\t/**\r\n\t * An SVG path, used to draw fill shape.\r\n\t *\r\n\t * @ignore Exclude from docs\r\n\t * @todo Description (review)\r\n\t */\r\n\tpublic fillPath: string;\r\n\r\n\t/**\r\n\t * Constructor.\r\n\t *\r\n\t * @param axis Axis\r\n\t */\r\n\tconstructor(axis: Axis) {\r\n\t\tsuper(axis);\r\n\r\n\t\tthis.className = \"AxisFillCircular\";\r\n\r\n\t\tthis.element = this.paper.add(\"path\");\r\n\r\n\t\tthis.radius = percent(100);\r\n\r\n\t\tthis.applyTheme();\r\n\t}\r\n\r\n\t/**\r\n\t * Draws the fill element.\r\n\t *\r\n\t * @ignore Exclude from docs\r\n\t */\r\n\tpublic draw(): void {\r\n\t\tsuper.draw();\r\n\r\n\t\tif(this.__disabled || this.disabled){\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t\r\n\t\tif (this.axis) {\r\n\t\t\tlet renderer: AxisRendererCircular = this.axis.renderer;\r\n\t\t\tthis.fillPath = renderer.getPositionRangePath(this.startPosition, this.endPosition, this.radius, $type.hasValue(this.innerRadius) ? this.innerRadius : renderer.innerRadius, this.cornerRadius);\r\n\t\t\tthis.path = this.fillPath;\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Inner radius of the fill. Relative ([[Percent]]) or absolute (pixels).\r\n\t *\r\n\t * @param value Inner radius\r\n\t */\r\n\tpublic set innerRadius(value: number | Percent) {\r\n\t\tthis.setPercentProperty(\"innerRadius\", value, true, false, 10, false);\r\n\t}\r\n\r\n\t/**\r\n\t * @return Inner radius\r\n\t */\r\n\tpublic get innerRadius(): number | Percent {\r\n\t\treturn this.getPropertyValue(\"innerRadius\");\r\n\t}\r\n\r\n\t/**\r\n\t * Outer radius of the fill. Relative ([[Percent]]) or absolute (pixels).\r\n\t *\r\n\t * @param value Outer radius\r\n\t */\r\n\tpublic set radius(value: number | Percent) {\r\n\t\tthis.setPercentProperty(\"radius\", value, true, false, 10, false);\r\n\t}\r\n\r\n\t/**\r\n\t * @return Outer radius\r\n\t */\r\n\tpublic get radius(): number | Percent {\r\n\t\treturn this.getPropertyValue(\"radius\");\r\n\t}\r\n\r\n\t/**\r\n\t * Corner radius for the fill. In pixels.\r\n\t *\r\n\t * @param value Corner radius (px)\r\n\t */\r\n\tpublic set cornerRadius(value: number) {\r\n\t\tthis.setPropertyValue(\"cornerRadius\", value, true);\r\n\t}\r\n\r\n\t/**\r\n\t * @return Corner radius (px)\r\n\t */\r\n\tpublic get cornerRadius(): number {\r\n\t\treturn this.getPropertyValue(\"cornerRadius\");\r\n\t}\r\n\r\n}\r\n\r\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\r\nregistry.registeredClasses[\"AxisFillCircular\"] = AxisFillCircular;\r\n\n\n\n// WEBPACK FOOTER //\n// ../../../../../src/.internal/charts/axes/AxisFillCircular.ts","/**\r\n * A module defining functionality for circular axis grid elements.\r\n */\r\n\r\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\r\nimport { Grid, IGridProperties, IGridAdapters, IGridEvents } from \"./Grid\";\r\nimport { registry } from \"../../core/Registry\";\r\nimport { Percent } from \"../../core/utils/Percent\";\r\n\r\n\r\n/**\r\n * ============================================================================\r\n * REQUISITES\r\n * ============================================================================\r\n * @hidden\r\n */\r\n\r\n/**\r\n * Defines properties for [[GridCircular]].\r\n */\r\nexport interface IGridCircularProperties extends IGridProperties {\r\n\r\n\t/**\r\n\t * Inner radius of the circular grid. (absolute or relative)\r\n\t */\r\n\tinnerRadius: number | Percent;\r\n\r\n\t/**\r\n\t * Outer radius of the circular grid. (absolute or relative)\r\n\t */\r\n\tradius: number | Percent;\r\n\r\n}\r\n\r\n/**\r\n * Defines events for [[GridCircular]].\r\n */\r\nexport interface IGridCircularEvents extends IGridEvents { }\r\n\r\n/**\r\n * Defines adapters for [[GridCircular]].\r\n *\r\n * @see {@link Adapter}\r\n */\r\nexport interface IGridCircularAdapters extends IGridAdapters, IGridCircularProperties { }\r\n\r\n\r\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\r\n\r\n/**\r\n * Creates a circular grid element for circular-type axis.\r\n *\r\n * @see {@link IGridCircularEvents} for a list of available events\r\n * @see {@link IGridCircularAdapters} for a list of available Adapters\r\n * @todo Review: container is better, as we'll be able to attach something to the GridCircular, also with 3d charts we might need some additional elements\r\n */\r\nexport class GridCircular extends Grid {\r\n\r\n\t/**\r\n\t * Defines available properties.\r\n\t */\r\n\tpublic _properties!: IGridCircularProperties;\r\n\r\n\t/**\r\n\t * Defines available adapters.\r\n\t */\r\n\tpublic _adapter!: IGridCircularAdapters;\r\n\r\n\t/**\r\n\t * Defines available events.\r\n\t */\r\n\tpublic _events!: IGridCircularEvents;\r\n\r\n\t/**\r\n\t * Constructor\r\n\t */\r\n\tconstructor() {\r\n\t\tsuper();\r\n\t\tthis.className = \"GridCircular\";\r\n\t\tthis.pixelPerfect = false;\r\n\t\tthis.applyTheme();\r\n\t}\r\n\r\n\t/**\r\n\t * Inner radius of the circular grid. (absolute or relative)\r\n\t *\r\n\t * @param value Inner radius\r\n\t */\r\n\tpublic set innerRadius(value: number | Percent) {\r\n\t\tthis.setPercentProperty(\"innerRadius\", value, true, false, 10, false);\r\n\t}\r\n\r\n\t/**\r\n\t * @return Inner radius\r\n\t */\r\n\tpublic get innerRadius(): number | Percent {\r\n\t\treturn this.getPropertyValue(\"innerRadius\");\r\n\t}\r\n\r\n\t/**\r\n\t * Outer radius of the circular grid. (absolute or relative)\r\n\t *\r\n\t * @param value Outer radius\r\n\t */\r\n\tpublic set radius(value: number | Percent) {\r\n\t\tthis.setPercentProperty(\"radius\", value, true, false, 10, false);\r\n\t}\r\n\r\n\t/**\r\n\t * @return Outer radius\r\n\t */\r\n\tpublic get radius(): number | Percent {\r\n\t\treturn this.getPropertyValue(\"radius\");\r\n\t}\r\n\r\n}\r\n\r\n\r\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\r\nregistry.registeredClasses[\"GridCircular\"] = GridCircular;\r\n\n\n\n// WEBPACK FOOTER //\n// ../../../../../src/.internal/charts/axes/GridCircular.ts","/**\r\n * Module, defining Axis Renderer for circular axes.\r\n */\r\n\r\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\r\nimport { AxisRenderer, IAxisRendererProperties, IAxisRendererAdapters, IAxisRendererEvents } from \"./AxisRenderer\";\r\nimport { Axis } from \"./Axis\";\r\nimport { RadarChart } from \"../types/RadarChart\";\r\nimport { AxisFillCircular } from \"./AxisFillCircular\";\r\nimport { AxisRendererRadial } from \"./AxisRendererRadial\";\r\nimport { IPoint } from \"../../core/defs/IPoint\";\r\nimport { AxisTick } from \"./AxisTick\";\r\nimport { GridCircular } from \"./GridCircular\";\r\nimport { AxisLabelCircular } from \"./AxisLabelCircular\";\r\nimport { registry } from \"../../core/Registry\";\r\nimport { percent, Percent } from \"../../core/utils/Percent\";\r\nimport * as $math from \"../../core/utils/Math\";\r\nimport * as $path from \"../../core/rendering/Path\";\r\nimport * as $utils from \"../../core/utils/Utils\";\r\nimport * as $type from \"../../core/utils/Type\";\r\nimport { Sprite } from \"../../core/Sprite\";\r\nimport { AxisBullet } from \"./AxisBullet\";\r\n/**\r\n * ============================================================================\r\n * REQUISITES\r\n * ============================================================================\r\n * @hidden\r\n */\r\n\r\n/**\r\n * Defines properties for [[AxisRendererCircular]].\r\n */\r\nexport interface IAxisRendererCircularProperties extends IAxisRendererProperties {\r\n\r\n\t/**\r\n\t * Start angle of the circular axis in degrees (0-360).\r\n\t */\r\n\tstartAngle?: number;\r\n\r\n\t/**\r\n\t * End angle of the circular axis in degrees (0-360).\r\n\t */\r\n\tendAngle?: number;\r\n\r\n\t/**\r\n\t * Outer radius of the circular axis.\r\n\t *\r\n\t * Can either be absolute (pixels) or relative ([[Percent]]).\r\n\t */\r\n\tradius?: number | Percent;\r\n\r\n\t/**\r\n\t * Inner radius of the circular axis.\r\n\t *\r\n\t * Can either be absolute (pixels) or relative ([[Percent]]).\r\n\t */\r\n\tinnerRadius?: number | Percent;\r\n\r\n\t/**\r\n\t * Specifies if axis should use it's own start/end angles or the ones set on chart.\r\n\t */\r\n\tuseChartAngles?: boolean;\r\n\r\n}\r\n\r\n/**\r\n * Defines events for [[AxisRendererCircular]].\r\n */\r\nexport interface IAxisRendererCircularEvents extends IAxisRendererEvents { }\r\n\r\n/**\r\n * Defines adapters for [[AxisRenderer]].\r\n *\r\n * @see {@link Adapter}\r\n */\r\nexport interface IAxisRendererCircularAdapters extends IAxisRendererAdapters, IAxisRendererCircularProperties { }\r\n\r\n\r\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\r\n\r\n/**\r\n * A renderer for circular axis.\r\n */\r\nexport class AxisRendererCircular extends AxisRenderer {\r\n\r\n\t/**\r\n\t * Defines available properties.\r\n\t */\r\n\tpublic _properties!: IAxisRendererCircularProperties;\r\n\r\n\t/**\r\n\t * Defines available adapters.\r\n\t */\r\n\tpublic _adapter!: IAxisRendererCircularAdapters;\r\n\r\n\t/**\r\n\t * Defines available events.\r\n\t */\r\n\tpublic _events!: IAxisRendererCircularEvents;\r\n\r\n\t/**\r\n\t * Defines type of the grid elements.\r\n\t */\r\n\tpublic _gridType: GridCircular;\r\n\r\n\t/**\r\n\t * Defines type for the fill elements.\r\n\t */\r\n\tpublic _fillType: AxisFillCircular;\r\n\r\n\t/**\r\n\t * Defines type for the label elements.\r\n\t */\r\n\tpublic _labelType: AxisLabelCircular;\r\n\r\n\t/**\r\n\t * @ignore\r\n\t */\r\n\tpublic pixelRadiusReal: number = 0;\r\n\r\n\r\n\t/**\r\n\t * Y axis renderer\r\n\t */\r\n\tpublic axisRendererY: AxisRendererRadial;\r\n\r\n\t/**\r\n\t * Constructor.\r\n\t *\r\n\t * @param axis Related axis\r\n\t */\r\n\tconstructor() {\r\n\r\n\t\t// Init\r\n\t\tsuper();\r\n\r\n\t\t// axis.layout = \"none\"; // does not trigger redraw when size changes\r\n\t\tthis.layout = \"none\";\r\n\r\n\t\tthis.className = \"AxisRendererCircular\";\r\n\t\tthis.isMeasured = false;\r\n\t\tthis.startAngle = -90;\r\n\t\tthis.endAngle = 270;\r\n\r\n\t\tthis.useChartAngles = true;\r\n\t\tthis.radius = percent(100);\r\n\r\n\t\tthis.isMeasured = false;\r\n\r\n\t\tthis.grid.template.location = 0;\r\n\r\n\t\tthis.labels.template.location = 0;\r\n\t\tthis.labels.template.radius = 15;\r\n\r\n\t\tthis.ticks.template.location = 0;\r\n\t\tthis.ticks.template.pixelPerfect = false;\r\n\t\tthis.tooltipLocation = 0;\r\n\r\n\t\tthis.line.strokeOpacity = 0;\r\n\r\n\t\tthis.applyTheme();\r\n\t}\r\n\r\n\t/**\r\n\t* @ignore\r\n\t*/\r\n\tpublic setAxis(axis: Axis) {\r\n\t\tsuper.setAxis(axis);\r\n\t\taxis.isMeasured = false;\r\n\r\n\t\t// modify x and y so that tooltip would always be on circle\r\n\t\tlet tooltip = axis.tooltip;\r\n\r\n\t\ttooltip.adapter.add(\"dx\", (x, target) => {\r\n\t\t\tlet point: IPoint = $utils.svgPointToSprite({ x: target.pixelX, y: target.pixelY }, this);\r\n\t\t\treturn this.pixelRadius * Math.cos(Math.atan2(point.y, point.x)) - point.x;\r\n\t\t});\r\n\r\n\t\ttooltip.adapter.add(\"dy\", (y, target) => {\r\n\t\t\tlet point: IPoint = $utils.svgPointToSprite({ x: target.pixelX, y: target.pixelY }, this);\r\n\t\t\treturn this.pixelRadius * Math.sin(Math.atan2(point.y, point.x)) - point.y;\r\n\t\t});\r\n\t}\r\n\r\n\t/**\r\n\t * Validates Axis renderer.\r\n\t *\r\n\t * @ignore Exclude from docs\r\n\t */\r\n\tpublic validate() {\r\n\t\t// so that radius would be updated\r\n\t\tif (this.chart && this.chart.invalid) {\r\n\t\t\tthis.chart.validate();\r\n\t\t}\r\n\r\n\t\tsuper.validate();\r\n\t}\r\n\r\n\t/**\r\n\t * Returns actual length of the Axis, in pixels.\r\n\t *\r\n\t * @return Length (px)\r\n\t */\r\n\tpublic get axisLength(): number {\r\n\t\treturn 2 * Math.PI * this.pixelRadius;\r\n\t}\r\n\r\n\t/**\r\n\t * Outer radius of the axis.\r\n\t *\r\n\t * Can be absolute (px) or relative ([[Percent]]).\r\n\t *\r\n\t * @param value Outer radius\r\n\t */\r\n\tpublic set radius(value: number | Percent) {\r\n\t\tif (this.setPercentProperty(\"radius\", value, false, false, 10, false)) {\r\n\t\t\tif (this.axis) {\r\n\t\t\t\tthis.axis.invalidate();\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * @return Outer radius\r\n\t */\r\n\tpublic get radius(): number | Percent {\r\n\t\treturn this.getPropertyValue(\"radius\");\r\n\t}\r\n\r\n\t/**\r\n\t * Outer radius in pixels.\r\n\t *\r\n\t * @return Outer radius (px)\r\n\t */\r\n\tpublic get pixelRadius(): number {\r\n\t\treturn $utils.relativeRadiusToValue(this.radius, this.pixelRadiusReal) || 0;\r\n\t}\r\n\r\n\t/**\r\n\t * Inner radius of the axis.\r\n\t *\r\n\t * Can be absolute (px) or relative ([[Percent]]).\r\n\t *\r\n\t * @param value Inner radius\r\n\t */\r\n\tpublic set innerRadius(value: number | Percent) {\r\n\t\tif (this.setPercentProperty(\"innerRadius\", value, false, false, 10, false)) {\r\n\t\t\tif (this.axis) {\r\n\t\t\t\tthis.axis.invalidate();\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * @return Inner radius\r\n\t */\r\n\tpublic get innerRadius(): number | Percent {\r\n\t\tlet chart = this.chart;\t\t\r\n\t\tlet innerRadius = this.getPropertyValue(\"innerRadius\");\r\n\t\tif(chart){\r\n\t\t\tif (!$type.hasValue(innerRadius)) {\r\n\t\t\t\tinnerRadius = chart.innerRadius;\r\n\r\n\t\t\t\tif (innerRadius instanceof Percent && chart) {\r\n\t\t\t\t\tinnerRadius = percent(innerRadius.value * chart.innerRadiusModifyer * 100)\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tif (innerRadius instanceof Percent && chart) {\r\n\t\t\t\t\tlet mr = chart.mr;\r\n\t\t\t\t\tlet value = innerRadius.value;\r\n\t\t\t\t\tvalue = Math.max(mr * value, mr - Math.min(chart.plotContainer.innerHeight, chart.plotContainer.innerWidth)) / mr;\r\n\t\t\t\t\tinnerRadius = percent(value * 100);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn innerRadius;\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Specifies if axis should use its own `startAngle` and `endAngle` or\r\n\t * inherit them from relative properties from chart.\r\n\t *\r\n\t * @default false\r\n\t * @param value Use chart's angles\r\n\t */\r\n\tpublic set useChartAngles(value: boolean) {\r\n\t\tthis.setPropertyValue(\"useChartAngles\", value);\r\n\t}\r\n\r\n\t/**\r\n\t * @return Use chart angles\r\n\t */\r\n\tpublic get useChartAngles(): boolean {\r\n\t\treturn this.getPropertyValue(\"useChartAngles\");\r\n\t}\r\n\r\n\t/**\r\n\t * Inner radius in pixels.\r\n\t *\r\n\t * @return Inner radius (px)\r\n\t */\r\n\tpublic get pixelInnerRadius(): number {\r\n\t\treturn $utils.relativeRadiusToValue(this.innerRadius, this.pixelRadiusReal) || 0;\r\n\t}\r\n\r\n\t/**\r\n\t * Converts relative position on axis to point coordinates.\r\n\t *\r\n\t * @param position Position (0-1)\r\n\t * @param position2 Position (0-1) Position on the second axis\r\n\t * @return Point\r\n\t */\r\n\tpublic positionToPoint(position: number, position2?: number): IPoint {\r\n\r\n\t\tif (!$type.isNumber(position2)) {\r\n\t\t\tposition2 = 1;\r\n\t\t}\r\n\r\n\t\tlet coordinate: number = this.positionToCoordinate(position);\r\n\t\tlet angle: number = this.startAngle + (this.endAngle - this.startAngle) * coordinate / this.axisLength;\r\n\t\tlet radius = this.pixelRadius;\r\n\t\tlet innerRadius = this.pixelInnerRadius;\r\n\r\n\t\tif (this.axisRendererY) {\r\n\t\t\tlet realRadius = $math.fitToRange(this.axisRendererY.positionToCoordinate(position2), 0, Infinity)\r\n\t\t\tlet point = { x: realRadius * $math.cos(angle), y: realRadius * $math.sin(angle) };\r\n\t\t\treturn point;\r\n\t\t}\r\n\r\n\t\treturn { x: $math.cos(angle) * innerRadius + (radius - innerRadius) * $math.cos(angle) * position2, y: $math.sin(angle) * innerRadius + (radius - innerRadius) * $math.sin(angle) * position2 };\r\n\t}\r\n\r\n\t/**\r\n\t * Converts relative position (0-1) on axis to angle in degrees (0-360).\r\n\t *\r\n\t * @param position Position (0-1)\r\n\t * @return Angle (0-360)\r\n\t */\r\n\tpublic positionToAngle(position: number): number {\r\n\t\tlet axis: Axis = this.axis;\r\n\r\n\t\tlet arc: number = (this.endAngle - this.startAngle) / (axis.end - axis.start);\r\n\r\n\t\tlet angle: number;\r\n\r\n\t\tif (axis.renderer.inversed) {\r\n\t\t\tangle = this.startAngle + (axis.end - position) * arc;\r\n\t\t}\r\n\t\telse {\r\n\t\t\tangle = this.startAngle + (position - axis.start) * arc;\r\n\t\t}\r\n\r\n\t\treturn $math.round(angle, 3);\r\n\t}\r\n\r\n\t/**\r\n\t * Converts angle on axis to relative position(0-1).\r\n\t *\r\n\t * @param angle Angle in degrees\r\n\t * @return Position (0-1)\r\n\t */\r\n\tpublic angleToPosition(angle: number): number {\r\n\t\tlet axis: Axis = this.axis;\r\n\r\n\t\tlet arc: number = (this.endAngle - this.startAngle) / (axis.end - axis.start);\r\n\t\tlet position: number\r\n\r\n\t\tif (axis.renderer.inversed) {\r\n\t\t\tposition = axis.end - (angle - this.startAngle) / arc;\r\n\t\t}\r\n\t\telse {\r\n\t\t\tposition = (angle - this.startAngle) / arc + axis.start;\r\n\t\t}\r\n\r\n\t\treturn $math.round(position, 5);\r\n\t}\r\n\r\n\t/**\r\n\t * Updates and positions the axis line element.\r\n\t *\r\n\t * @ignore Exclude from docs\r\n\t */\r\n\tpublic updateAxisLine() {\r\n\t\tlet radius: number = this.pixelRadius;\r\n\t\tlet startAngle: number = this.startAngle;\r\n\t\tlet endAngle: number = this.endAngle;\r\n\r\n\t\tlet arc: number = $math.min(360, endAngle - startAngle);\t\t\r\n\t\tthis.line.path = $path.moveTo({ x: radius * $math.cos(startAngle), y: radius * $math.sin(startAngle) }) + $path.arcTo(startAngle, arc, radius, radius);\r\n\t}\r\n\r\n\t/**\r\n\t * Updates and positions a grid element.\r\n\t *\r\n\t * @ignore Exclude from docs\r\n\t * @param grid Grid element\r\n\t * @param position Starting position\r\n\t * @param endPosition End position\r\n\t */\r\n\tpublic updateGridElement(grid: GridCircular, position: number, endPosition: number) {\r\n\t\tposition = position + (endPosition - position) * grid.location;\r\n\r\n\t\tlet point: IPoint = this.positionToPoint(position);\r\n\r\n\t\tif ($type.isNumber(point.x) && $type.isNumber(point.y) && grid.element) {\r\n\t\t\tlet angle: number = $math.DEGREES * Math.atan2(point.y, point.x);\r\n\t\t\tlet radius: number = $utils.relativeRadiusToValue($type.hasValue(grid.radius) ? grid.radius : percent(100), this.pixelRadius);\r\n\r\n\t\t\tlet gridInnerRadius = $utils.relativeRadiusToValue(grid.innerRadius, this.pixelRadius);\r\n\t\t\tgrid.zIndex = 0;\r\n\r\n\t\t\tlet innerRadius: number = $utils.relativeRadiusToValue($type.isNumber(gridInnerRadius) ? gridInnerRadius : this.innerRadius, this.pixelRadiusReal, true);\r\n\r\n\t\t\tif(!$type.isNumber(innerRadius)){\r\n\t\t\t\tinnerRadius = 0;\r\n\t\t\t}\r\n\r\n\t\t\tgrid.path = $path.moveTo({ x: innerRadius * $math.cos(angle), y: innerRadius * $math.sin(angle) }) + $path.lineTo({ x: radius * $math.cos(angle), y: radius * $math.sin(angle) });\r\n\t\t}\r\n\t\tthis.toggleVisibility(grid, position, 0, 1);\r\n\t}\r\n\r\n\t/**\r\n\t * Updates and positions a tick element.\r\n\t *\r\n\t * @ignore Exclude from docs\r\n\t * @param tick Tick element\r\n\t * @param position Starting position\r\n\t * @param endPosition End position\r\n\t */\r\n\tpublic updateTickElement(tick: AxisTick, position: number, endPosition: number) {\r\n\r\n\t\tposition = position + (endPosition - position) * tick.location;\r\n\r\n\t\tlet point: IPoint = this.positionToPoint(position);\r\n\r\n\t\tif (tick.element) {\r\n\t\t\tlet radius: number = this.pixelRadius;\r\n\t\t\tlet angle: number = $math.DEGREES * Math.atan2(point.y, point.x);\r\n\t\t\tlet tickLength: number = tick.length;\r\n\t\t\tif (tick.inside) {\r\n\t\t\t\ttickLength = -tickLength;\r\n\t\t\t}\r\n\t\t\ttick.zIndex = 1;\r\n\t\t\ttick.path = $path.moveTo({ x: radius * $math.cos(angle), y: radius * $math.sin(angle) }) + $path.lineTo({ x: (radius + tickLength) * $math.cos(angle), y: (radius + tickLength) * $math.sin(angle) });\r\n\t\t}\r\n\r\n\t\tthis.toggleVisibility(tick, position, 0, 1);\r\n\t}\r\n\r\n\t/**\r\n\t * Updates and positions axis bullet.\r\n\t *\r\n\t * @ignore Exclude from docs\r\n\t * @param bullet AxisBullet element\r\n\t * @param position Starting position\r\n\t * @param endPosition End position\r\n\t */\r\n\tpublic updateBullet(bullet: Sprite, position: number, endPosition: number): void {\r\n\t\tlet location = 0.5;\r\n\t\tif (bullet instanceof AxisBullet) {\r\n\t\t\tlocation = bullet.location;\r\n\t\t}\r\n\r\n\t\tposition = position + (endPosition - position) * location;\r\n\r\n\t\tlet point: IPoint = this.positionToPoint(position);\r\n\t\tlet radius: number = this.pixelRadius;\r\n\t\tlet angle: number = $math.DEGREES * Math.atan2(point.y, point.x);\r\n\r\n\t\tpoint = { x: radius * $math.cos(angle), y: radius * $math.sin(angle) }\r\n\r\n\t\tthis.positionItem(bullet, point);\r\n\r\n\t\tthis.toggleVisibility(bullet, position, 0, 1);\r\n\t}\r\n\r\n\t/**\r\n\t * Updates and positions a label element.\r\n\t *\r\n\t * @ignore Exclude from docs\r\n\t * @param label Label element\r\n\t * @param position Starting position\r\n\t * @param endPosition Ending position\r\n\t */\r\n\tpublic updateLabelElement(label: this[\"_labelType\"], position: number, endPosition: number, location?: number) {\r\n\r\n\t\tif (!$type.hasValue(location)) {\r\n\t\t\tlocation = label.location;\r\n\t\t}\r\n\r\n\t\tposition = position + (endPosition - position) * location;\r\n\r\n\t\tlabel.fixPosition(this.positionToAngle(position), this.pixelRadius);\r\n\t\tlabel.zIndex = 2;\r\n\r\n\t\tthis.toggleVisibility(label, position, this.minLabelPosition, this.maxLabelPosition);\r\n\t}\r\n\r\n\t/**\r\n\t * Checks if point is within bounds of a container.\r\n\t *\r\n\t * @ignore Exclude from docs\r\n\t * @param point Point coordinates\r\n\t * @return Fits?\r\n\t */\r\n\tpublic fitsToBounds(point: IPoint): boolean {\r\n\t\treturn true;\r\n\t}\r\n\r\n\t/**\r\n\t * Start angle of the axis in degrees (0-360).\r\n\t *\r\n\t * @param value Start angle\r\n\t */\r\n\tpublic set startAngle(value: number) {\r\n\t\t// do not normalize angel here!\r\n\t\tif (this.setPropertyValue(\"startAngle\", value)) {\r\n\t\t\tthis.invalidateAxisItems();\r\n\t\t\tif (this.axis) {\r\n\t\t\t\tthis.axis.invalidateSeries();\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * @return Start angle\r\n\t */\r\n\tpublic get startAngle(): number {\r\n\t\treturn this.getPropertyValue(\"startAngle\");\r\n\t}\r\n\r\n\t/**\r\n\t * End angle of the axis in degrees (0-360).\r\n\t *\r\n\t * @param value End angle\r\n\t */\r\n\tpublic set endAngle(value: number) {\r\n\t\t// do not normalize angel here!\r\n\t\tif (this.setPropertyValue(\"endAngle\", value)) {\r\n\t\t\tthis.invalidateAxisItems();\r\n\t\t\tif (this.axis) {\r\n\t\t\t\tthis.axis.invalidateSeries();\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * @return End angle\r\n\t */\r\n\tpublic get endAngle(): number {\r\n\t\treturn this.getPropertyValue(\"endAngle\");\r\n\t}\r\n\r\n\r\n\t/**\r\n\t * [getPositionRangePath description]\r\n\t *\r\n\t * @ignore Exclude from docs\r\n\t * @todo Description\r\n\t * @param startPosition Starting position\r\n\t * @param endPosition End position\r\n\t * @return SVG path\r\n\t */\r\n\tpublic getPositionRangePath(startPosition: number, endPosition: number, radius?: number | Percent, innerRadius?: number | Percent, cornerRadius?: number): string {\r\n\t\tlet path: string = \"\";\r\n\t\tif ($type.isNumber(startPosition) && $type.isNumber(endPosition)) {\r\n\r\n\t\t\tif (!$type.hasValue(radius)) {\r\n\t\t\t\tradius = this.radius;\r\n\t\t\t}\r\n\r\n\t\t\tstartPosition = $math.max(startPosition, this.axis.start);\r\n\t\t\tendPosition = $math.min(endPosition, this.axis.end);\r\n\r\n\t\t\tif (endPosition < startPosition) {\r\n\t\t\t\tendPosition = startPosition;\r\n\t\t\t}\r\n\r\n\t\t\tlet pixelRadius: number = $utils.relativeRadiusToValue(radius, this.pixelRadius);\r\n\t\t\tlet pixelInnerRadius: number = $utils.relativeRadiusToValue(innerRadius, this.pixelRadius, true);\r\n\r\n\t\t\tlet startAngle: number = this.positionToAngle(startPosition);\r\n\t\t\tlet endAngle: number = this.positionToAngle(endPosition);\r\n\r\n\t\t\tlet arc: number = endAngle - startAngle;\r\n\r\n\t\t\tpath = $path.arc(startAngle, arc, pixelRadius, pixelInnerRadius, pixelRadius, cornerRadius);\r\n\t\t}\r\n\r\n\t\treturn path;\r\n\t}\r\n\r\n\t/**\r\n\t * Returns a new grid element, suitable for this Axis Renderer type.\r\n\t *\r\n\t * @return Grid element\r\n\t */\r\n\tpublic createGrid(): this[\"_gridType\"] {\r\n\t\treturn new GridCircular();\r\n\t}\r\n\r\n\t/**\r\n\t * Returns a new fill element, suitable for this Axis Renderer type.\r\n\t *\r\n\t * @return Fill element\r\n\t */\r\n\tpublic createFill(axis: Axis): this[\"_fillType\"] {\r\n\t\treturn new AxisFillCircular(axis);\r\n\t}\r\n\r\n\t/**\r\n\t * Returns a new label element, suitable for this Axis Renderer type.\r\n\t *\r\n\t * @return Label element\r\n\t */\r\n\tpublic createLabel(): this[\"_labelType\"] {\r\n\t\treturn new AxisLabelCircular();\r\n\t}\r\n\r\n\r\n\t/**\r\n\t * Converts a point at specific coordinates to a relative position (0-1)\r\n\t * on the axis.\r\n\t *\r\n\t * @param point Point\r\n\t * @return Position (0-1)\r\n\t */\r\n\tpublic pointToPosition(point: IPoint) {\r\n\t\tlet angle = $math.fitAngleToRange($math.getAngle(point), this.startAngle, this.endAngle);\r\n\t\treturn this.coordinateToPosition((angle - this.startAngle) / 360 * this.axisLength);\r\n\t}\r\n}\r\n\r\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\r\nregistry.registeredClasses[\"AxisRendererCircular\"] = AxisRendererCircular;\r\n\n\n\n// WEBPACK FOOTER //\n// ../../../../../src/.internal/charts/axes/AxisRendererCircular.ts","/**\r\n * Module, defining Axis Renderer for radial axes.\r\n */\r\n\r\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\r\nimport { AxisRendererY, IAxisRendererYProperties, IAxisRendererYAdapters, IAxisRendererYEvents } from \"./AxisRendererY\";\r\nimport { Axis } from \"./Axis\";\r\nimport { AxisTick } from \"./AxisTick\";\r\nimport { CategoryAxis } from \"./CategoryAxis\";\r\nimport { RadarChart } from \"../types/RadarChart\";\r\nimport { IPoint } from \"../../core/defs/IPoint\";\r\nimport { Grid } from \"./Grid\";\r\nimport { AxisBreak } from \"./AxisBreak\";\r\nimport { WavedCircle } from \"../../core/elements/WavedCircle\";\r\nimport { PointerOrientation } from \"../../core/elements/Tooltip\";\r\nimport { MutableValueDisposer } from \"../../core/utils/Disposer\";\r\nimport { Percent, percent } from \"../../core/utils/Percent\";\r\nimport { registry } from \"../../core/Registry\";\r\nimport * as $math from \"../../core/utils/Math\";\r\nimport * as $path from \"../../core/rendering/Path\";\r\nimport * as $utils from \"../../core/utils/Utils\";\r\nimport * as $type from \"../../core/utils/Type\";\r\nimport { Sprite } from \"../../core/Sprite\";\r\nimport { AxisBullet } from \"./AxisBullet\";\r\n\r\n/**\r\n * ============================================================================\r\n * REQUISITES\r\n * ============================================================================\r\n * @hidden\r\n */\r\n\r\n/**\r\n * Defines properties for [[AxisRendererRadial]].\r\n */\r\nexport interface IAxisRendererRadialProperties extends IAxisRendererYProperties {\r\n\r\n\t/**\r\n\t * Start angle of the radial axis in degrees. (0-360)\r\n\t */\r\n\tstartAngle?: number;\r\n\r\n\t/**\r\n\t * End angle of the radial axis in degrees. (0-360)\r\n\t */\r\n\tendAngle?: number;\r\n\r\n\t/**\r\n\t * A grid type to display: \"circles\" or \"polygons\".\r\n\t *\r\n\t * @default \"circles\"\r\n\t */\r\n\tgridType?: \"circles\" | \"polygons\"; //@todo: move it to GridRadial?\r\n\r\n\t/**\r\n\t * An angle of the axis in degrees. (0-360)\r\n\t */\r\n\taxisAngle?: number;\r\n\r\n\r\n\t/**\r\n\t * Outer radius of the radial axis.\r\n\t *\r\n\t * Can either be absolute (pixels) or relative ([[Percent]]).\r\n\t */\r\n\tradius?: number | Percent;\r\n\r\n\t/**\r\n\t * Inner radius of the radial axis.\r\n\t *\r\n\t * Can either be absolute (pixels) or relative ([[Percent]]).\r\n\t */\r\n\tinnerRadius?: number | Percent;\r\n\r\n}\r\n\r\n/**\r\n * Defines events for [[AxisRendererRadial]].\r\n */\r\nexport interface IAxisRendererRadialEvents extends IAxisRendererYEvents { }\r\n\r\n/**\r\n * Defines adapters for [[AxisRenderer]].\r\n *\r\n * @see {@link Adapter}\r\n */\r\nexport interface IAxisRendererRadialAdapters extends IAxisRendererYAdapters, IAxisRendererRadialProperties { }\r\n\r\n\r\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\r\n\r\n/**\r\n * A renderer for radial axis.\r\n */\r\nexport class AxisRendererRadial extends AxisRendererY {\r\n\r\n\t/**\r\n\t * Defines available properties.\r\n\t */\r\n\tpublic _properties!: IAxisRendererRadialProperties;\r\n\r\n\t/**\r\n\t * Defines available adapters.\r\n\t */\r\n\tpublic _adapter!: IAxisRendererRadialAdapters;\r\n\r\n\t/**\r\n\t * Defines available events.\r\n\t */\r\n\tpublic _events!: IAxisRendererRadialEvents;\r\n\r\n\t/**\r\n\t * A related chart.\r\n\t */\r\n\tprotected _chart = new MutableValueDisposer();\r\n\r\n\t/**\r\n\t * @ignore\r\n\t */\r\n\tpublic pixelRadiusReal: number = 0;\r\n\r\n\t/**\r\n\t * @ignore\r\n\t */\r\n\tpublic _chartType: RadarChart;\r\n\r\n\t/**\r\n\t * Constructor.\r\n\t *\r\n\t * @param axis Related axis\r\n\t */\r\n\tconstructor() {\r\n\r\n\t\t// Init\r\n\t\tsuper();\r\n\t\tthis.className = \"AxisRendererRadial\";\r\n\t\tthis.isMeasured = false;\r\n\t\tthis.startAngle = -90;\r\n\t\tthis.endAngle = 270;\r\n\t\tthis.minGridDistance = 30;\r\n\t\tthis.gridType = \"circles\";\r\n\t\tthis.axisAngle = -90;\r\n\t\tthis.isMeasured = false;\r\n\t\tthis.layout = \"none\";\r\n\r\n\t\tthis.radius = percent(100);\r\n\r\n\t\tthis.line.strokeOpacity = 0;\r\n\r\n\t\tthis.labels.template.horizontalCenter = \"middle\";\r\n\r\n\t\tthis._disposers.push(this._chart);\r\n\r\n\t\tthis.applyTheme();\r\n\t}\r\n\r\n\t/**\r\n\t * Validates Axis renderer.\r\n\t *\r\n\t * @ignore Exclude from docs\r\n\t */\r\n\tpublic validate() {\r\n\t\t// so that radius would be updated\r\n\t\tif (this.chart && this.chart.invalid) {\r\n\t\t\tthis.chart.validate();\r\n\t\t}\r\n\r\n\t\tsuper.validate();\r\n\t}\r\n\r\n\t/**\r\n\t * Returns actual length of the Axis, in pixels.\r\n\t *\r\n\t * @return Length (px)\r\n\t */\r\n\tpublic get axisLength(): number {\r\n\t\treturn this.pixelRadius - this.pixelInnerRadius;\r\n\t}\r\n\r\n\t/**\r\n\t * Outer radius of the axis.\r\n\t *\r\n\t * Can be absolute (px) or relative ([[Percent]]).\r\n\t *\r\n\t * @param value Outer radius\r\n\t */\r\n\tpublic set radius(value: number | Percent) {\r\n\t\tthis.setPercentProperty(\"radius\", value, false, false, 10, false);\r\n\t}\r\n\r\n\t/**\r\n\t * @return Outer radius\r\n\t */\r\n\tpublic get radius(): number | Percent {\r\n\t\treturn this.getPropertyValue(\"radius\");\r\n\t}\r\n\r\n\t/**\r\n\t * Outer radius in pixels.\r\n\t *\r\n\t * @return Outer radius (px)\r\n\t */\r\n\tpublic get pixelRadius(): number {\r\n\t\treturn $utils.relativeRadiusToValue(this.radius, this.pixelRadiusReal) || 0;\r\n\t}\r\n\r\n\t/**\r\n\t * Inner radius of the axis.\r\n\t *\r\n\t * Can be absolute (px) or relative ([[Percent]]).\r\n\t *\r\n\t * @param value Outer radius\r\n\t */\r\n\tpublic set innerRadius(value: number | Percent) {\r\n\t\tthis.setPercentProperty(\"innerRadius\", value, false, false, 10, false)\r\n\t}\r\n\r\n\t/**\r\n\t * @return Inner radius\r\n\t */\r\n\tpublic get innerRadius(): number | Percent {\r\n\t\tlet chart = this.chart;\r\n\t\tlet innerRadius = this.getPropertyValue(\"innerRadius\");\r\n\t\tif(chart){\r\n\t\t\tif (!$type.hasValue(innerRadius)) {\r\n\t\t\t\tinnerRadius = chart.innerRadius;\r\n\r\n\t\t\t\tif (innerRadius instanceof Percent && chart) {\r\n\t\t\t\t\tinnerRadius = percent(innerRadius.value * chart.innerRadiusModifyer * 100)\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tif (innerRadius instanceof Percent && chart) {\r\n\t\t\t\t\tlet mr = chart.mr;\r\n\t\t\t\t\tlet value = innerRadius.value;\r\n\t\t\t\t\tvalue = Math.max(mr * value, mr - Math.min(chart.plotContainer.innerHeight, chart.plotContainer.innerWidth)) / mr;\r\n\t\t\t\t\tinnerRadius = percent(value * 100);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn innerRadius;\r\n\t}\r\n\r\n\t/**\r\n\t * Inner radius in pixels.\r\n\t *\r\n\t * @return Inner radius (px)\r\n\t */\r\n\tpublic get pixelInnerRadius(): number {\r\n\t\treturn $utils.relativeRadiusToValue(this.innerRadius, this.pixelRadiusReal) || 0;\r\n\t}\r\n\r\n\r\n\t/**\r\n\t * Converts relative position on axis to point coordinates.\r\n\t *\r\n\t * @param position Position (0-1)\r\n\t * @param position2 Position (0-1) Position on the second axis\r\n\t * @return Point\r\n\t */\r\n\tpublic positionToPoint(position: number, position2?: number): IPoint {\r\n\t\tlet radius: number = $math.fitToRange(this.positionToCoordinate(position), 0, Infinity);\r\n\t\treturn { x: radius * $math.cos(this.axisAngle), y: radius * $math.sin(this.axisAngle) };\r\n\t}\r\n\r\n\t/**\r\n\t * Updates and positions the axis line element.\r\n\t *\r\n\t * @ignore Exclude from docs\r\n\t */\r\n\tpublic updateAxisLine() {\r\n\t\tthis.line.path = $path.moveTo({ x: this.pixelInnerRadius * $math.cos(this.axisAngle), y: this.pixelInnerRadius * $math.sin(this.axisAngle) }) + $path.lineTo({ x: this.pixelRadius * $math.cos(this.axisAngle), y: this.pixelRadius * $math.sin(this.axisAngle) });\r\n\r\n\t\tlet title = this.axis.title;\r\n\t\ttitle.valign = \"none\";\r\n\t\ttitle.horizontalCenter = \"middle\";\r\n\t\ttitle.verticalCenter = \"bottom\";\r\n\t\ttitle.y = - this.axisLength / 2;\r\n\t\tlet rotation: number = 90;\r\n\t\tif (this.opposite) {\r\n\t\t\tif (!this.inside) {\r\n\t\t\t\trotation = -90;\r\n\t\t\t}\r\n\t\t}\r\n\t\telse {\r\n\t\t\tif (this.inside) {\r\n\t\t\t\trotation = -90;\r\n\t\t\t}\r\n\t\t}\r\n\t\ttitle.rotation = rotation;\r\n\t}\r\n\r\n\t/**\r\n\t * Updates and positions a grid element.\r\n\t *\r\n\t * @ignore Exclude from docs\r\n\t * @param grid Grid element\r\n\t * @param position Starting position\r\n\t * @param endPosition End position\r\n\t */\r\n\tpublic updateGridElement(grid: Grid, position: number, endPosition: number) {\r\n\t\tposition = position + (endPosition - position) * grid.location;\r\n\t\tlet point: IPoint = this.positionToPoint(position);\r\n\t\tlet path: string;\r\n\t\tlet radius: number = $math.getDistance(point);\r\n\t\tlet startAngle: number = this.startAngle;\r\n\t\tlet endAngle: number = this.endAngle;\r\n\t\tlet chart = this.chart;\r\n\r\n\t\tif ($type.isNumber(radius) && grid.element && chart) {\r\n\t\t\t\r\n\t\t\tlet xAxis = chart.xAxes.getIndex(0);\r\n\t\t\tlet count = 0;\r\n\r\n\t\t\tlet series = chart.series.getIndex(0);\r\n\r\n\t\t\tif (series) {\r\n\t\t\t\tcount = series.dataItems.length;\r\n\t\t\t}\r\n\r\n\t\t\t// polygons are only possible if x axis is present\r\n\t\t\t// @todo: review this\r\n\t\t\tif (this.gridType == \"polygons\" && count > 0 && series && xAxis && xAxis instanceof CategoryAxis) {\r\n\t\t\t\tlet gridLocation = xAxis.renderer.grid.template.location;\r\n\r\n\t\t\t\tlet angle: number = xAxis.getAngle(series.dataItems.getIndex(0), \"categoryX\", gridLocation);\r\n\t\t\t\tpath = $path.moveTo({ x: radius * $math.cos(angle), y: radius * $math.sin(angle) });\r\n\r\n\t\t\t\tfor (let i = 1; i < count; i++) {\r\n\t\t\t\t\tangle = xAxis.getAngle(series.dataItems.getIndex(i), \"categoryX\", gridLocation);\r\n\t\t\t\t\tpath += $path.lineTo({ x: radius * $math.cos(angle), y: radius * $math.sin(angle) });\r\n\t\t\t\t}\r\n\r\n\t\t\t\tangle = xAxis.getAngle(series.dataItems.getIndex(count - 1), \"categoryX\", xAxis.renderer.cellEndLocation);\r\n\t\t\t\tpath += $path.lineTo({ x: radius * $math.cos(angle), y: radius * $math.sin(angle) });\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tpath = $path.moveTo({ x: radius * $math.cos(startAngle), y: radius * $math.sin(startAngle) }) + $path.arcTo(startAngle, endAngle - startAngle, radius, radius);\r\n\t\t\t}\r\n\t\t\tgrid.path = path;\r\n\t\t}\r\n\r\n\t\tthis.toggleVisibility(grid, position, 0, 1);\r\n\t}\r\n\r\n\t/**\r\n\t * Updates and positions a label element.\r\n\t *\r\n\t * @ignore Exclude from docs\r\n\t * @param label Label element\r\n\t * @param position Starting position\r\n\t * @param endPosition Ending position\r\n\t */\r\n\tpublic updateLabelElement(label: this[\"_labelType\"], position: number, endPosition: number, location?: number) {\r\n\r\n\t\tif (!$type.hasValue(location)) {\r\n\t\t\tlocation = label.location;\r\n\t\t}\r\n\r\n\t\tposition = position + (endPosition - position) * location;\r\n\r\n\t\tlet point: IPoint = this.positionToPoint(position);\r\n\r\n\t\tthis.positionItem(label, point);\r\n\t\tthis.toggleVisibility(label, position, this.minLabelPosition, this.maxLabelPosition);\r\n\t}\r\n\r\n\t/**\r\n\t * Updates and positions the base grid element.\r\n\t *\r\n\t * @ignore Exclude from docs\r\n\t */\r\n\tpublic updateBaseGridElement(): void {\r\n\t\t// @todo? zero grid for radar chart, is it needed?\r\n\t}\r\n\r\n\t/**\r\n\t * Checks if point is within bounds of a container.\r\n\t *\r\n\t * @ignore Exclude from docs\r\n\t * @param point Point coordinates\r\n\t * @return Fits?\r\n\t */\r\n\tpublic fitsToBounds(point: IPoint): boolean {\r\n\t\treturn true;\r\n\t}\r\n\r\n\t/**\r\n\t * Start angle of the axis in degrees. (0-360)\r\n\t *\r\n\t * @param value Start angle\r\n\t */\r\n\tpublic set startAngle(value: number) {\r\n\t\t// do not normalize angle here!\r\n\t\tif (this.setPropertyValue(\"startAngle\", value)) {\r\n\t\t\tthis.invalidateAxisItems();\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * @return Start angle\r\n\t */\r\n\tpublic get startAngle(): number {\r\n\t\treturn this.getPropertyValue(\"startAngle\");\r\n\t}\r\n\r\n\t/**\r\n\t * End angle of the axis in degrees. (0-360)\r\n\t *\r\n\t * @param value End angle\r\n\t */\r\n\tpublic set endAngle(value: number) {\r\n\t\t// do not normalize angel here!\r\n\t\tif (this.setPropertyValue(\"endAngle\", value)) {\r\n\t\t\tthis.invalidateAxisItems();\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * @return End angle\r\n\t */\r\n\tpublic get endAngle(): number {\r\n\t\treturn this.getPropertyValue(\"endAngle\");\r\n\t}\r\n\r\n\t/**\r\n\t * Angle of the radial axis in degrees. (0-360)\r\n\t *\r\n\t * @param value Axis angle\r\n\t */\r\n\tpublic set axisAngle(value: number) {\r\n\t\tthis.setPropertyValue(\"axisAngle\", $math.normalizeAngle(value));\r\n\t\tthis.invalidateAxisItems();\r\n\t}\r\n\r\n\t/**\r\n\t * @return Axis angle\r\n\t */\r\n\tpublic get axisAngle(): number {\r\n\t\treturn this.getPropertyValue(\"axisAngle\");\r\n\t\t//return $math.fitToRange(this.getPropertyValue(\"axisAngle\"), this.startAngle, this.endAngle); // no good, as less flexible\r\n\t}\r\n\r\n\t// polygons grid type is only possible under these conditions: xAxis is available and it is CategoryAxis, also at least one series should be added to a chart\r\n\r\n\t/**\r\n\t * Grid type for radial axis.\r\n\t *\r\n\t * A grid on radia axis can either be perfect circles (\"circles\"), or\r\n\t * straight lines (\"polygons\").\r\n\t *\r\n\t * @default \"circles\"\r\n\t * @param value Grid type\r\n\t */\r\n\tpublic set gridType(value: \"circles\" | \"polygons\") {\r\n\t\tthis.setPropertyValue(\"gridType\", value, true);\r\n\t}\r\n\r\n\t/**\r\n\t * Grid type\r\n\t */\r\n\tpublic get gridType(): \"circles\" | \"polygons\" {\r\n\t\tlet axis: Axis = this.chart.xAxes.getIndex(0);\r\n\t\tif (axis instanceof CategoryAxis) {\r\n\t\t\treturn this.getPropertyValue(\"gridType\");\r\n\t\t}\r\n\t\telse {\r\n\t\t\treturn \"circles\";\r\n\t\t}\r\n\r\n\t}\r\n\r\n\t/**\r\n\t * [getPositionRangePath description]\r\n\t *\r\n\t * @ignore Exclude from docs\r\n\t * @todo Description\r\n\t * @param startPosition Starting position\r\n\t * @param endPosition End position\r\n\t * @return SVG path\r\n\t */\r\n\tpublic getPositionRangePath(startPosition: number, endPosition: number): string {\r\n\t\tlet pixelInnerRadius = this.pixelInnerRadius;\r\n\t\tlet pixelRadius = this.axisLength + pixelInnerRadius;\r\n\t\tlet innerRadius: number = $math.fitToRange(this.positionToCoordinate(startPosition), pixelInnerRadius, pixelRadius);\r\n\t\tlet radius: number = $math.fitToRange(this.positionToCoordinate(endPosition), pixelInnerRadius, pixelRadius);\r\n\r\n\t\t//let angleCount: number = this.angleCount;\r\n\t\tlet startAngle: number = this.startAngle;\r\n\t\tlet endAngle: number = this.endAngle;\r\n\t\tlet arc: number = endAngle - startAngle;\r\n\r\n\t\tlet path: string;\r\n\r\n\t\tlet chart = this.chart;\r\n\t\tlet xAxis = chart.xAxes.getIndex(0);\r\n\t\tlet series = chart.series.getIndex(0);\r\n\r\n\t\tlet count = 0;\r\n\t\tif (series) {\r\n\t\t\tcount = series.dataItems.length;\r\n\t\t}\r\n\r\n\t\t// polygons are only possible if x axis is present\r\n\t\t// @todo: review this\r\n\t\tif (this.gridType == \"polygons\" && count > 0 && series && xAxis && xAxis instanceof CategoryAxis) {\r\n\t\t\tlet gridLocation = xAxis.renderer.grid.template.location;\r\n\r\n\t\t\tlet angle: number = xAxis.getAngle(series.dataItems.getIndex(0), \"categoryX\", gridLocation);\r\n\t\t\tpath = $path.moveTo({ x: radius * $math.cos(angle), y: radius * $math.sin(angle) });\r\n\r\n\t\t\tfor (let i = 1; i < count; i++) {\r\n\t\t\t\tangle = xAxis.getAngle(series.dataItems.getIndex(i), \"categoryX\", gridLocation);\r\n\t\t\t\tpath += $path.lineTo({ x: radius * $math.cos(angle), y: radius * $math.sin(angle) });\r\n\t\t\t}\r\n\r\n\t\t\tangle = xAxis.getAngle(series.dataItems.getIndex(count - 1), \"categoryX\", xAxis.renderer.cellEndLocation);\r\n\t\t\tpath += $path.lineTo({ x: radius * $math.cos(angle), y: radius * $math.sin(angle) });\r\n\r\n\t\t\tpath += $path.moveTo({ x: innerRadius * $math.cos(angle), y: innerRadius * $math.sin(angle) })\r\n\r\n\t\t\tfor (let i = count - 1; i >= 0; i--) {\r\n\t\t\t\tangle = xAxis.getAngle(series.dataItems.getIndex(i), \"categoryX\", gridLocation);\r\n\t\t\t\tpath += $path.lineTo({ x: innerRadius * $math.cos(angle), y: innerRadius * $math.sin(angle) });\r\n\t\t\t}\r\n\t\t}\r\n\t\telse {\r\n\t\t\tpath = $path.arc(startAngle, arc, radius, innerRadius);\r\n\t\t}\r\n\t\treturn path;\r\n\t}\r\n\r\n\t/**\r\n\t * Updates and positions an axis break element.\r\n\t *\r\n\t * @ignore Exclude from docs\r\n\t * @param axisBreak Break element\r\n\t */\r\n\tpublic updateBreakElement(axisBreak: AxisBreak) {\r\n\t\t// @todo: someday we might need axis break when gridType is polygons\r\n\r\n\t\tlet startLine: WavedCircle = axisBreak.startLine;\r\n\t\tlet endLine: WavedCircle = axisBreak.endLine;\r\n\t\tlet fillShape: WavedCircle = axisBreak.fillShape;\r\n\r\n\t\tlet startPoint: IPoint = axisBreak.startPoint;\r\n\t\tlet endPoint: IPoint = axisBreak.endPoint;\r\n\r\n\t\tstartLine.radius = Math.abs(startPoint.y);\r\n\t\tendLine.radius = Math.abs(endPoint.y);\r\n\t\tfillShape.radius = Math.abs(endPoint.y);\r\n\t\tfillShape.innerRadius = Math.abs(startPoint.y);\r\n\t}\r\n\r\n\t/**\r\n\t * Creates visual elements for and axis break.\r\n\t *\r\n\t * @ignore Exclude from docs\r\n\t * @param axisBreak Axis break\r\n\t */\r\n\tpublic createBreakSprites(axisBreak: AxisBreak): void {\r\n\t\taxisBreak.startLine = new WavedCircle();\r\n\t\taxisBreak.endLine = new WavedCircle();\r\n\t\taxisBreak.fillShape = new WavedCircle();\r\n\t}\r\n\r\n\t/**\r\n\t * Updates some of the Axis tooltip's visual properties, related to\r\n\t * rendering of the Axis.\r\n\t *\r\n\t * @todo Description (review)\r\n\t * @ignore Exclude from docs\r\n\t */\r\n\tpublic updateTooltip(): void {\r\n\t\tlet axis: Axis = this.axis;\r\n\t\tif (axis) {\r\n\r\n\t\t\tlet bigNum: number = 4000;\r\n\t\t\tlet bbx: number = -4000;\r\n\t\t\tlet bby: number = -4000;\r\n\t\t\tlet bbw: number = bigNum * 2;\r\n\t\t\tlet bbh: number = bigNum * 2;\r\n\t\t\tlet axisAngle: number = this.axisAngle;\r\n\t\t\tif (axisAngle < 0) {\r\n\t\t\t\taxisAngle += 360;\r\n\t\t\t}\r\n\t\t\tlet tooltipOrientation: PointerOrientation = \"vertical\";\r\n\t\t\tif ((axisAngle > 45 && axisAngle < 135) || (axisAngle > 225 && axisAngle < 315)) {\r\n\t\t\t\ttooltipOrientation = \"horizontal\";\r\n\t\t\t}\r\n\t\t\tthis.axis.updateTooltip(tooltipOrientation, { x: bbx, y: bby, width: bbw, height: bbh });\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Updates and positions a tick element.\r\n\t *\r\n\t * @ignore Exclude from docs\r\n\t * @param tick Tick element\r\n\t * @param position Position\r\n\t */\r\n\tpublic updateTickElement(tick: AxisTick, position: number, endPosition: number): void {\r\n\t\tposition = position + (endPosition - position) * tick.location;\r\n\r\n\t\tlet point: IPoint = this.positionToPoint(position);\r\n\r\n\t\tif (tick.element) {\r\n\t\t\tlet angle: number = $math.normalizeAngle(this.axisAngle + 90);\r\n\t\t\tif (angle / 90 != Math.round(angle / 90)) {\r\n\t\t\t\ttick.pixelPerfect = false;\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\ttick.pixelPerfect = true;\r\n\t\t\t}\r\n\t\t\tlet tickLength = -tick.length;\r\n\t\t\tif (tick.inside) {\r\n\t\t\t\ttickLength *= -1;\r\n\t\t\t}\r\n\t\t\ttick.path = $path.moveTo({ x: 0, y: 0 }) + $path.lineTo({ x: tickLength * $math.cos(angle), y: tickLength * $math.sin(angle) });\r\n\t\t}\r\n\t\tthis.positionItem(tick, point);\r\n\r\n\t\tthis.toggleVisibility(tick, position, 0, 1);\r\n\t}\r\n\r\n\r\n\t/**\r\n\t * Updates and positions axis bullet.\r\n\t *\r\n\t * @ignore Exclude from docs\r\n\t * @param bullet AxisBullet element\r\n\t * @param position Starting position\r\n\t * @param endPosition End position\r\n\t */\r\n\tpublic updateBullet(bullet: Sprite, position: number, endPosition: number): void {\r\n\t\tlet location = 0.5;\r\n\t\tif (bullet instanceof AxisBullet) {\r\n\t\t\tlocation = bullet.location;\r\n\t\t}\r\n\r\n\t\tposition = position + (endPosition - position) * location;\r\n\r\n\t\tlet point: IPoint = this.positionToPoint(position);\r\n\r\n\t\tthis.positionItem(bullet, point);\r\n\r\n\t\tthis.toggleVisibility(bullet, position, 0, 1);\r\n\t}\r\n\r\n\t/**\r\n\t * Converts a position on the axis to a coordinate in pixels.\r\n\t *\r\n\t * @ignore Exclude from docs\r\n\t * @param position Position (0-1)\r\n\t * @return Coordinate (px)\r\n\t */\r\n\tpublic positionToCoordinate(position: number): number {\r\n\t\tlet coordinate: number;\r\n\t\tlet axis: Axis = this.axis;\r\n\t\tlet axisFullLength = axis.axisFullLength;\r\n\t\tlet innerRadius = this.pixelInnerRadius;\r\n\r\n\t\tif (axis.renderer.inversed) {\r\n\t\t\tcoordinate = (axis.end - position) * axisFullLength + innerRadius;\r\n\t\t}\r\n\t\telse {\r\n\t\t\tcoordinate = (position - axis.start) * axisFullLength + innerRadius;\r\n\t\t}\r\n\r\n\t\treturn $math.round(coordinate, 1);\r\n\t}\r\n\r\n\t/**\r\n\t * Converts a point at specific coordinates to a relative position (0-1)\r\n\t * on the axis.\r\n\t *\r\n\t * @param point Point\r\n\t * @return Position (0-1)\r\n\t */\r\n\tpublic pointToPosition(point: IPoint) {\r\n\t\tlet coordinate = ($math.getDistance(point) - this.pixelInnerRadius);\r\n\t\treturn this.coordinateToPosition(coordinate);\r\n\t}\r\n\r\n\t/**\r\n\t * A chart, associated with the Axis.\r\n\t *\r\n\t * @ignore Exclude from docs\r\n\t * @param value Chart\r\n\t */\r\n\tpublic set chart(value: RadarChart) {\r\n\t\tthis._chart.set(value, null);\r\n\t}\r\n\r\n\t/**\r\n\t * @ignore Exclude from docs\r\n\t * @return Chart\r\n\t */\r\n\tpublic get chart(): RadarChart {\r\n\t\treturn this._chart.get();\r\n\t}\t\r\n\t\r\n}\r\n\r\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\r\nregistry.registeredClasses[\"AxisRendererRadial\"] = AxisRendererRadial;\r\n\n\n\n// WEBPACK FOOTER //\n// ../../../../../src/.internal/charts/axes/AxisRendererRadial.ts","/**\r\n * Radar chart module.\r\n */\r\n\r\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\r\nimport { XYChart, IXYChartProperties, IXYChartDataFields, IXYChartAdapters, IXYChartEvents, XYChartDataItem } from \"./XYChart\";\r\nimport { percent, Percent } from \"../../core/utils/Percent\";\r\nimport { RadarSeries } from \"../series/RadarSeries\";\r\nimport { RadarColumnSeries } from \"../series/RadarColumnSeries\";\r\nimport { Container } from \"../../core/Container\";\r\nimport { IRectangle } from \"../../core/defs/IRectangle\";\r\nimport { Circle } from \"../../core/elements/Circle\";\r\nimport { registry } from \"../../core/Registry\";\r\nimport { RadarCursor } from \"../cursors/RadarCursor\";\r\nimport { Axis } from \"../axes/Axis\";\r\nimport { AxisRenderer } from \"../axes/AxisRenderer\";\r\nimport { AxisRendererCircular } from \"../axes/AxisRendererCircular\";\r\nimport { AxisRendererRadial } from \"../axes/AxisRendererRadial\";\r\nimport * as $utils from \"../../core/utils/Utils\";\r\nimport * as $iter from \"../../core/utils/Iterator\";\r\nimport * as $type from \"../../core/utils/Type\";\r\nimport * as $math from \"../../core/utils/Math\";\r\nimport * as $path from \"../../core/rendering/Path\";\r\n\r\n\r\n/**\r\n * ============================================================================\r\n * DATA ITEM\r\n * ============================================================================\r\n * @hidden\r\n */\r\n\r\n/**\r\n * Defines a [[DataItem]] for [[RadarChart]].\r\n *\r\n * @see {@link DataItem}\r\n */\r\nexport class RadarChartDataItem extends XYChartDataItem {\r\n\r\n\t/**\r\n\t * Defines a type of [[Component]] this data item is used for.\r\n\t */\r\n\tpublic _component!: RadarChart;\r\n\r\n\t/**\r\n\t * Constructor\r\n\t */\r\n\tconstructor() {\r\n\t\tsuper();\r\n\t\tthis.className = \"RadarChartDataItem\";\r\n\t\tthis.applyTheme();\r\n\t}\r\n\r\n}\r\n\r\n\r\n/**\r\n * ============================================================================\r\n * REQUISITES\r\n * ============================================================================\r\n * @hidden\r\n */\r\n\r\n/**\r\n * Defines data fields for [[RadarChart]].\r\n */\r\nexport interface IRadarChartDataFields extends IXYChartDataFields { }\r\n\r\n/**\r\n * Defines properties for [[RadarChart]].\r\n */\r\nexport interface IRadarChartProperties extends IXYChartProperties {\r\n\r\n\t/**\r\n\t * Radius of the Radar face. Absolute or relative.\r\n\t */\r\n\tradius?: number | Percent;\r\n\r\n\t/**\r\n\t * Inner radius of the Radar face. Percent value is relative to radius.\r\n\t *\r\n\t * @todo review desc\r\n\t */\r\n\tinnerRadius?: number | Percent;\r\n\r\n\t/**\r\n\t * An angle radar face starts on. (degrees)\r\n\t *\r\n\t * @default -90\r\n\t */\r\n\tstartAngle?: number;\r\n\r\n\t/**\r\n\t * An angle radar face ends on. (degrees)\r\n\t *\r\n\t * @default 270\r\n\t */\r\n\tendAngle?: number;\r\n\r\n}\r\n\r\n/**\r\n * Defines events for [[RadarChart]].\r\n */\r\nexport interface IRadarChartEvents extends IXYChartEvents { }\r\n\r\n/**\r\n * Defines adapters for [[RadarChart]].\r\n *\r\n * @see {@link Adapter}\r\n */\r\nexport interface IRadarChartAdapters extends IXYChartAdapters, IRadarChartProperties { }\r\n\r\n\r\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\r\n\r\n/**\r\n * Creates a Radar chart.\r\n *\r\n * @see {@link IRadarChartEvents} for a list of available Events\r\n * @see {@link IRadarChartAdapters} for a list of available Adapters\r\n * @see {@link https://www.amcharts.com/docs/v4/chart-types/radar-chart/} for documentation\r\n * @important\r\n */\r\nexport class RadarChart extends XYChart {\r\n\r\n\t/**\r\n\t * Defines available data fields.\r\n\t */\r\n\tpublic _dataFields: IRadarChartDataFields;\r\n\r\n\t/**\r\n\t * Defines available properties.\r\n\t */\r\n\tpublic _properties!: IRadarChartProperties;\r\n\r\n\t/**\r\n\t * Defines available adapters.\r\n\t */\r\n\tpublic _adapter!: IRadarChartAdapters;\r\n\r\n\t/**\r\n\t * Defines available events.\r\n\t */\r\n\tpublic _events!: IRadarChartEvents;\r\n\r\n\t/**\r\n\t * Defines a type of series that this chart uses.\r\n\t */\r\n\tpublic _seriesType: RadarSeries | RadarColumnSeries;\r\n\r\n\t/**\r\n\t * Defines X axis renderer type.\r\n\t */\r\n\tpublic _xAxisRendererType: AxisRendererCircular;\r\n\r\n\t/**\r\n\t * Defines Y axis renderer type.\r\n\t */\r\n\tpublic _yAxisRendererType: AxisRendererRadial;\r\n\r\n\t/**\r\n\t * Defines X axis renderer type.\r\n\t */\r\n\tprotected _axisRendererX: typeof AxisRendererCircular = AxisRendererCircular;\r\n\r\n\t/**\r\n\t * Defines Y axis renderer type.\r\n\t */\r\n\tprotected _axisRendererY: typeof AxisRendererRadial = AxisRendererRadial;\r\n\r\n\t/**\r\n\t * [_cursor description]\r\n\t *\r\n\t * @todo Description\r\n\t */\r\n\tpublic _cursor: RadarCursor;\r\n\r\n\t/**\r\n\t * A container that holds Radar visual elements.\r\n\t */\r\n\tpublic radarContainer: Container;\r\n\r\n\r\n\t/**\r\n\t *\r\n\t * @ignore Exclude from docs\r\n\t */\r\n\tprotected _pixelInnerRadius: number;\r\n\r\n\r\n\t/**\r\n\t * used by cursor. We adjust innerradius if start and end angle are close to each other\r\n\t * @ignore Exclude from docs\r\n\t */\r\n\tpublic innerRadiusModifyer: number = 1;\r\n\r\n\r\n\t/**\r\n\t * @ignore\r\n\t */\r\n\tpublic mr: number = 1;\r\n\r\n\t/**\r\n\t * Constructor\r\n\t */\r\n\tconstructor() {\r\n\r\n\t\t// Init\r\n\t\tsuper();\r\n\t\tthis.className = \"RadarChart\";\r\n\r\n\t\tthis.startAngle = -90;\r\n\t\tthis.endAngle = 270;\r\n\r\n\t\tthis.radius = percent(80);\r\n\t\tthis.innerRadius = 0;\r\n\r\n\t\tlet radarContainer = this.plotContainer.createChild(Container);\r\n\t\tradarContainer.shouldClone = false;\r\n\t\tradarContainer.layout = \"absolute\";\r\n\t\tradarContainer.align = \"center\";\r\n\t\tradarContainer.valign = \"middle\";\r\n\r\n\t\tthis.seriesContainer.parent = radarContainer;\r\n\t\tthis.radarContainer = radarContainer;\r\n\t\tthis.bulletsContainer.parent = radarContainer;\r\n\t\tthis.axisBulletsContainer = radarContainer;\r\n\r\n\t\tthis._cursorContainer = radarContainer;\r\n\r\n\t\tthis.chartContainer.events.on(\"maxsizechanged\", this.invalidate, this, false); // need this for the chart to change radius if legend is removed/disabled\r\n\r\n\t\tthis._bulletMask = radarContainer.createChild(Circle);\r\n\t\tthis._bulletMask.shouldClone = false;\r\n\t\tthis._bulletMask.element = this.paper.add(\"path\");\r\n\t\tthis._bulletMask.opacity = 0;\r\n\r\n\t\t// Apply theme\r\n\t\tthis.applyTheme();\r\n\t}\r\n\r\n\t/**\r\n\t * Sets defaults that instantiate some objects that rely on parent, so they\r\n\t * cannot be set in constructor.\r\n\t */\r\n\tprotected applyInternalDefaults(): void {\r\n\r\n\t\tsuper.applyInternalDefaults();\r\n\r\n\t\t// Add a default screen reader title for accessibility\r\n\t\t// This will be overridden in screen reader if there are any `titles` set\r\n\t\tif (!$type.hasValue(this.readerTitle)) {\r\n\t\t\tthis.readerTitle = this.language.translate(\"Radar chart\");\r\n\t\t}\r\n\r\n\t}\r\n\r\n\t/**\r\n\t * Decorates Axis with required properties for this chart.\r\n\t *\r\n\t * @param axis Axis\r\n\t */\r\n\tprotected processAxis(axis: Axis): void {\r\n\t\tsuper.processAxis(axis);\r\n\t\tlet renderer: AxisRenderer = axis.renderer;\r\n\t\trenderer.gridContainer.parent = renderer;\r\n\t\trenderer.breakContainer.parent = renderer;\r\n\t\taxis.parent = this.radarContainer;\r\n\t\trenderer.toBack();\r\n\t}\r\n\r\n\t/**\r\n\t * Updates all X axes after range change event.\r\n\t */\r\n\tprotected handleXAxisRangeChange() {\r\n\t\tsuper.handleXAxisRangeChange();\r\n\t\t$iter.each(this.yAxes.iterator(), (axis) => {\r\n\t\t\taxis.invalidate();\r\n\t\t});\r\n\t}\r\n\r\n\t/**\r\n\t * Updates all Y axes after range change event.\r\n\t */\r\n\tprotected handleYAxisRangeChange() {\r\n\t\tsuper.handleYAxisRangeChange();\r\n\t\t$iter.each(this.xAxes.iterator(), (axis) => {\r\n\t\t\taxis.invalidate();\r\n\t\t});\r\n\t}\r\n\r\n\t/**\r\n\t * Processes JSON-based config before it is applied to the object.\r\n\t *\r\n\t * @ignore Exclude from docs\r\n\t * @param config Config\r\n\t */\r\n\tpublic processConfig(config?: { [index: string]: any }): void {\r\n\r\n\t\tif (config) {\r\n\r\n\t\t\t// Set up cursor\r\n\t\t\tif ($type.hasValue(config.cursor) && !$type.hasValue(config.cursor.type)) {\r\n\t\t\t\tconfig.cursor.type = \"RadarCursor\";\r\n\t\t\t}\r\n\r\n\t\t\t// Set up series\r\n\t\t\tif ($type.hasValue(config.series) && $type.isArray(config.series)) {\r\n\t\t\t\tfor (let i = 0, len = config.series.length; i < len; i++) {\r\n\t\t\t\t\tconfig.series[i].type = config.series[i].type || \"RadarSeries\";\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t// Set up axes\r\n\t\t\t/*if ($type.hasValue(config.xAxes) && $type.isArray(config.xAxes)) {\r\n\t\t\t\tfor (let i = 0, len = config.xAxes.length; i < len; i++) {\r\n\t\t\t\t\tconfig.xAxes[i].type = config.xAxes[i].type || \"AxisRendererCircular\";\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif ($type.hasValue(config.yAxes) && $type.isArray(config.yAxes)) {\r\n\t\t\t\tfor (let i = 0, len = config.yAxes.length; i < len; i++) {\r\n\t\t\t\t\tconfig.yAxes[i].type = config.yAxes[i].type || \"AxisRendererRadial\";\r\n\t\t\t\t}\r\n\t\t\t}*/\r\n\r\n\t\t}\r\n\r\n\t\tsuper.processConfig(config);\r\n\t}\r\n\r\n\t/**\r\n\t * Does calculations before drawing the chart.\r\n\t */\r\n\tprotected beforeDraw(): void {\r\n\t\tsuper.beforeDraw();\r\n\r\n\t\tlet plotContainer = this.plotContainer;\r\n\r\n\t\tlet rect = $math.getArcRect(this.startAngle, this.endAngle, 1);\r\n\t\tlet innerRect: IRectangle = { x: 0, y: 0, width: 0, height: 0 };\r\n\r\n\t\tlet wr = plotContainer.innerWidth / rect.width;\r\n\t\tlet hr = plotContainer.innerHeight / rect.height;\r\n\r\n\t\tlet innerRadius = this.innerRadius;\r\n\r\n\t\tif (innerRadius instanceof Percent) {\r\n\t\t\tlet value = innerRadius.value;\r\n\t\t\tlet mr = Math.min(wr, hr);\r\n\r\n\t\t\tthis.mr = mr;\r\n\r\n\t\t\tvalue = Math.max(mr * value, mr - Math.min(plotContainer.innerHeight, plotContainer.innerWidth)) / mr;\r\n\t\t\tinnerRect = $math.getArcRect(this.startAngle, this.endAngle, value);\r\n\r\n\t\t\tthis.innerRadiusModifyer = value / innerRadius.value;\r\n\r\n\t\t\tinnerRadius = percent(value * 100);\r\n\t\t}\r\n\r\n\t\t// @todo handle this when innerRadius set in pixels (do it for pie also)\r\n\t\trect = $math.getCommonRectangle([rect, innerRect]);\r\n\r\n\t\tlet maxRadius = Math.min(plotContainer.innerWidth / rect.width, plotContainer.innerHeight / rect.height);\r\n\r\n\t\tlet diameter = $utils.relativeRadiusToValue(this.radius, maxRadius) * 2 || 0;\r\n\t\tlet radius = diameter / 2;\r\n\t\tlet startAngle = this.startAngle;\r\n\t\tlet endAngle = this.endAngle;\r\n\r\n\t\tthis._pixelInnerRadius = $utils.relativeRadiusToValue(innerRadius, radius);\r\n\r\n\t\tthis._bulletMask.path = $path.arc(startAngle, endAngle - startAngle, radius, this._pixelInnerRadius);\r\n\r\n\t\t$iter.each(this.xAxes.iterator(), (axis) => {\r\n\t\t\tif (axis.renderer.useChartAngles) {\r\n\t\t\t\taxis.renderer.startAngle = startAngle;\r\n\t\t\t\taxis.renderer.endAngle = endAngle;\r\n\t\t\t}\r\n\r\n\t\t\taxis.width = diameter;\r\n\t\t\taxis.height = diameter;\r\n\t\t\t//axis.renderer.width = diameter;\r\n\t\t\t//axis.renderer.height = diameter;\r\n\t\t\taxis.renderer.pixelRadiusReal = radius;\r\n\t\t\t//axis.renderer.innerRadius = innerRadius;\r\n\t\t});\r\n\r\n\t\t$iter.each(this.yAxes.iterator(), (axis) => {\r\n\t\t\taxis.renderer.startAngle = startAngle;\r\n\t\t\taxis.renderer.endAngle = endAngle;\r\n\r\n\t\t\taxis.width = diameter;\r\n\t\t\taxis.height = diameter;\r\n\t\t\t//axis.renderer.width = diameter;\r\n\t\t\t//axis.renderer.height = diameter;\r\n\t\t\taxis.renderer.pixelRadiusReal = radius;\r\n\t\t\t//axis.renderer.innerRadius = innerRadius;\r\n\t\t});\r\n\r\n\r\n\r\n\t\tlet cursor = this.cursor;\r\n\t\tif (cursor) {\r\n\t\t\tcursor.width = diameter;\r\n\t\t\tcursor.height = diameter;\r\n\t\t\tcursor.startAngle = startAngle;\r\n\t\t\tcursor.endAngle = endAngle;\r\n\t\t}\r\n\r\n\t\tthis.radarContainer.definedBBox = { x: radius * rect.x, y: radius * rect.y, width: radius * rect.width, height: radius * rect.height };\r\n\t\tthis.radarContainer.validatePosition();\r\n\t}\r\n\r\n\t/**\r\n\t * Creates and returns a new Series, suitable for RadarChart.\r\n\t *\r\n\t * @return New Series\r\n\t */\r\n\tprotected createSeries(): this[\"_seriesType\"] {\r\n\t\treturn new RadarSeries();\r\n\t}\r\n\r\n\t/**\r\n\t * Starting angle of the Radar face. (degrees)\r\n\t *\r\n\t * Normally, a circular radar face begins (the radial axis is drawn) at the\r\n\t * top center. (at -90 degrees)\r\n\t *\r\n\t * You can use `startAngle` to change this setting.\r\n\t *\r\n\t * E.g. setting this to 0 will make the radial axis start horizontally to\r\n\t * the right, as opposed to vertical.\r\n\t *\r\n\t * For a perfect circle the absolute sum of `startAngle` and `endAngle`\r\n\t * needs to be 360.\r\n\t *\r\n\t * However, it's **not** necessary to do so. You can set those to lesser\r\n\t * numbers, to create semi-circles.\r\n\t *\r\n\t * E.g. `startAngle = -90` with `endAngle = 0` will create a radar face that\r\n\t * looks like a quarter of a circle.\r\n\t *\r\n\t * @default -90\r\n\t * @param value Start angle (degrees)\r\n\t */\r\n\tpublic set startAngle(value: number) {\r\n\t\tthis.setPropertyValue(\"startAngle\", value, true);\r\n\t}\r\n\r\n\t/**\r\n\t * @return Start angle (degrees)\r\n\t */\r\n\tpublic get startAngle(): number {\r\n\t\treturn this.getPropertyValue(\"startAngle\");\r\n\t}\r\n\r\n\t/**\r\n\t * Starting angle of the Radar face. (degrees)\r\n\t *\r\n\t * Normally, a circular radar face ends (the radial axis is drawn) exactly\r\n\t * where it has started, forming a full 360 circle. (at 270 degrees)\r\n\t *\r\n\t * You can use `endAngle` to end the circle somewhere else.\r\n\t *\r\n\t * E.g. setting this to 180 will make the radar face end at horizontal line\r\n\t * to the left off the center.\r\n\t *\r\n\t * For a perfect circle the absolute sum of `startAngle` and `endAngle`\r\n\t * needs to be 360.\r\n\t *\r\n\t * However, it's **not** necessary to do so. You can set those to lesser\r\n\t * numbers, to create semi-circles.\r\n\t *\r\n\t * E.g. `startAngle = -90` with `endAngle = 0` will create a radar face that\r\n\t * looks like a quarter of a circle.\r\n\t *\r\n\t * @default -90\r\n\t * @param value End angle (degrees)\r\n\t */\r\n\tpublic set endAngle(value: number) {\r\n\t\tthis.setPropertyValue(\"endAngle\", value, true);\r\n\t}\r\n\r\n\t/**\r\n\t * @return End angle (degrees)\r\n\t */\r\n\tpublic get endAngle(): number {\r\n\t\treturn this.getPropertyValue(\"endAngle\");\r\n\t}\r\n\r\n\t/**\r\n\t * Outer radius of the Radar face.\r\n\t *\r\n\t * This can either be in absolute pixel value, or relative [[Percent]].\r\n\t *\r\n\t * @param value Outer radius\r\n\t */\r\n\tpublic set radius(value: number | Percent) {\r\n\t\tthis.setPercentProperty(\"radius\", value, true, false, 10, false);\r\n\t}\r\n\r\n\t/**\r\n\t * @return Outer radius\r\n\t */\r\n\tpublic get radius(): number | Percent {\r\n\t\treturn this.getPropertyValue(\"radius\");\r\n\t}\r\n\r\n\t/**\r\n\t * @return Inner radius in pixels\r\n\t */\r\n\tpublic get pixelInnerRadius(): number {\r\n\t\treturn this._pixelInnerRadius;\r\n\t}\r\n\r\n\t/**\r\n\t * Inner radius of the radar face.\r\n\t *\r\n\t * This can either be in absolute pixel value, or relative [[Percent]].\r\n\t *\r\n\t * If set in Percent, it will be relative to `radius`. (outer radius)\r\n\t *\r\n\t * @param value Inner radius\r\n\t */\r\n\tpublic set innerRadius(value: number | Percent) {\r\n\t\tthis.setPercentProperty(\"innerRadius\", value, true, false, 10, false);\r\n\t}\r\n\r\n\t/**\r\n\t * @return Inner radius\r\n\t */\r\n\tpublic get innerRadius(): number | Percent {\r\n\t\treturn this.getPropertyValue(\"innerRadius\");\r\n\t}\r\n\r\n\t/**\r\n\t * Triggers (re)rendering of the horizontal (X) axis.\r\n\t *\r\n\t * @ignore Exclude from docs\r\n\t * @param axis Axis\r\n\t */\r\n\tpublic updateXAxis(renderer: AxisRenderer) {\r\n\t\t//do not call super!\r\n\t\tif (renderer) {\r\n\t\t\trenderer.processRenderer();\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Triggers (re)rendering of the vertical (Y) axis.\r\n\t *\r\n\t * @ignore Exclude from docs\r\n\t * @param axis Axis\r\n\t */\r\n\tpublic updateYAxis(renderer: AxisRenderer) {\r\n\t\t// do not call super!\r\n\t\tif (renderer) {\r\n\t\t\trenderer.processRenderer();\r\n\t\t}\r\n\t}\r\n\r\n}\r\n\r\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\r\nregistry.registeredClasses[\"RadarChart\"] = RadarChart;\r\n\n\n\n// WEBPACK FOOTER //\n// ../../../../../src/.internal/charts/types/RadarChart.ts","/**\r\n * Functionality for drawing simple ClockHands\r\n */\r\n\r\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\r\nimport { Container, IContainerProperties, IContainerAdapters, IContainerEvents } from \"../../core/Container\";\r\nimport { Circle } from \"../../core/elements/Circle\";\r\nimport { Trapezoid } from \"../../core/elements/Trapezoid\";\r\nimport { Axis } from \"../axes/Axis\";\r\nimport { AxisRendererCircular } from \"../axes/AxisRendererCircular\";\r\nimport { MutableValueDisposer, MultiDisposer } from \"../../core/utils/Disposer\";\r\nimport { percent, Percent } from \"../../core/utils/Percent\";\r\nimport { registry } from \"../../core/Registry\";\r\nimport { GaugeChart } from \"../types/GaugeChart\";\r\nimport { InterfaceColorSet } from \"../../core/utils/InterfaceColorSet\";\r\nimport * as $utils from \"../../core/utils/Utils\";\r\nimport * as $type from \"../../core/utils/Type\";\r\n\r\n\r\n/**\r\n * ============================================================================\r\n * REQUISITES\r\n * ============================================================================\r\n * @hidden\r\n */\r\n\r\n/**\r\n * Defines properties for [[ClockHand]].\r\n */\r\nexport interface IClockHandProperties extends IContainerProperties {\r\n\r\n\t/**\r\n\t * Radius of the hand's outer end. (tip)\r\n\t *\r\n\t * Absolute (px) or relative ([[Percent]]).\r\n\t *\r\n\t * @default Percent(100)\r\n\t */\r\n\tradius: number | Percent;\r\n\r\n\t/**\r\n\t * Radius of the hand's inner end. (base)\r\n\t *\r\n\t * Absolute (px) or relative ([[Percent]]).\r\n\t *\r\n\t * @default Percent(0)\r\n\t */\r\n\tinnerRadius: number | Percent;\r\n\r\n\t/**\r\n\t * Width, in pixels, of the clock hand's tip.\r\n\t *\r\n\t * @default 1\r\n\t */\r\n\tendWidth: number;\r\n\r\n\t/**\r\n\t * Width, in pixels, of the clock hand's base.\r\n\t *\r\n\t * @default 5\r\n\t */\r\n\tstartWidth: number;\r\n\r\n\t/**\r\n\t * rotation direction\r\n\t * @default \"any\"\r\n\t */\r\n\trotationDirection: \"any\" | \"clockWise\" | \"counterClockWise\";\r\n}\r\n\r\n/**\r\n * Defines events for [[ClockHand]].\r\n */\r\nexport interface IClockHandEvents extends IContainerEvents { }\r\n\r\n/**\r\n * Defines adapters for [[ClockHand]].\r\n *\r\n * @see {@link Adapter}\r\n */\r\nexport interface IClockHandAdapters extends IContainerAdapters, IClockHandProperties { }\r\n\r\n\r\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\r\n\r\n/**\r\n * ClockHand class is capable of drawing a simple pointy shape with optionally\r\n * rounderd corners and an icon.\r\n *\r\n * @see {@link IClockHandEvents} for a list of available events\r\n * @see {@link IClockHandAdapters} for a list of available Adapters\r\n * @todo Improve\r\n * @important\r\n */\r\nexport class ClockHand extends Container {\r\n\r\n\t/**\r\n\t * Defines available properties.\r\n\t */\r\n\tpublic _properties!: IClockHandProperties;\r\n\r\n\t/**\r\n\t * Defines available adapters.\r\n\t */\r\n\tpublic _adapter!: IClockHandAdapters;\r\n\r\n\t/**\r\n\t * Defines available events.\r\n\t */\r\n\tpublic _events!: IClockHandEvents;\r\n\r\n\t/**\r\n\t * A circle element used as hand's base.\r\n\t */\r\n\tprotected _pin: Circle;\r\n\r\n\t/**\r\n\t * A trapezoid shape used for hand itself.\r\n\t */\r\n\tprotected _hand: Trapezoid;\r\n\r\n\t/**\r\n\t * An Axis hand is related to.\r\n\t */\r\n\tprotected _axis: MutableValueDisposer = new MutableValueDisposer();\r\n\r\n\t/**\r\n\t * Hand's current value.\r\n\t */\r\n\tprotected _value: any;\r\n\r\n\r\n\t/**\r\n\t * Constructor\r\n\t */\r\n\tconstructor() {\r\n\r\n\t\t// Init\r\n\t\tsuper();\r\n\t\tthis.className = \"ClockHand\";\r\n\r\n\t\tlet interfaceColors = new InterfaceColorSet();\r\n\r\n\t\tthis.fill = interfaceColors.getFor(\"alternativeBackground\");\r\n\t\tthis.stroke = this.fill;\r\n\r\n\t\tlet pin: Circle = new Circle();\r\n\t\tpin.radius = 5;\r\n\t\tthis.pin = pin;\r\n\t\tthis.isMeasured = false;\r\n\r\n\t\tthis.startWidth = 5;\r\n\t\tthis.endWidth = 1;\r\n\r\n\t\tthis.width = percent(100);\r\n\t\tthis.height = percent(100);\r\n\r\n\t\tthis.radius = percent(100);\r\n\t\tthis.innerRadius = percent(0);\r\n\r\n\t\tlet hand: Trapezoid = new Trapezoid();\r\n\t\tthis.hand = hand;\r\n\r\n\t\tthis._disposers.push(this._axis);\r\n\r\n\t\t// Apply theme\r\n\t\tthis.applyTheme();\r\n\t}\r\n\r\n\t/**\r\n\t * Re(validates) the clock hand, effectively redrawing it.\r\n\t *\r\n\t * @ignore Exclude from docs\r\n\t */\r\n\tpublic validate() {\r\n\t\tsuper.validate();\r\n\t\tlet hand = this.hand;\r\n\t\thand.width = this.pixelWidth;\r\n\t\tlet h: number = Math.max(this.startWidth, this.endWidth);\r\n\t\thand.height = h;\r\n\t\thand.leftSide = percent(this.startWidth / h * 100);\r\n\t\thand.rightSide = percent(this.endWidth / h * 100);\r\n\r\n\t\tif (this.axis) {\r\n\t\t\tlet renderer: AxisRendererCircular = this.axis.renderer;\r\n\r\n\t\t\tlet x0: number = $utils.relativeRadiusToValue(this.innerRadius, renderer.pixelRadius);\r\n\t\t\tlet x1: number = $utils.relativeRadiusToValue(this.radius, renderer.pixelRadius);\r\n\r\n\t\t\thand.x = x0;\r\n\t\t\thand.y = - h / 2;\r\n\r\n\t\t\thand.width = x1 - x0;\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * A circle element used as hand's base. (pin)\r\n\t *\r\n\t * @param pin Pin element\r\n\t */\r\n\tpublic set pin(pin: Circle) {\r\n\t\tif (this._pin) {\r\n\t\t\tthis.removeDispose(this._pin);\r\n\t\t}\r\n\t\tif (pin) {\r\n\t\t\tthis._pin = pin;\r\n\t\t\tpin.parent = this;\r\n\t\t\tthis._disposers.push(pin);\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * @return Pin element\r\n\t */\r\n\tpublic get pin(): Circle {\r\n\t\treturn this._pin;\r\n\t}\r\n\r\n\t/**\r\n\t * A trapezoid shape used for hand itself.\r\n\t *\r\n\t * The shape of the trapezoid is controlled by ClockHand's `startWidth` and\r\n\t * `endWidth` properties.\r\n\t *\r\n\t * Set `endWidth` to 1 (px) to make it pointy.\r\n\t *\r\n\t * @param hand Hand element\r\n\t */\r\n\tpublic set hand(hand: Trapezoid) {\r\n\t\tif (this._hand) {\r\n\t\t\tthis.removeDispose(this._hand);\r\n\t\t}\r\n\t\tif (hand) {\r\n\t\t\tthis._hand = hand;\r\n\t\t\thand.parent = this;\r\n\t\t\tthis._disposers.push(hand);\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * @return Hand element\r\n\t */\r\n\tpublic get hand(): Trapezoid {\r\n\t\treturn this._hand;\r\n\t}\r\n\r\n\t/**\r\n\t * Radius of the hand's outer end. (tip)\r\n\t *\r\n\t * Absolute (px) or relative ([[Percent]]).\r\n\t *\r\n\t * @default Percent(0)\r\n\t * @param value Radius\r\n\t */\r\n\tpublic set radius(value: number | Percent) {\r\n\t\tthis.setPercentProperty(\"radius\", value, true, false, 10, false);\r\n\t}\r\n\r\n\t/**\r\n\t * @return Radius\r\n\t */\r\n\tpublic get radius(): number | Percent {\r\n\t\treturn this.getPropertyValue(\"radius\");\r\n\t}\r\n\r\n\t/**\r\n\t * Radius of the hand's inner end. (base)\r\n\t *\r\n\t * Absolute (px) or relative ([[Percent]]).\r\n\t *\r\n\t * @default Percent(0)\r\n\t * @param value Radius\r\n\t */\r\n\tpublic set innerRadius(value: number | Percent) {\r\n\t\tthis.setPercentProperty(\"innerRadius\", value, true, false, 10, false);\r\n\t}\r\n\r\n\t/**\r\n\t * @return Radius\r\n\t */\r\n\tpublic get innerRadius(): number | Percent {\r\n\t\treturn this.getPropertyValue(\"innerRadius\");\r\n\t}\r\n\r\n\t/**\r\n\t * Width, in pixels, of the clock hand's inner end. (base)\r\n\t *\r\n\t * @default 5\r\n\t * @param value Width (px)\r\n\t */\r\n\tpublic set startWidth(value: number) {\r\n\t\tthis.setPropertyValue(\"startWidth\", value, true);\r\n\t}\r\n\r\n\t/**\r\n\t * @return Width (px)\r\n\t */\r\n\tpublic get startWidth(): number {\r\n\t\treturn this.getPropertyValue(\"startWidth\");\r\n\t}\r\n\r\n\t/**\r\n\t * Width, in pixels, of the clock hand's outer end. (tip)\r\n\t *\r\n\t * @default 1\r\n\t * @param value Width (px)\r\n\t */\r\n\tpublic set endWidth(value: number) {\r\n\t\tthis.setPropertyValue(\"endWidth\", value, true);\r\n\t}\r\n\r\n\t/**\r\n\t * @return Width (px)\r\n\t */\r\n\tpublic get endWidth(): number {\r\n\t\treturn this.getPropertyValue(\"endWidth\");\r\n\t}\r\n\r\n\r\n\t/**\r\n\t * Rotation direction\r\n\t *\r\n\t * @default any\r\n\t * @param value\r\n\t */\r\n\tpublic set rotationDirection(value: \"any\" | \"clockWise\" | \"counterClockWise\") {\r\n\t\tthis.setPropertyValue(\"rotationDirection\", value);\r\n\t}\r\n\r\n\t/**\r\n\t * @return rotationDirection\r\n\t */\r\n\tpublic get rotationDirection(): \"any\" | \"clockWise\" | \"counterClockWise\" {\r\n\t\treturn this.getPropertyValue(\"rotationDirection\");\r\n\t}\r\n\r\n\t/**\r\n\t * Moves clock hand to particular value.\r\n\t *\r\n\t * If `duration` is set to a number in milliseconds, the hand will move\r\n\t * to the new position gracefully, rather than jumping rigth to it.\r\n\t *\r\n\t * Alternatively, you can also set `value` directly.\r\n\t *\r\n\t * @param value New value\r\n\t * @param duration Animation duration (ms)\r\n\t * @param easing Animation easing function\r\n\t */\r\n\tpublic showValue(value: any, duration?: number, easing?: (value: number) => number): void {\r\n\t\tthis._value = value;\r\n\t\tif (value != undefined) {\r\n\t\t\tif (!$type.isNumber(duration)) {\r\n\t\t\t\tduration = 0;\r\n\t\t\t}\r\n\r\n\t\t\tif (this.axis) {\r\n\t\t\t\tlet renderer = this.axis.renderer;\r\n\t\t\t\tlet newAngle = renderer.positionToAngle(this.axis.anyToPosition(value));\r\n\t\t\t\tlet currentAngle = this.rotation;\r\n\r\n\t\t\t\tif (this.rotationDirection == \"clockWise\") {\r\n\t\t\t\t\tif (newAngle < currentAngle) {\r\n\t\t\t\t\t\tthis.rotation = currentAngle - 360;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tif (this.rotationDirection == \"counterClockWise\") {\r\n\t\t\t\t\tif (newAngle > currentAngle) {\r\n\t\t\t\t\t\tthis.rotation = currentAngle + 360;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tthis.animate({ property: \"rotation\", to: newAngle }, duration, easing);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Returns hand's relative position on axis\r\n\t */\r\n\tpublic get currentPosition(): number {\r\n\t\tif (this.axis) {\r\n\t\t\tlet renderer = this.axis.renderer;\r\n\t\t\treturn renderer.angleToPosition(this.rotation);\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * A current value clock hand is pointing to.\r\n\t *\r\n\t * @param value Value\r\n\t */\r\n\tpublic set value(value: any) {\r\n\t\tthis.showValue(value);\r\n\t}\r\n\r\n\t/**\r\n\t * @return Value\r\n\t */\r\n\tpublic get value(): any {\r\n\t\treturn this._value;\r\n\t}\r\n\r\n\t/**\r\n\t * An Axis clock hand is associated with.\r\n\t *\r\n\t * Hand's `value` relates to values on the Axis.\r\n\t *\r\n\t * @param axis Axis\r\n\t */\r\n\tpublic set axis(axis: Axis) {\r\n\t\tif (this.axis != axis) {\r\n\t\t\tthis._axis.set(axis, new MultiDisposer([\r\n\t\t\t\taxis.events.on(\"datavalidated\", this.updateValue, this, false),\r\n\t\t\t\taxis.events.on(\"datarangechanged\", this.updateValue, this, false),\r\n\t\t\t\taxis.events.on(\"dataitemsvalidated\", this.updateValue, this, false),\r\n\t\t\t\taxis.events.on(\"propertychanged\", this.invalidate, this, false)\r\n\t\t\t]));\r\n\t\t}\r\n\t\tif (axis) {\r\n\t\t\tlet chart: GaugeChart = axis.chart;\r\n\t\t\tif (chart) {\r\n\t\t\t\tthis.rotation = chart.startAngle;\r\n\t\t\t}\r\n\t\t}\r\n\t\tthis.parent = axis.renderer;\r\n\t\tthis.zIndex = 5;\r\n\t}\r\n\r\n\t/**\r\n\t * @return Axis\r\n\t */\r\n\tpublic get axis(): Axis {\r\n\t\treturn this._axis.get();\r\n\t}\r\n\r\n\t/**\r\n\t * Triggers `value` accessor, so that Hand animates to new position, in case\r\n\t * value has changed.\r\n\t *\r\n\t * @ignore Exclude from docs\r\n\t */\r\n\tprotected updateValue() {\r\n\t\tthis.value = this.value;\r\n\t}\r\n\r\n\t/**\r\n * Processes JSON-based config before it is applied to the object.\r\n *\r\n * @ignore Exclude from docs\r\n * @param config Config\r\n */\r\n\tpublic processConfig(config?: { [index: string]: any }): void {\r\n\r\n\t\tif (config) {\r\n\r\n\t\t\t// Connect clock hands with axes\r\n\t\t\tif ($type.hasValue(config.axis) && $type.isString(config.axis) && this.map.hasKey(config.axis)) {\r\n\t\t\t\tconfig.axis = this.map.getKey(config.axis);\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t\tsuper.processConfig(config);\r\n\t}\r\n\r\n}\r\n\r\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\r\nregistry.registeredClasses[\"ClockHand\"] = ClockHand;\r\n\n\n\n// WEBPACK FOOTER //\n// ../../../../../src/.internal/charts/elements/ClockHand.ts","/**\r\n * Module for building Gauge charts.\r\n */\r\n\r\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\r\nimport { RadarChart, IRadarChartProperties, IRadarChartDataFields, IRadarChartAdapters, IRadarChartEvents, RadarChartDataItem } from \"./RadarChart\";\r\nimport { ListTemplate, IListEvents, ListDisposer } from \"../../core/utils/List\";\r\nimport { ClockHand } from \"../elements/ClockHand\";\r\nimport { Ordering } from \"../../core/utils/Order\";\r\nimport { registry } from \"../../core/Registry\";\r\nimport * as $type from \"../../core/utils/Type\";\r\n\r\n/**\r\n * ============================================================================\r\n * DATA ITEM\r\n * ============================================================================\r\n * @hidden\r\n */\r\n\r\n/**\r\n * Defines a [[DataItem]] for [[GaugeChart]].\r\n *\r\n * @see {@link DataItem}\r\n */\r\nexport class GaugeChartDataItem extends RadarChartDataItem {\r\n\r\n\t/**\r\n\t * Defines a type of [[Component]] this data item is used for.\r\n\t */\r\n\tpublic _component!: GaugeChart;\r\n\r\n\t/**\r\n\t * Constructor\r\n\t */\r\n\tconstructor() {\r\n\t\tsuper();\r\n\t\tthis.className = \"GaugeChartDataItem\";\r\n\t\tthis.applyTheme();\r\n\t}\r\n\r\n}\r\n\r\n\r\n/**\r\n * ============================================================================\r\n * REQUISITES\r\n * ============================================================================\r\n * @hidden\r\n */\r\n\r\n/**\r\n * Defines data fields for [[GaugeChart]].\r\n */\r\nexport interface IGaugeChartDataFields extends IRadarChartDataFields { }\r\n\r\n/**\r\n * Defines properties for [[GaugeChart]].\r\n */\r\nexport interface IGaugeChartProperties extends IRadarChartProperties { }\r\n\r\n/**\r\n * Defines events for [[GaugeChart]].\r\n */\r\nexport interface IGaugeChartEvents extends IRadarChartEvents { }\r\n\r\n/**\r\n * Defines adapters for [[GaugeChart]].\r\n *\r\n * @see {@link Adapter}\r\n */\r\nexport interface IGaugeChartAdapters extends IRadarChartAdapters, IGaugeChartProperties { }\r\n\r\n\r\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\r\n\r\n/**\r\n * Creates a Gauge chart.\r\n *\r\n * @see {@link IGaugeChartEvents} for a list of available Events\r\n * @see {@link IGaugeChartAdapters} for a list of available Adapters\r\n * @see {@link https://www.amcharts.com/docs/v4/chart-types/gauge-chart/} for documentation\r\n * @important\r\n */\r\nexport class GaugeChart extends RadarChart {\r\n\r\n\t/**\r\n\t * Defines available data fields.\r\n\t */\r\n\tpublic _dataFields: IGaugeChartDataFields;\r\n\r\n\t/**\r\n\t * Defines available properties.\r\n\t */\r\n\tpublic _properties!: IGaugeChartProperties;\r\n\r\n\t/**\r\n\t * Defines available adapters.\r\n\t */\r\n\tpublic _adapter!: IGaugeChartAdapters;\r\n\r\n\t/**\r\n\t * Defines available events.\r\n\t */\r\n\tpublic _events!: IGaugeChartEvents;\r\n\r\n\t/**\r\n\t * A list of [[ClockHand]] items displayed on this Gauge chart.\r\n\t */\r\n\tpublic hands: ListTemplate;\r\n\r\n\t/**\r\n\t * Constructor\r\n\t */\r\n\tconstructor() {\r\n\r\n\t\t// Init\r\n\t\tsuper();\r\n\t\tthis.className = \"GaugeChart\";\r\n\r\n\t\tthis.startAngle = 180;\r\n\t\tthis.endAngle = 360;\r\n\r\n\t\tthis.hands = new ListTemplate(new ClockHand());\r\n\t\tthis.hands.events.on(\"inserted\", this.processHand, this, false);\r\n\r\n\t\tthis._disposers.push(new ListDisposer(this.hands));\r\n\t\tthis._disposers.push(this.hands.template);\r\n\r\n\t\t// Apply theme\r\n\t\tthis.applyTheme();\r\n\t}\r\n\r\n\t/**\r\n\t * Sets defaults that instantiate some objects that rely on parent, so they\r\n\t * cannot be set in constructor.\r\n\t */\r\n\tprotected applyInternalDefaults(): void {\r\n\r\n\t\tsuper.applyInternalDefaults();\r\n\r\n\t\t// Add a default screen reader title for accessibility\r\n\t\t// This will be overridden in screen reader if there are any `titles` set\r\n\t\tif (!$type.hasValue(this.readerTitle)) {\r\n\t\t\tthis.readerTitle = this.language.translate(\"Gauge chart\");\r\n\t\t}\r\n\r\n\t}\r\n\r\n\t/**\r\n\t * Decorates a [[ClockHand]] when it is added to the chart.\r\n\t *\r\n\t * @param event Event\r\n\t */\r\n\tprotected processHand(event: IListEvents[\"inserted\"]): void {\r\n\t\tlet hand: ClockHand = event.newValue;\r\n\t\tif (!hand.axis) {\r\n\t\t\thand.axis = this.xAxes.getIndex(0);\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * This function is used to sort element's JSON config properties, so that\r\n\t * some properties that absolutely need to be processed last, can be put at\r\n\t * the end.\r\n\t *\r\n\t * @ignore Exclude from docs\r\n\t * @param a Element 1\r\n\t * @param b Element 2\r\n\t * @return Sorting number\r\n\t */\r\n\tprotected configOrder(a: string, b: string): Ordering {\r\n\t\tif (a == b) {\r\n\t\t\treturn 0;\r\n\t\t}\r\n\t\t// Must come last\r\n\t\telse if (a == \"hands\") {\r\n\t\t\treturn 1;\r\n\t\t}\r\n\t\telse if (b == \"hands\") {\r\n\t\t\treturn -1;\r\n\t\t}\r\n\t\telse {\r\n\t\t\treturn super.configOrder(a, b);\r\n\t\t}\r\n\t}\r\n\r\n}\r\n\r\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\r\nregistry.registeredClasses[\"GaugeChart\"] = GaugeChart;\r\n\n\n\n// WEBPACK FOOTER //\n// ../../../../../src/.internal/charts/types/GaugeChart.ts","/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\r\n\r\nimport { PieSeries, PieSeriesDataItem, IPieSeriesDataFields, IPieSeriesProperties, IPieSeriesAdapters, IPieSeriesEvents } from \"../series/PieSeries\";\r\nimport { PieChart3D } from \"../types/PieChart3D\";\r\nimport { Slice3D } from \"../../core/elements/3d/Slice3D\";\r\nimport { registry } from \"../../core/Registry\";\r\nimport * as $type from \"../../core/utils/Type\";\r\nimport { Bullet } from \"../elements/Bullet\";\r\n\r\n/**\r\n * ============================================================================\r\n * DATA ITEM\r\n * ============================================================================\r\n * @hidden\r\n */\r\n\r\n/**\r\n * Defines a [[DataItem]] for [[PieSeries3D]].\r\n *\r\n * @see {@link DataItem}\r\n */\r\nexport class PieSeries3DDataItem extends PieSeriesDataItem {\r\n\r\n\t/**\r\n\t * Defines type of the slice represented by this data item.\r\n\t */\r\n\tpublic _slice: Slice3D;\r\n\r\n\t/**\r\n\t * Defines a type of [[Component]] this data item is used for.\r\n\t */\r\n\tpublic _component!: PieSeries3D;\r\n\r\n\t/**\r\n\t * @todo Remove?\r\n\t * @deprecated\r\n\t */\r\n\tpublic component: PieSeries3D;\r\n\r\n\t/**\r\n\t * Constructor\r\n\t */\r\n\tconstructor() {\r\n\t\tsuper();\r\n\t\tthis.className = \"PieSeries3DDataItem\";\r\n\r\n\t\tthis.values.depthValue = {};\r\n\r\n\t\tthis.applyTheme();\r\n\t}\r\n\r\n\t/**\r\n\t * Slice depth (height).\r\n\t *\r\n\t * @param value Depth\r\n\t */\r\n\tpublic set depthValue(value: number) {\r\n\t\tthis.setValue(\"depthValue\", value);\r\n\t}\r\n\r\n\t/**\r\n\t * @return Depth\r\n\t */\r\n\tpublic get depthValue(): number {\r\n\t\treturn this.values[\"depthValue\"].value;\r\n\t}\r\n\r\n}\r\n\r\n\r\n/**\r\n * ============================================================================\r\n * REQUISITES\r\n * ============================================================================\r\n * @hidden\r\n */\r\n\r\n/**\r\n * Defines data fields for [[PieSeries3D]].\r\n */\r\nexport interface IPieSeries3DDataFields extends IPieSeriesDataFields {\r\n\r\n\t/**\r\n\t * Name of the field in data that holds 3D slice depth (height).\r\n\t */\r\n\tdepthValue?: string;\r\n\r\n}\r\n\r\n/**\r\n * Defines properties for [[PieSeries3D]].\r\n */\r\nexport interface IPieSeries3DProperties extends IPieSeriesProperties {\r\n\r\n\t/**\r\n\t * Depth (height) of the pie slice in pixels.\r\n\t */\r\n\tdepth?: number;\r\n\r\n\t/**\r\n\t * Angle of the view point of the 3D pie.\r\n\t */\r\n\tangle?: number;\r\n\r\n}\r\n\r\n/**\r\n * Defines events for [[PieSeries3D]].\r\n */\r\nexport interface IPieSeries3DEvents extends IPieSeriesEvents { }\r\n\r\n/**\r\n * Defines adapters for [[PieSeries3D]].\r\n *\r\n * @see {@link Adapter}\r\n */\r\nexport interface IPieSeries3DAdapters extends IPieSeriesAdapters, IPieSeries3DProperties { }\r\n\r\n\r\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\r\n\r\n/**\r\n * Defines [[Series]] for a slice series on a 3D pie chart.\r\n *\r\n * @see {@link IPieSeries3DEvents} for a list of available Events\r\n * @see {@link IPieSeries3DAdapters} for a list of available Adapters\r\n * @todo Example\r\n * @important\r\n */\r\nexport class PieSeries3D extends PieSeries {\r\n\r\n\t/**\r\n\t * Defines the type of data fields used for the series.\r\n\t */\r\n\tpublic _dataFields: IPieSeries3DDataFields;\r\n\r\n\t/**\r\n\t * Defines available properties.\r\n\t */\r\n\tpublic _properties!: IPieSeries3DProperties;\r\n\r\n\t/**\r\n\t * Defines available adapters.\r\n\t */\r\n\tpublic _adapter!: IPieSeries3DAdapters;\r\n\r\n\t/**\r\n\t * Defines available events.\r\n\t */\r\n\tpublic _events!: IPieSeries3DEvents;\r\n\r\n\t/**\r\n\t * Defines the type of data item.\r\n\t */\r\n\tpublic _dataItem: PieSeries3DDataItem;\r\n\r\n\t/**\r\n\t * A chart series belongs to.\r\n\t */\r\n\tpublic _chart: PieChart3D;\r\n\r\n\tpublic _slice: Slice3D;\r\n\r\n\t/**\r\n\t * Constructor\r\n\t */\r\n\tconstructor() {\r\n\t\tsuper();\r\n\t\tthis.className = \"PieSeries3D\";\r\n\t\tthis.applyTheme();\r\n\t}\r\n\r\n\t/**\r\n\t * Returns a new/empty DataItem of the type appropriate for this object\r\n\t * @see {@link DataItem}\r\n\t * @return Data Item\r\n\t */\r\n\tprotected createDataItem(): this[\"_dataItem\"] {\r\n\t\treturn new PieSeries3DDataItem();\r\n\t}\r\n\r\n\t/**\r\n\t * creates slice\r\n\t */\r\n\tprotected createSlice(): this[\"_slice\"] {\r\n\t\treturn new Slice3D();\r\n\t}\r\n\r\n\t/**\r\n\t * Validates data item's element, effectively redrawing it.\r\n\t *\r\n\t * @ignore Exclude from docs\r\n\t * @param dataItem Data item\r\n\t */\r\n\tpublic validateDataElement(dataItem: PieSeries3DDataItem): void {\r\n\r\n\t\tlet slice: Slice3D = dataItem.slice;\r\n\r\n\t\tlet depth: number = this.depth;\r\n\t\tif (!$type.isNumber(depth)) {\r\n\t\t\tdepth = this.chart.depth;\r\n\t\t}\r\n\r\n\t\tlet depthPercent: number = dataItem.values.depthValue.percent;\r\n\t\tif (!$type.isNumber(depthPercent)) {\r\n\t\t\tdepthPercent = 100;\r\n\t\t}\r\n\r\n\t\tslice.depth = depthPercent * depth / 100;\r\n\r\n\t\tlet angle: number = this.angle;\r\n\t\tif (!$type.isNumber(angle)) {\r\n\t\t\tangle = this.chart.angle;\r\n\t\t}\r\n\r\n\t\tslice.angle = angle;\r\n\r\n\t\tsuper.validateDataElement(dataItem);\r\n\t}\r\n\r\n\t/**\r\n\t * (Re)validates the whole series, effectively causing it to redraw.\r\n\t *\r\n\t * @ignore Exclude from docs\r\n\t */\r\n\tpublic validate(): void {\r\n\t\tsuper.validate();\r\n\r\n\t\tfor (let i = this._workingStartIndex; i < this._workingEndIndex; i++) {\r\n\t\t\tlet dataItem = this.dataItems.getIndex(i);\r\n\t\t\tlet slice: Slice3D = dataItem.slice;\r\n\r\n\t\t\tconst startAngle = slice.startAngle;\r\n\t\t\t// find quarter\r\n\t\t\t//q0 || q1\r\n\t\t\tif ((startAngle >= -90 && startAngle < 90)) {\r\n\t\t\t\tslice.toFront();\r\n\t\t\t}\r\n\t\t\t//q2 || q3\r\n\t\t\telse if ((startAngle >= 90)) {\r\n\t\t\t\tslice.toBack();\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Depth (height) of the pie slice in pixels.\r\n\t *\r\n\t * @param value Depth (px)\r\n\t */\r\n\tpublic set depth(value: number) {\r\n\t\tthis.setPropertyValue(\"depth\", value, true);\r\n\t}\r\n\r\n\t/**\r\n\t * @return Depth (px)\r\n\t */\r\n\tpublic get depth(): number {\r\n\t\treturn this.getPropertyValue(\"depth\");\r\n\t}\r\n\r\n\t/**\r\n\t * Angle of the view point of the 3D pie. (0-360)\r\n\t *\r\n\t * @param value Angle\r\n\t */\r\n\tpublic set angle(value: number) {\r\n\t\tthis.setPropertyValue(\"angle\", value);\r\n\t}\r\n\r\n\t/**\r\n\t * @return Angle\r\n\t */\r\n\tpublic get angle(): number {\r\n\t\treturn this.getPropertyValue(\"angle\");\r\n\t}\r\n\r\n\t/**\r\n\t * Positions series bullet.\r\n\t *\r\n\t * @ignore Exclude from docs\r\n\t * @param bullet Bullet\r\n\t */\r\n\tpublic positionBullet(bullet: Bullet): void {\r\n\t\tsuper.positionBullet(bullet);\r\n\r\n\t\tlet dataItem: this[\"_dataItem\"] = bullet.dataItem;\r\n\t\tlet slice = dataItem.slice;\r\n\r\n\t\tbullet.y = bullet.pixelY - slice.depth;\r\n\t}\r\n}\r\n\r\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\r\nregistry.registeredClasses[\"PieSeries3D\"] = PieSeries3D;\r\nregistry.registeredClasses[\"PieSeries3DDataItem\"] = PieSeries3DDataItem;\r\n\n\n\n// WEBPACK FOOTER //\n// ../../../../../src/.internal/charts/series/PieSeries3D.ts","/**\r\n * 3D Pie chart module.\r\n */\r\n\r\n/**\r\n * ============================================================================\r\n * Imports\r\n * ============================================================================\r\n * @hidden\r\n */\r\n\r\nimport { PieChart, IPieChartProperties, IPieChartDataFields, IPieChartAdapters, IPieChartEvents, PieChartDataItem } from \"./PieChart\";\r\nimport { PieSeries3D } from \"../series/PieSeries3D\";\r\nimport { registry } from \"../../core/Registry\";\r\nimport * as $math from \"../../core/utils/Math\";\r\n\r\n\r\n/**\r\n * ============================================================================\r\n * DATA ITEM\r\n * ============================================================================\r\n * @hidden\r\n */\r\n\r\n/**\r\n * Defines a [[DataItem]] for [[PieChart3D]].\r\n *\r\n * @see {@link DataItem}\r\n */\r\nexport class PieChart3DDataItem extends PieChartDataItem {\r\n\r\n\t/**\r\n\t * Defines a type of [[Component]] this data item is used for.\r\n\t */\r\n\tpublic _component!: PieChart3D;\r\n\r\n\t/**\r\n\t * Constructor\r\n\t */\r\n\tconstructor() {\r\n\t\tsuper();\r\n\t\tthis.className = \"PieChart3DDataItem\";\r\n\t\tthis.applyTheme();\r\n\t}\r\n\r\n}\r\n\r\n\r\n/**\r\n * ============================================================================\r\n * REQUISITES\r\n * ============================================================================\r\n * @hidden\r\n */\r\n\r\n/**\r\n * Defines data fields for [[PieChart3D]].\r\n */\r\nexport interface IPieChart3DDataFields extends IPieChartDataFields { }\r\n\r\n/**\r\n * Defines properties for [[PieChart3D]].\r\n */\r\nexport interface IPieChart3DProperties extends IPieChartProperties {\r\n\r\n\t/**\r\n\t * Pie's \"depth\" or \"height\" in pixels.\r\n\t */\r\n\tdepth?: number;\r\n\r\n\t/**\r\n\t * Pie's angle at which we are looking at it. (degrees)\r\n\t */\r\n\tangle?: number;\r\n\r\n}\r\n\r\n/**\r\n * Defines events for [[PieChart3D]].\r\n */\r\nexport interface IPieChart3DEvents extends IPieChartEvents { }\r\n\r\n/**\r\n * Defines adapters for [[PieChart3D]].\r\n *\r\n * @see {@link Adapter}\r\n */\r\nexport interface IPieChart3DAdapters extends IPieChartAdapters, IPieChart3DProperties { }\r\n\r\n\r\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\r\n\r\n/**\r\n * Creates a 3D Pie chart.\r\n *\r\n * * ```TypeScript\r\n * // Includes\r\n * import * as am4core from \"@amcharts/amcharts4/core\";\r\n * import * as am4charts from \"@amcharts/amcharts4/charts\";\r\n *\r\n * // Create chart\r\n * let chart = am4core.create(\"chartdiv\", am4charts.Pie3DChart);\r\n *\r\n * // Set data\r\n * chart.data = [{\r\n * \t\"country\": \"Lithuania\",\r\n * \t\"litres\": 501.9\r\n * }, {\r\n * \t\"country\": \"Czechia\",\r\n * \t\"litres\": 301.9\r\n * }, {\r\n * \t\"country\": \"Ireland\",\r\n * \t\"litres\": 201.1\r\n * }];\r\n *\r\n * // Create series\r\n * let series = chart.series.push(new am4charts.Pie3DSeries());\r\n * series.dataFields.value = \"litres\";\r\n * series.dataFields.category = \"country\";\r\n * ```\r\n * ```JavaScript\r\n * // Create chart\r\n * var chart = am4core.create(\"chartdiv\", am4charts.Pie3DChart);\r\n *\r\n * // The following would work as well:\r\n * // var chart = am4core.create(\"chartdiv\", \"Pie3DChart\");\r\n *\r\n * // Set data\r\n * chart.data = [{\r\n * \t\"country\": \"Lithuania\",\r\n * \t\"litres\": 501.9\r\n * }, {\r\n * \t\"country\": \"Czechia\",\r\n * \t\"litres\": 301.9\r\n * }, {\r\n * \t\"country\": \"Ireland\",\r\n * \t\"litres\": 201.1\r\n * }];\r\n *\r\n * // Create series\r\n * var series = chart.series.push(new am4charts.Pie3DSeries());\r\n * series.dataFields.value = \"litres\";\r\n * series.dataFields.category = \"country\";\r\n * ```\r\n * ```JSON\r\n * var chart = am4core.createFromConfig({\r\n *\r\n * \t// Series\r\n * \t\"series\": [{\r\n * \t\t\"type\": \"Pie3DSeries\",\r\n * \t\t\"dataFields\": {\r\n * \t\t\t\"value\": \"litres\",\r\n * \t\t\t\"category\": \"country\"\r\n * \t\t}\r\n * \t}],\r\n *\r\n * \t// Data\r\n * \t\"data\": [{\r\n * \t\t\"country\": \"Lithuania\",\r\n * \t\t\"litres\": 501.9\r\n * \t}, {\r\n * \t\t\"country\": \"Czechia\",\r\n * \t\t\"litres\": 301.9\r\n * \t}, {\r\n * \t\t\"country\": \"Ireland\",\r\n * \t\t\"litres\": 201.1\r\n * \t}]\r\n *\r\n * }, \"chartdiv\", \"Pie3DChart\");\r\n * ```\r\n *\r\n * @see {@link IPieChart3DEvents} for a list of available Events\r\n * @see {@link IPieChart3DAdapters} for a list of available Adapters\r\n * @see {@link https://www.amcharts.com/docs/v4/chart-types/pie-chart/} for documentation\r\n * @important\r\n */\r\nexport class PieChart3D extends PieChart {\r\n\r\n\t/**\r\n\t * Available data fields.\r\n\t */\r\n\tpublic _dataFields: IPieChart3DDataFields;\r\n\r\n\t/**\r\n\t * Defines available properties.\r\n\t */\r\n\tpublic _properties!: IPieChart3DProperties;\r\n\r\n\t/**\r\n\t * Defines available adapters.\r\n\t */\r\n\tpublic _adapter!: IPieChart3DAdapters;\r\n\r\n\t/**\r\n\t * Defines available events.\r\n\t */\r\n\tpublic _events!: IPieChart3DEvents;\r\n\r\n\t/**\r\n\t * Defines a type of series that this chart uses.\r\n\t */\r\n\tpublic _seriesType: PieSeries3D;\r\n\r\n\t/**\r\n\t * Constructor\r\n\t */\r\n\tconstructor() {\r\n\r\n\t\t// Init\r\n\t\tsuper();\r\n\t\tthis.className = \"PieChart3D\";\r\n\r\n\t\tthis.depth = 20;\r\n\t\tthis.angle = 10;\r\n\r\n\t\t// Apply theme\r\n\t\tthis.applyTheme();\r\n\r\n\t}\r\n\r\n\t/**\r\n\t * Depth of the 3D pie in pixels.\r\n\t *\r\n\t * This will determine \"height\" of the pie.\r\n\t *\r\n\t * @default 20\r\n\t * @param value Depth (px)\r\n\t */\r\n\tpublic set depth(value: number) {\r\n\t\tif (this.setPropertyValue(\"depth\", value)) {\r\n\t\t\tthis.invalidateDataUsers();\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * @return Depth (px)\r\n\t */\r\n\tpublic get depth(): number {\r\n\t\treturn this.getPropertyValue(\"depth\");\r\n\t}\r\n\r\n\t/**\r\n\t * An angle of a \"point of view\" in degrees. Possible range 0 - 90.\r\n\t *\r\n\t * @default 10\r\n\t * @param value Angle (degrees)\r\n\t */\r\n\tpublic set angle(value: number) {\r\n\t\tvalue = $math.fitToRange(value, 0, 90);\r\n\t\tif (this.setPropertyValue(\"angle\", value)) {\r\n\t\t\tthis.invalidateDataUsers();\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * @return Angle (degrees)\r\n\t */\r\n\tpublic get angle(): number {\r\n\t\treturn this.getPropertyValue(\"angle\");\r\n\t}\r\n\r\n\t/**\r\n\t * Creates and returns a new Series.\r\n\t *\r\n\t * @return New series\r\n\t */\r\n\tprotected createSeries(): this[\"_seriesType\"] {\r\n\t\treturn new PieSeries3D();\r\n\t}\r\n\r\n}\r\n\r\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\r\nregistry.registeredClasses[\"PieChart3D\"] = PieChart3D;\r\n\n\n\n// WEBPACK FOOTER //\n// ../../../../../src/.internal/charts/types/PieChart3D.ts","/**\r\n * Sliced chart module.\r\n */\r\n\r\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\r\nimport { PercentChart, IPercentChartProperties, IPercentChartDataFields, IPercentChartAdapters, IPercentChartEvents, PercentChartDataItem } from \"./PercentChart\";\r\nimport { FunnelSeries } from \"../series/FunnelSeries\";\r\nimport { registry } from \"../../core/Registry\";\r\nimport * as $type from \"../../core/utils/Type\";\r\n\r\n/**\r\n * ============================================================================\r\n * DATA ITEM\r\n * ============================================================================\r\n * @hidden\r\n */\r\n\r\n/**\r\n * Defines a [[DataItem]] for [[SlicedChart]].\r\n *\r\n * @see {@link DataItem}\r\n */\r\nexport class SlicedChartDataItem extends PercentChartDataItem {\r\n\r\n\t/**\r\n\t * Defines a type of [[Component]] this data item is used for.\r\n\t */\r\n\tpublic _component!: SlicedChart;\r\n\r\n\t/**\r\n\t * Constructor\r\n\t */\r\n\tconstructor() {\r\n\t\tsuper();\r\n\t\tthis.className = \"SlicedChartDataItem\";\r\n\t\tthis.applyTheme();\r\n\t}\r\n\r\n}\r\n\r\n\r\n/**\r\n * ============================================================================\r\n * REQUISITES\r\n * ============================================================================\r\n * @hidden\r\n */\r\n\r\n/**\r\n * Defines data fields for [[SlicedChart]].\r\n */\r\nexport interface ISlicedChartDataFields extends IPercentChartDataFields { }\r\n\r\n/**\r\n * Defines properties for [[SlicedChart]]\r\n */\r\nexport interface ISlicedChartProperties extends IPercentChartProperties { }\r\n\r\n/**\r\n * Defines events for [[SlicedChart]].\r\n */\r\nexport interface ISlicedChartEvents extends IPercentChartEvents { }\r\n\r\n/**\r\n * Defines adapters for [[SlicedChart]].\r\n *\r\n * @see {@link Adapter}\r\n */\r\nexport interface ISlicedChartAdapters extends IPercentChartAdapters, ISlicedChartProperties { }\r\n\r\n\r\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\r\n\r\n/**\r\n * Creates a Sliced chart.\r\n *\r\n * @see {@link ISlicedChartEvents} for a list of available Events\r\n * @see {@link ISlicedChartAdapters} for a list of available Adapters\r\n * @see {@link https://www.amcharts.com/docs/v4/chart-types/sliced-chart/} for documentation\r\n * @important\r\n */\r\nexport class SlicedChart extends PercentChart {\r\n\r\n\t/**\r\n\t * Defines available data fields.\r\n\t */\r\n\tpublic _dataFields: ISlicedChartDataFields;\r\n\r\n\t/**\r\n\t * Defines available properties.\r\n\t */\r\n\tpublic _properties!: ISlicedChartProperties;\r\n\r\n\t/**\r\n\t * Defines available adapters.\r\n\t */\r\n\tpublic _adapter!: ISlicedChartAdapters;\r\n\r\n\t/**\r\n\t * Defines available events.\r\n\t */\r\n\tpublic _events!: ISlicedChartEvents;\r\n\r\n\t/**\r\n\t * Defines a type of series that this chart uses.\r\n\t */\r\n\tpublic _seriesType: FunnelSeries;\r\n\r\n\t/**\r\n\t * Constructor\r\n\t */\r\n\tconstructor() {\r\n\r\n\t\t// Init\r\n\t\tsuper();\r\n\t\tthis.className = \"SlicedChart\";\r\n\r\n\t\tthis.seriesContainer.layout = \"horizontal\";\r\n\r\n\t\tthis.padding(15, 15, 15, 15);\r\n\r\n\t\t// Apply theme\r\n\t\tthis.applyTheme();\r\n\t}\r\n\r\n\t/**\r\n\t * Sets defaults that instantiate some objects that rely on parent, so they\r\n\t * cannot be set in constructor.\r\n\t */\r\n\tprotected applyInternalDefaults(): void {\r\n\r\n\t\tsuper.applyInternalDefaults();\r\n\r\n\t\t// Add a default screen reader title for accessibility\r\n\t\t// This will be overridden in screen reader if there are any `titles` set\r\n\t\tif (!$type.hasValue(this.readerTitle)) {\r\n\t\t\tthis.readerTitle = this.language.translate(\"Sliced chart\");\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * (Re)validates the chart, causing it to redraw.\r\n\t *\r\n\t * @ignore Exclude from docs\r\n\t */\r\n\tpublic validate(): void {\r\n\t\tsuper.validate();\r\n\t}\r\n}\r\n\r\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\r\nregistry.registeredClasses[\"SlicedChart\"] = SlicedChart;\r\nregistry.registeredClasses[\"SlicedChartDataItem\"] = SlicedChartDataItem;\r\n\n\n\n// WEBPACK FOOTER //\n// ../../../../../src/.internal/charts/types/SlicedChart.ts","/**\r\n * FlowDiagramNode module\r\n */\r\n\r\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\r\nimport { Container, IContainerProperties, IContainerAdapters, IContainerEvents } from \"../../core/Container\";\r\nimport { Sprite, AMEvent, visualProperties, ISpriteEvents } from \"../../core/Sprite\";\r\nimport { FlowDiagram, FlowDiagramDataItem } from \"../types/FlowDiagram\";\r\nimport { List } from \"../../core/utils/List\";\r\nimport { registry } from \"../../core/Registry\";\r\nimport { Color } from \"../../core/utils/Color\";\r\nimport { InterfaceColorSet } from \"../../core/utils/InterfaceColorSet\";\r\nimport * as $iter from \"../../core/utils/Iterator\";\r\nimport * as $string from \"../../core/utils/String\";\r\nimport * as $order from \"../../core/utils/Order\";\r\nimport * as $number from \"../../core/utils/Number\";\r\nimport { RoundedRectangle } from \"../../core/elements/RoundedRectangle\";\r\nimport * as $object from \"../../core/utils/Object\";\r\nimport { LegendSettings, LegendDataItem } from \"../Legend\";\r\nimport { Animation } from \"../../core/utils/Animation\";\r\n\r\n\r\n/**\r\n * ============================================================================\r\n * REQUISITES\r\n * ============================================================================\r\n * @hidden\r\n */\r\n\r\n/**\r\n * Defines properties for [[FlowDiagramNode]].\r\n */\r\nexport interface IFlowDiagramNodeProperties extends IContainerProperties {\r\n\r\n\t/**\r\n\t * Name of the node.\r\n\t */\r\n\tname?: string;\r\n\r\n\t/**\r\n\t * Sum of all incomming+outgoing link values\r\n\t */\r\n\ttotal?: number;\r\n\r\n\t/**\r\n\t * Sum of all incoming link values\r\n\t */\r\n\ttotalIncoming?: number;\r\n\r\n\t/**\r\n\t * Sum of all outgoing link values\r\n\t */\r\n\ttotalOutgoing?: number;\r\n\r\n\t/**\r\n\t * Node's color.\r\n\t */\r\n\tcolor?: Color;\r\n\r\n}\r\n\r\n/**\r\n * Defines events for [[FlowDiagramNode]].\r\n */\r\nexport interface IFlowDiagramNodeEvents extends IContainerEvents { }\r\n\r\n/**\r\n * Defines adapters for [[FlowDiagramNode]].\r\n *\r\n * @see {@link Adapter}\r\n */\r\nexport interface IFlowDiagramNodeAdapters extends IContainerAdapters, IFlowDiagramNodeProperties { }\r\n\r\n\r\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\r\n\r\n/**\r\n * Creates a node in a Flow Diagram.\r\n *\r\n * A Flow node is a block with a value, which represents its size on the\r\n * diagram.\r\n *\r\n * Nodes are connected via [[FlowLink]] elements.\r\n *\r\n * @see {@link IFlowDiagramNodeEvents} for a list of available events\r\n * @see {@link IFlowDiagramNodeAdapters} for a list of available Adapters\r\n * @important\r\n */\r\nexport class FlowDiagramNode extends Container {\r\n\r\n\t/**\r\n\t * total ajusted taken in mind chart.minNodeSize\r\n\t */\r\n\tpublic adjustedTotal: number;\r\n\r\n\t/**\r\n\t * Defines available properties.\r\n\t */\r\n\tpublic _properties!: IFlowDiagramNodeProperties;\r\n\r\n\t/**\r\n\t * Defines available adapters.\r\n\t */\r\n\tpublic _adapter!: IFlowDiagramNodeAdapters;\r\n\r\n\t/**\r\n\t * Defines available events.\r\n\t */\r\n\tpublic _events!: IFlowDiagramNodeEvents;\r\n\r\n\t/**\r\n\t * A list of data items of the items coming in from another node, one level\r\n\t * up.\r\n\t *\r\n\t * These are what ingoing links are build out of.\r\n\t */\r\n\tprotected _incomingDataItems: List;\r\n\r\n\t/**\r\n\t * A list of data items of the items going out of the node.\r\n\t *\r\n\t * These are what outgoing links are build out of.\r\n\t */\r\n\tprotected _outgoingDataItems: List;\r\n\r\n\t/**\r\n\t * Sorted list of incoming items.\r\n\t */\r\n\tprotected _incomingSorted: $iter.Iterator;\r\n\r\n\t/**\r\n\t * Sorted list of outgoing items.\r\n\t */\r\n\tprotected _outgoingSorted: $iter.Iterator;\r\n\r\n\t/**\r\n\t * A chart instance this node is added to.\r\n\t */\r\n\tpublic chart: FlowDiagram;\r\n\r\n\r\n\t/**\r\n\t * Defines the type of the [[FlowDiagramDataItem]] used in the class.\r\n\t */\r\n\tpublic _dataItem: FlowDiagramDataItem;\r\n\r\n\t/**\r\n\t * Settings for the appearance of the related legend items.\r\n\t */\r\n\tpublic legendSettings: LegendSettings = new LegendSettings();\r\n\r\n\r\n\t/**\r\n\t * A reference to the legend data item related to this node.\r\n\t */\r\n\tprotected _legendDataItem: LegendDataItem;\r\n\r\n\t/**\r\n\t * Constructor\r\n\t */\r\n\tconstructor() {\r\n\t\tsuper();\r\n\t\tthis.className = \"FlowDiagramNode\";\r\n\r\n\t\tthis.isMeasured = false;\r\n\r\n\t\t// TODO can this be removed ?\r\n\t\tnew InterfaceColorSet();\r\n\r\n\t\tthis.draggable = true;\r\n\t\tthis.inert = true;\r\n\r\n\t\tthis.setStateOnChildren = true;\r\n\r\n\t\tthis.events.on(\"positionchanged\", this.invalidateLinks, this, false);\r\n\t\tthis.events.on(\"sizechanged\", this.invalidateLinks, this, false);\r\n\t\t//this.events.on(\"hit\", this.handleHit, this, false);\r\n\t}\r\n\r\n\t/**\r\n\t * @ignore\r\n\t */\r\n\tpublic handleHit(event: AMEvent[\"hit\"]) {\r\n\t\tif (this.isHidden || this.isHiding) {\r\n\t\t\tthis.show();\r\n\t\t}\r\n\t\telse {\r\n\t\t\tthis.hide();\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Shows hidden node.\r\n\t *\r\n\t * @param duration Duration of reveal animation (ms)\r\n\t * @return Animation\r\n\t */\r\n\tpublic show(duration?: number): Animation {\r\n\t\tlet animation = super.show(duration);\r\n\r\n\t\tthis.outgoingDataItems.each(function(dataItem) {\r\n\t\t\tif (!dataItem.toNode || (dataItem.toNode && !dataItem.toNode.isHidden)) {\r\n\t\t\t\tdataItem.setWorkingValue(\"value\", dataItem.getValue(\"value\"), duration);\r\n\t\t\t\tdataItem.link.show();\r\n\t\t\t}\r\n\t\t})\r\n\r\n\t\tthis.incomingDataItems.each(function(dataItem) {\r\n\t\t\tif (!dataItem.fromNode || (dataItem.fromNode && !dataItem.fromNode.isHidden)) {\r\n\t\t\t\tdataItem.setWorkingValue(\"value\", dataItem.getValue(\"value\"), duration);\r\n\t\t\t\tdataItem.link.show();\r\n\t\t\t}\r\n\t\t})\r\n\r\n\t\treturn animation;\r\n\t}\r\n\r\n\t/**\r\n\t * Hides node.\r\n\t *\r\n\t * @param duration Duration of hiding animation (ms)\r\n\t * @return Animation\r\n\t */\r\n\tpublic hide(duration?: number): Animation {\r\n\t\tlet animation = super.hide(duration);\r\n\r\n\t\tthis.outgoingDataItems.each(function(dataItem) {\r\n\t\t\tdataItem.setWorkingValue(\"value\", 0, duration);\r\n\t\t\tdataItem.link.hide();\r\n\t\t})\r\n\r\n\t\tthis.incomingDataItems.each(function(dataItem) {\r\n\t\t\tdataItem.setWorkingValue(\"value\", 0, duration);\r\n\t\t\tdataItem.link.hide();\r\n\t\t})\r\n\r\n\t\treturn animation;\r\n\t}\r\n\r\n\r\n\t/**\r\n\t * Marks node as invalid, for redrawal in the next update cycle.\r\n\t *\r\n\t * @ignore Exclude from docs\r\n\t */\r\n\tpublic validate(): void {\r\n\t\tif(!this.isDisposed()){\r\n\t\t\tsuper.validate();\r\n\t\t\tthis.invalidateLinks();\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Invalidates all links, attached to this node.\r\n\t *\r\n\t * @ignore Exclude from docs\r\n\t */\r\n\tpublic invalidateLinks(): void {\r\n\r\n\t\tthis.outgoingDataItems.each((dataItem) => {\r\n\t\t\tlet link = dataItem.link;\r\n\t\t\tif (link.colorMode == \"fromNode\") {\r\n\t\t\t\tlink.fill = link.dataItem.fromNode.color;\r\n\t\t\t}\r\n\r\n\t\t\tif (link.colorMode == \"gradient\") {\r\n\r\n\t\t\t\tlink.fill = link.gradient;\r\n\t\t\t\tlink.stroke = link.gradient;\r\n\r\n\t\t\t\tlet stop = link.gradient.stops.getIndex(0);\r\n\r\n\t\t\t\tif (stop) {\r\n\t\t\t\t\tstop.color = this.color;\r\n\t\t\t\t\tlink.gradient.validate();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tthis.incomingDataItems.each((dataItem) => {\r\n\t\t\tlet link = dataItem.link;\r\n\t\t\tif (link.colorMode == \"toNode\") {\r\n\t\t\t\tlink.fill = link.dataItem.toNode.color;\r\n\t\t\t}\r\n\r\n\t\t\tif (link.colorMode == \"gradient\") {\r\n\t\t\t\tlink.fill = link.gradient;\r\n\t\t\t\tlink.stroke = link.gradient;\r\n\r\n\t\t\t\tlet stop = link.gradient.stops.getIndex(1);\r\n\r\n\t\t\t\tif (stop) {\r\n\t\t\t\t\tstop.color = this.color;\r\n\t\t\t\t\tlink.gradient.validate();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t}\r\n\r\n\t/**\r\n\t * List of incoming items (links).\r\n\t *\r\n\t * @readonly\r\n\t * @return Incoming items\r\n\t */\r\n\tpublic get incomingDataItems(): List {\r\n\t\tif (!this._incomingDataItems) {\r\n\t\t\tlet incomingDataItems = new List();\r\n\t\t\tincomingDataItems.events.on(\"inserted\", () => {\r\n\t\t\t\tif (this.chart.sortBy == \"name\") {\r\n\t\t\t\t\tthis._incomingSorted = $iter.sort(this._incomingDataItems.iterator(), (x, y) => $string.order(x.fromName, y.fromName));\r\n\t\t\t\t}\r\n\t\t\t\telse if (this.chart.sortBy == \"value\") {\r\n\t\t\t\t\tthis._incomingSorted = $iter.sort(this._incomingDataItems.iterator(), (x, y) => $order.reverse($number.order(x.value, y.value)));\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tthis._incomingSorted = this._incomingDataItems.iterator();\r\n\t\t\t\t}\r\n\t\t\t}, undefined, false);\r\n\t\t\tthis._incomingDataItems = incomingDataItems;\r\n\t\t}\r\n\t\treturn this._incomingDataItems;\r\n\t}\r\n\r\n\t/**\r\n\t * List of outgoing items (links).\r\n\t *\r\n\t * @readonly\r\n\t * @return Outgoing items\r\n\t */\r\n\tpublic get outgoingDataItems(): List {\r\n\t\tif (!this._outgoingDataItems) {\r\n\t\t\tlet outgoingDataItems = new List();\r\n\t\t\toutgoingDataItems.events.on(\"inserted\", () => {\r\n\t\t\t\tif (this.chart.sortBy == \"name\") {\r\n\t\t\t\t\tthis._outgoingSorted = $iter.sort(this._outgoingDataItems.iterator(), (x, y) => $string.order(x.fromName, y.fromName));\r\n\t\t\t\t}\r\n\t\t\t\telse if (this.chart.sortBy == \"value\") {\r\n\t\t\t\t\tthis._outgoingSorted = $iter.sort(this._outgoingDataItems.iterator(), (x, y) => $order.reverse($number.order(x.value, y.value)));\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tthis._outgoingSorted = this._outgoingDataItems.iterator();\r\n\t\t\t\t}\r\n\r\n\t\t\t}, undefined, false);\r\n\t\t\tthis._outgoingDataItems = outgoingDataItems;\r\n\t\t}\r\n\t\treturn this._outgoingDataItems;\r\n\t}\r\n\r\n\t/**\r\n\t * A name of the node.\r\n\t *\r\n\t * @param value Name\r\n\t */\r\n\tpublic set name(value: string) {\r\n\t\tthis.setPropertyValue(\"name\", value, true);\r\n\t}\r\n\r\n\t/**\r\n\t * @return Name\r\n\t */\r\n\tpublic get name(): string {\r\n\t\treturn this.getPropertyValue(\"name\");\r\n\t}\r\n\r\n\t/**\r\n\t * Sum of all incoming+outgoing link values\r\n\t *\r\n\t * @param value Value\r\n\t */\r\n\tpublic set total(value: number) {\r\n\t\tthis.setPropertyValue(\"total\", value, true);\r\n\t}\r\n\r\n\t/**\r\n\t * @return Value\r\n\t */\r\n\tpublic get total(): number {\r\n\t\treturn this.getPropertyValue(\"total\");\r\n\t}\r\n\r\n\t/**\r\n\t * Sum of all incomming link values.\r\n\t *\r\n\t * @param value Value\r\n\t */\r\n\tpublic set totalIncoming(value: number) {\r\n\t\tthis.setPropertyValue(\"totalIncoming\", value, true);\r\n\t}\r\n\r\n\t/**\r\n\t * @return Value\r\n\t */\r\n\tpublic get totalIncoming(): number {\r\n\t\treturn this.getPropertyValue(\"totalIncoming\");\r\n\t}\r\n\r\n\t/**\r\n\t * Sum of all outgoing link values.\r\n\t *\r\n\t * @param value Value\r\n\t */\r\n\tpublic set totalOutgoing(value: number) {\r\n\t\tthis.setPropertyValue(\"totalOutgoing\", value, true);\r\n\t}\r\n\r\n\t/**\r\n\t * @return Value\r\n\t */\r\n\tpublic get totalOutgoing(): number {\r\n\t\treturn this.getPropertyValue(\"totalOutgoing\");\r\n\t}\r\n\r\n\t/**\r\n\t * Node's color.\r\n\t *\r\n\t * @param value Color\r\n\t */\r\n\tpublic set color(value: Color) {\r\n\t\tthis.setColorProperty(\"color\", value);\r\n\t\tif (this._background) {\r\n\t\t\tthis._background.fill = value;\r\n\t\t}\r\n\t\tthis.fill = value;\r\n\t}\r\n\r\n\t/**\r\n\t * @return Color\r\n\t */\r\n\tpublic get color(): Color {\r\n\t\treturn this.getPropertyValue(\"color\");\r\n\t}\r\n\r\n\t/**\r\n\t * Creates elements in related legend container, that mimics the look of this\r\n\t * Series.\r\n\t *\r\n\t * @ignore Exclude from docs\r\n\t * @param marker Legend item container\r\n\t */\r\n\tpublic createLegendMarker(marker: Container) {\r\n\t\tlet w: number = marker.pixelWidth;\r\n\t\tlet h: number = marker.pixelHeight;\r\n\r\n\t\tmarker.removeChildren();\r\n\r\n\t\tlet column: RoundedRectangle = marker.createChild(RoundedRectangle);\r\n\t\tcolumn.shouldClone = false;\r\n\t\t$object.copyProperties(this, column, visualProperties);\r\n\t\tcolumn.stroke = this.fill;\r\n\r\n\t\tcolumn.copyFrom(this);\r\n\t\tcolumn.padding(0, 0, 0, 0); // if columns will have padding (which is often), legend marker will be very narrow\r\n\t\tcolumn.width = w;\r\n\t\tcolumn.height = h;\r\n\r\n\t\tlet legendDataItem = marker.dataItem;\r\n\t\tlegendDataItem.color = column.fill;\r\n\t\tlegendDataItem.colorOrig = column.fill;\r\n\t}\r\n\r\n\t/**\r\n\t * Legend data item that corresponds to this series.\r\n\t *\r\n\t * @param value Data item\r\n\t */\r\n\tpublic set legendDataItem(value: LegendDataItem) {\r\n\t\tthis._legendDataItem = value;\r\n\t\tthis._legendDataItem.itemContainer.deepInvalidate();\r\n\t}\r\n\r\n\t/**\r\n\t * @return Data item\r\n\t */\r\n\tpublic get legendDataItem(): LegendDataItem {\r\n\t\treturn this._legendDataItem;\r\n\t}\r\n}\r\n\r\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\r\nregistry.registeredClasses[\"FlowDiagramNode\"] = FlowDiagramNode;\r\n\n\n\n// WEBPACK FOOTER //\n// ../../../../../src/.internal/charts/elements/FlowDiagramNode.ts","/**\r\n * FlowDiagramLink module\r\n */\r\n\r\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\r\nimport { Sprite } from \"../../core/Sprite\";\r\nimport { Container, IContainerProperties, IContainerEvents, IContainerAdapters } from \"../../core/Container\";\r\nimport { FlowDiagramDataItem } from \"../types/FlowDiagram\";\r\nimport { LinearGradient } from \"../../core/rendering/fills/LinearGradient\";\r\nimport { RadialGradient } from \"../../core/rendering/fills/RadialGradient\";\r\nimport { Pattern } from \"../../core/rendering/fills/Pattern\";\r\nimport { registry } from \"../../core/Registry\";\r\nimport { Bullet } from \"../elements/Bullet\";\r\nimport { Color } from \"../../core/utils/Color\";\r\nimport { ListTemplate, ListDisposer } from \"../../core/utils/List\";\r\nimport { Polyline } from \"../../core/elements/Polyline\";\r\nimport { Line } from \"../../core/elements/Line\";\r\nimport { InterfaceColorSet } from \"../../core/utils/InterfaceColorSet\";\r\nimport * as $iter from \"../../core/utils/Iterator\";\r\nimport * as $type from \"../../core/utils/Type\";\r\n\r\n\r\n/**\r\n * ============================================================================\r\n * REQUISITES\r\n * ============================================================================\r\n * @hidden\r\n */\r\n\r\n/**\r\n * Defines properties for [[FlowDiagramLink]].\r\n */\r\nexport interface IFlowDiagramLinkProperties extends IContainerProperties {\r\n\r\n\t/**\r\n\t * [tension description]\r\n\t *\r\n\t * @todo Description\r\n\t */\r\n\ttension?: number;\r\n\r\n\t/**\r\n\t * [startX description]\r\n\t *\r\n\t * @todo Description\r\n\t */\r\n\tstartX?: number;\r\n\r\n\t/**\r\n\t * [startY description]\r\n\t *\r\n\t * @todo Description\r\n\t */\r\n\tstartY?: number;\r\n\r\n\t/**\r\n\t * [endX description]\r\n\t *\r\n\t * @todo Description\r\n\t */\r\n\tendX?: number;\r\n\r\n\t/**\r\n\t * [endY description]\r\n\t *\r\n\t * @todo Description\r\n\t */\r\n\tendY?: number;\r\n\r\n\t/**\r\n\t * [linkWidth description]\r\n\t *\r\n\t * @todo Description\r\n\t */\r\n\tlinkWidth?: number;\r\n\r\n\t/**\r\n\t * [startAngle description]\r\n\t *\r\n\t * @todo Description\r\n\t */\r\n\tstartAngle?: number;\r\n\r\n\t/**\r\n\t * [endAngle description]\r\n\t *\r\n\t * @todo Description\r\n\t */\r\n\tendAngle?: number;\r\n\r\n\t/**\r\n\t * Should link be filled with a solid color, color of from node, color of toNode or gradient between node colors.\r\n\t */\r\n\tcolorMode?: \"solid\" | \"gradient\" | \"fromNode\" | \"toNode\";\r\n\r\n\t/**\r\n\t * [controlPointDistance description]\r\n\t *\r\n\t * @todo Description\r\n\t */\r\n\tcontrolPointDistance?: number;\r\n\r\n\t/**\r\n\t * [maskBullets description]\r\n\t *\r\n\t * @todo Description\r\n\t */\r\n\tmaskBullets?: boolean;\r\n\r\n\t/**\r\n\t * [tooltipLocation description]\r\n\t *\r\n\t * @todo Description\r\n\t */\r\n\ttooltipLocation?: number;\r\n}\r\n\r\n/**\r\n * Defines events for [[FlowDiagramLink]].\r\n */\r\nexport interface IFlowDiagramLinkEvents extends IContainerEvents { }\r\n\r\n/**\r\n * Defines adapters for [[FlowDiagramLink]].\r\n *\r\n * @see {@link Adapter}\r\n */\r\nexport interface IFlowDiagramLinkAdapters extends IContainerAdapters, IFlowDiagramLinkProperties { }\r\n\r\n\r\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\r\n\r\n/**\r\n * This class creates a link (waved color-filled line) between two nodes in a\r\n * Flow Diagram.\r\n *\r\n * @see {@link IFlowDiagramLinkEvents} for a list of available events\r\n * @see {@link IFlowDiagramLinkAdapters} for a list of available Adapters\r\n * @important\r\n */\r\nexport class FlowDiagramLink extends Container {\r\n\r\n\t/**\r\n\t * Defines available properties.\r\n\t */\r\n\tpublic _properties!: IFlowDiagramLinkProperties;\r\n\r\n\t/**\r\n\t * Defines available adapters.\r\n\t */\r\n\tpublic _adapter!: IFlowDiagramLinkAdapters;\r\n\r\n\t/**\r\n\t * Defines available events.\r\n\t */\r\n\tpublic _events!: IFlowDiagramLinkEvents;\r\n\r\n\t/**\r\n\t * Defines a type of data item used by this class.\r\n\t */\r\n\tpublic _dataItem: FlowDiagramDataItem;\r\n\r\n\t/**\r\n\t * A gradiend instance that is used to provided colored gradient fills for\r\n\t * the Flow link.\r\n\t */\r\n\tprotected _gradient: LinearGradient;\r\n\r\n\r\n\t/**\r\n\t * List of bullets\r\n\t * @ignore\r\n\t */\r\n\tprotected _bullets: ListTemplate;\r\n\r\n\t/**\r\n\t * Link sprite\r\n\t */\r\n\tpublic link: Sprite;\r\n\r\n\t/**\r\n\t * Bullets mask spite\r\n */\r\n\tprotected _bulletsMask: Sprite;\r\n\r\n\t/**\r\n\t * Bullets container\r\n */\r\n\tprotected _bulletsContainer: Container;\r\n\r\n\t/**\r\n\t * Spline which goes through the middle of a link, used to calculate bullet and tooltip positions, invisible by default\r\n */\r\n\tpublic middleLine: Line | Polyline;\r\n\r\n\r\n\t/**\r\n\t * Constructor\r\n\t */\r\n\tconstructor() {\r\n\t\tsuper();\r\n\t\tthis.className = \"FlowDiagramLink\";\r\n\r\n\t\tlet interfaceColors = new InterfaceColorSet();\r\n\r\n\t\tthis.maskBullets = false;\r\n\r\n\t\tthis.colorMode = \"fromNode\";\r\n\r\n\t\tthis.layout = \"none\";\r\n\t\tthis.isMeasured = false;\r\n\r\n\t\tthis.startAngle = 0;\r\n\t\tthis.endAngle = 0;\r\n\r\n\t\tthis.strokeOpacity = 0;\r\n\r\n\t\t// this is very important, otherwise the container will be shifted\r\n\t\tthis.verticalCenter = \"none\";\r\n\t\tthis.horizontalCenter = \"none\";\r\n\r\n\t\tthis.tooltipText = \"{fromName}→{toName}:{value.value}\";\r\n\t\tthis.tooltipLocation = 0.5;\r\n\r\n\t\tthis.link = this.createChild(Sprite);\r\n\t\tthis.link.shouldClone = false;\r\n\t\tthis.link.setElement(this.paper.add(\"path\"));\r\n\t\tthis.link.isMeasured = false;\r\n\t\tthis.fillOpacity = 0.2;\r\n\t\tthis.fill = interfaceColors.getFor(\"alternativeBackground\");\r\n\r\n\t\tthis.applyTheme();\r\n\t}\r\n\r\n\t/**\r\n\t * Positions bullets\r\n\t * @ignore\r\n\t */\r\n\tprotected positionBullets() {\r\n\t\t$iter.each(this.bullets.iterator(), (bullet) => {\r\n\t\t\tbullet.parent = this.bulletsContainer;\r\n\r\n\t\t\tbullet.maxWidth = this.maxWidth;\r\n\t\t\tbullet.maxHeight = this.maxHeight;\r\n\r\n\t\t\tthis.positionBullet(bullet);\r\n\t\t})\r\n\t}\r\n\r\n\t/**\r\n\t * Bullets container\r\n */\r\n\tpublic get bulletsContainer() {\r\n\t\tif (!this._bulletsContainer) {\r\n\t\t\tlet bulletsContainer = this.createChild(Container);\r\n\t\t\tbulletsContainer.shouldClone = false;\r\n\t\t\tbulletsContainer.layout = \"none\";\r\n\t\t\tthis._bulletsContainer = bulletsContainer;\r\n\t\t}\r\n\t\treturn this._bulletsContainer;\r\n\t}\r\n\r\n\r\n\t/**\r\n\t * Bullets mask sprite\r\n */\r\n\tpublic get bulletsMask() {\r\n\t\tif (!this._bulletsMask) {\r\n\t\t\tlet bulletsMask = this.createChild(Sprite);\r\n\t\t\tbulletsMask.shouldClone = false;\r\n\t\t\tbulletsMask.setElement(this.paper.add(\"path\"));\r\n\t\t\tbulletsMask.isMeasured = false;\r\n\t\t\tthis._bulletsMask = bulletsMask;\r\n\t\t}\r\n\t\treturn this._bulletsMask;\r\n\t}\r\n\r\n\t/**\r\n\t * Positions bullets at relative bullet.locationX position on the link.\r\n\t * @ignore\r\n\t */\r\n\tprotected positionBullet(bullet: Bullet) {\r\n\r\n\t\tlet location = bullet.locationX;\r\n\r\n\t\tif (!$type.isNumber(location)) {\r\n\t\t\tlocation = bullet.locationY;\r\n\t\t}\r\n\r\n\t\tif (!$type.isNumber(location)) {\r\n\t\t\tlocation = 0.5;\r\n\t\t}\r\n\t\tlet point = this.middleLine.positionToPoint(location);\r\n\r\n\t\tbullet.moveTo(point);\r\n\r\n\t\tlet rotationField = bullet.propertyFields.rotation;\r\n\t\tlet angle: number;\r\n\t\tif (bullet.dataItem) {\r\n\t\t\tlet dataContext: any = bullet.dataItem.dataContext;\r\n\t\t\tangle = dataContext[rotationField];\r\n\t\t}\r\n\t\tif (!$type.isNumber(angle)) {\r\n\t\t\tangle = point.angle;\r\n\t\t}\r\n\r\n\t\tbullet.rotation = angle;\r\n\t}\r\n\r\n\t/**\r\n\t * [startAngle description]\r\n\t *\r\n\t * @todo Description\r\n\t * @param value Start angle\r\n\t */\r\n\tpublic set startAngle(value: number) {\r\n\t\tthis.setPropertyValue(\"startAngle\", value, true);\r\n\t}\r\n\r\n\t/**\r\n\t * @return Start angle\r\n\t */\r\n\tpublic get startAngle(): number {\r\n\t\treturn this.getPropertyValue(\"startAngle\");\r\n\t}\r\n\r\n\t/**\r\n\t * [endAngle description]\r\n\t *\r\n\t * @todo Description\r\n\t * @param value End angle\r\n\t */\r\n\tpublic set endAngle(value: number) {\r\n\t\tthis.setPropertyValue(\"endAngle\", value, true);\r\n\t}\r\n\r\n\t/**\r\n\t * @return End angle\r\n\t */\r\n\tpublic get endAngle(): number {\r\n\t\treturn this.getPropertyValue(\"endAngle\");\r\n\t}\r\n\r\n\r\n\t/**\r\n\t * Should link be filled with a solid color, color of from node, color of toNode or gradient between node colors.\r\n\t * Some of the links, like ChordLink does not support gradiens well.\r\n\t *\r\n\t * @param value Fill mode\r\n\t */\r\n\tpublic set colorMode(value: \"solid\" | \"gradient\" | \"fromNode\" | \"toNode\") {\r\n\t\tif (value == \"gradient\") {\r\n\t\t\tlet color = this.fill;\r\n\r\n\t\t\tthis.gradient.stops.clear();\r\n\t\t\tif (color instanceof Color) {\r\n\t\t\t\tthis.gradient.addColor(color);\r\n\t\t\t\tthis.gradient.addColor(color);\r\n\t\t\t}\r\n\t\t\tthis.fill = this.gradient;\r\n\t\t\tthis.stroke = this.gradient;\r\n\t\t}\r\n\t\tthis.setPropertyValue(\"colorMode\", value, true);\r\n\t}\r\n\r\n\t/**\r\n\t * Fill mode\r\n\t */\r\n\tpublic get colorMode(): \"solid\" | \"gradient\" | \"fromNode\" | \"toNode\" {\r\n\t\treturn this.getPropertyValue(\"colorMode\");\r\n\t}\r\n\r\n\r\n\t/**\r\n\t * Should link bullets be masked or not\r\n\t *\r\n\t * @param value\r\n\t * @default false\r\n\t */\r\n\tpublic set maskBullets(value: boolean) {\r\n\t\tthis.setPropertyValue(\"maskBullets\", value, true);\r\n\t}\r\n\r\n\t/**\r\n\t * @return mask bullets value\r\n\t */\r\n\tpublic get maskBullets(): boolean {\r\n\t\treturn this.getPropertyValue(\"maskBullets\");\r\n\t}\r\n\r\n\t/**\r\n\t * Relative location of a tooltip.\r\n\t * @default 0.5\r\n\t *\r\n\t * @param value\r\n\t */\r\n\tpublic set tooltipLocation(value: number) {\r\n\t\tthis.setPropertyValue(\"tooltipLocation\", value, true);\r\n\t}\r\n\r\n\t/**\r\n\t * Tooltip location value\r\n\t */\r\n\tpublic get tooltipLocation(): number {\r\n\t\treturn this.getPropertyValue(\"tooltipLocation\");\r\n\t}\r\n\r\n\t/**\r\n\t * Adds color steps in the link gradient.\r\n\t *\r\n\t * @param value Fill option\r\n\t */\r\n\tprotected setFill(value: Color | Pattern | LinearGradient | RadialGradient) {\r\n\t\tsuper.setFill(value)\r\n\t\tlet gradient = this._gradient;\r\n\r\n\t\tif (gradient && value instanceof Color) {\r\n\t\t\tgradient.stops.clear();\r\n\t\t\tgradient.addColor(value);\r\n\t\t\tgradient.addColor(value);\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Updates bounding box based on element dimension settings.\r\n\t *\r\n\t * @ignore Exclude from docs\r\n\t */\r\n\tpublic measureElement(): void {\r\n\r\n\t}\r\n\r\n\r\n\t/**\r\n\t * List of bullets\r\n\t *\r\n\t * @return [description]\r\n\t */\r\n\tpublic get bullets(): ListTemplate {\r\n\t\tif (!this._bullets) {\r\n\t\t\tthis._bullets = new ListTemplate(new Bullet());\r\n\t\t\tthis._disposers.push(new ListDisposer(this._bullets));\r\n\t\t\tthis._disposers.push(this._bullets.template);\r\n\t\t\tthis._bullets.events.on(\"inserted\", (event) => {\r\n\t\t\t\tevent.newValue.events.on(\"propertychanged\", (event) => {\r\n\t\t\t\t\tif (event.property == \"locationX\" || event.property == \"locationY\") {\r\n\t\t\t\t\t\tthis.positionBullet(event.target);\r\n\t\t\t\t\t}\r\n\t\t\t\t}, undefined, false)\r\n\t\t\t}, undefined, false)\r\n\t\t}\r\n\t\treturn this._bullets;\r\n\t}\r\n\r\n\r\n\t/**\r\n\t * Copies properties from another [[FlowDiagramLink]].\r\n\t *\r\n\t * @param source Source link\r\n\t */\r\n\tcopyFrom(source: this) {\r\n\t\tsuper.copyFrom(source);\r\n\t\tthis.bullets.copyFrom(source.bullets);\r\n\t\tlet middleLine = this.middleLine;\r\n\t\tif (middleLine) {\r\n\t\t\tif (middleLine instanceof Line && source.middleLine instanceof Line) {\r\n\t\t\t\tmiddleLine.copyFrom(source.middleLine);\r\n\t\t\t}\r\n\r\n\t\t\tif (middleLine instanceof Polyline && source.middleLine instanceof Polyline) {\r\n\t\t\t\tmiddleLine.copyFrom(source.middleLine);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tthis.link.copyFrom(source.link);\r\n\t}\r\n\r\n\t/**\r\n\t * @ignore Exclude from docs\r\n\t * @return Tooltip X (px)\r\n\t */\r\n\tpublic getTooltipX(): number {\r\n\t\tif (this.middleLine) {\r\n\t\t\treturn this.middleLine.positionToPoint(this.tooltipLocation).x;\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * @ignore Exclude from docs\r\n\t * @return Tooltip Y (px)\r\n\t */\r\n\tpublic getTooltipY(): number {\r\n\t\tif (this.middleLine) {\r\n\t\t\treturn this.middleLine.positionToPoint(this.tooltipLocation).y;\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * A gradiend instance that is used to provided colored gradient fills for\r\n\t * the Flow link.\r\n\t */\r\n\tpublic get gradient() {\r\n\t\tif (!this._gradient) {\r\n\t\t\tthis._gradient = new LinearGradient();\r\n\t\t}\r\n\t\treturn this._gradient;\r\n\t}\r\n\r\n}\r\n\r\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\r\nregistry.registeredClasses[\"FlowDiagramLink\"] = FlowDiagramLink;\r\n\n\n\n// WEBPACK FOOTER //\n// ../../../../../src/.internal/charts/elements/FlowDiagramLink.ts","/**\r\n * FlowDiagram module.\r\n */\r\n\r\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\r\nimport { Chart, IChartProperties, IChartDataFields, IChartAdapters, IChartEvents, ChartDataItem } from \"../Chart\";\r\nimport { ListTemplate, ListDisposer } from \"../../core/utils/List\";\r\nimport { DictionaryTemplate, DictionaryDisposer } from \"../../core/utils/Dictionary\";\r\nimport { Container } from \"../../core/Container\";\r\nimport { registry } from \"../../core/Registry\";\r\nimport { FlowDiagramNode } from \"../elements/FlowDiagramNode\";\r\nimport { FlowDiagramLink } from \"../elements/FlowDiagramLink\";\r\nimport { LinearGradientModifier } from \"../../core/rendering/fills/LinearGradientModifier\";\r\nimport { ColorSet } from \"../../core/utils/ColorSet\";\r\nimport { toColor, Color } from \"../../core/utils/Color\";\r\nimport * as $iter from \"../../core/utils/Iterator\";\r\nimport * as $type from \"../../core/utils/Type\";\r\nimport * as $number from \"../../core/utils/Number\";\r\nimport * as $order from \"../../core/utils/Order\";\r\nimport { Disposer } from \"../../core/utils/Disposer\";\r\n\r\n/**\r\n * ============================================================================\r\n * DATA ITEM\r\n * ============================================================================\r\n * @hidden\r\n */\r\n\r\n//@todo rearange notes after dragged\r\n\r\n/**\r\n * Defines a [[DataItem]] for [[FlowDiagram]].\r\n *\r\n * @see {@link DataItem}\r\n */\r\nexport class FlowDiagramDataItem extends ChartDataItem {\r\n\r\n\t/**\r\n\t * Defines a type of [[Component]] this data item is used for.\r\n\t */\r\n\tpublic _component!: FlowDiagram;\r\n\r\n\t/**\r\n\t * An a link element, connecting two nodes.\r\n\t */\r\n\tpublic _link: FlowDiagramLink;\r\n\r\n\t/**\r\n\t * An origin node.\r\n\t */\r\n\tpublic fromNode: FlowDiagramNode;\r\n\r\n\t/**\r\n\t * A destination node.\r\n\t */\r\n\tpublic toNode: FlowDiagramNode;\r\n\r\n\t/**\r\n\t * Constructor\r\n\t */\r\n\tconstructor() {\r\n\t\tsuper();\r\n\t\tthis.className = \"FlowDiagramDataItem\";\r\n\r\n\t\tthis.values.value = {};\r\n\r\n\t\tthis.applyTheme();\r\n\t}\r\n\r\n\t/**\r\n\t * Source node's name.\r\n\t *\r\n\t * @param value Name\r\n\t */\r\n\tpublic set fromName(value: string) {\r\n\t\tthis.setProperty(\"fromName\", value);\r\n\t}\r\n\r\n\t/**\r\n\t * @return name\r\n\t */\r\n\tpublic get fromName(): string {\r\n\t\treturn this.properties.fromName;\r\n\t}\r\n\r\n\t/**\r\n\t * Destination node's name.\r\n\t *\r\n\t * @param value Name\r\n\t */\r\n\tpublic set toName(value: string) {\r\n\t\tthis.setProperty(\"toName\", value);\r\n\t}\r\n\r\n\t/**\r\n\t * @return name\r\n\t */\r\n\tpublic get toName(): string {\r\n\t\treturn this.properties.toName;\r\n\t}\r\n\r\n\r\n\t/**\r\n\t * Node color\r\n\t *\r\n\t * @param value Name\r\n\t */\r\n\tpublic set color(value: Color) {\r\n\t\tthis.setProperty(\"color\", toColor(value));\r\n\t}\r\n\r\n\t/**\r\n\t * @return color\r\n\t */\r\n\tpublic get color(): Color {\r\n\t\treturn this.properties.color;\r\n\t}\r\n\r\n\t/**\r\n\t * Link's value.\r\n\t *\r\n\t * @param value Value\r\n\t */\r\n\tpublic set value(value: number) {\r\n\t\tthis.setValue(\"value\", value);\r\n\t}\r\n\r\n\t/**\r\n\t * @return Value\r\n\t */\r\n\tpublic get value(): number {\r\n\t\treturn this.values.value.value;\r\n\t}\r\n\r\n\t/**\r\n\t * A visual element, representing link between the source and target nodes.\r\n\t *\r\n\t * Link's actual thickness will be determined by `value` of this link and\r\n\t * `value` of the source node.\r\n\t *\r\n\t * @readonly\r\n\t * @return Link element\r\n\t */\r\n\tpublic get link(): this[\"_link\"] {\r\n\t\tif (!this._link) {\r\n\t\t\tlet link = this.component.links.create();\r\n\t\t\tthis._link = link;\r\n\r\n\t\t\tthis.addSprite(link);\r\n\r\n\t\t\tthis._disposers.push(new Disposer(() => {\r\n\t\t\t\tif (this.component) {\r\n\t\t\t\t\tthis.component.links.removeValue(link);\r\n\t\t\t\t}\r\n\t\t\t}));\r\n\t\t}\r\n\t\treturn this._link;\r\n\t}\r\n\r\n}\r\n\r\n\r\n/**\r\n * ============================================================================\r\n * REQUISITES\r\n * ============================================================================\r\n * @hidden\r\n */\r\n\r\n/**\r\n * Defines data fields for [[FlowDiagram]].\r\n */\r\nexport interface IFlowDiagramDataFields extends IChartDataFields {\r\n\r\n\t/**\r\n\t * Name of the source node.\r\n\t */\r\n\tfromName?: string;\r\n\r\n\t/**\r\n\t * Name of the target node.\r\n\t */\r\n\ttoName?: string;\r\n\r\n\t/**\r\n\t * Value of the link between two nodes.\r\n\t */\r\n\tvalue?: string;\r\n\r\n\t/**\r\n\t * Color of a from node\r\n\t */\r\n\tcolor?: string;\r\n\r\n\t/**\r\n\t * Visibility of a node\r\n\t */\r\n\tvisible?: string;\r\n}\r\n\r\n/**\r\n * Defines properties for [[FlowDiagram]]\r\n */\r\nexport interface IFlowDiagramProperties extends IChartProperties {\r\n\r\n\t/**\r\n\t * Padding for node square in pixels.\r\n\t */\r\n\tnodePadding?: number;\r\n\r\n\t/**\r\n\t * Sort nodes by name or value or do not sort a\r\n\t */\r\n\tsortBy?: \"none\" | \"name\" | \"value\";\r\n\r\n\t/**\r\n\t * Sometimes nodes can get very small if their value is little. With this setting you\r\n\t * can set min size of a node (this is relative value from the total size of all nodes)\r\n\t */\r\n\tminNodeSize: number;\r\n}\r\n\r\n/**\r\n * Defines events for [[FlowDiagram]].\r\n */\r\nexport interface IFlowDiagramEvents extends IChartEvents { }\r\n\r\n/**\r\n * Defines adapters for [[FlowDiagram]].\r\n *\r\n * @see {@link Adapter}\r\n */\r\nexport interface IFlowDiagramAdapters extends IChartAdapters, IFlowDiagramProperties { }\r\n\r\n\r\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\r\n\r\n/**\r\n * Creates a Pie chart\r\n * @see {@link IFlowDiagramEvents} for a list of available Events\r\n * @see {@link IFlowDiagramAdapters} for a list of available Adapters\r\n * @important\r\n */\r\nexport class FlowDiagram extends Chart {\r\n\r\n\t/**\r\n\t * A Color Set to use when applying/generating colors for each subsequent\r\n\t * node.\r\n\t */\r\n\tpublic colors: ColorSet = new ColorSet();\r\n\r\n\t/**\r\n\t * Defines a type for the DataItem.\r\n\t */\r\n\tpublic _dataItem: FlowDiagramDataItem;\r\n\r\n\t/**\r\n\t * Defines available data fields.\r\n\t */\r\n\tpublic _dataFields: IFlowDiagramDataFields;\r\n\r\n\t/**\r\n\t * Defines available properties.\r\n\t */\r\n\tpublic _properties!: IFlowDiagramProperties;\r\n\r\n\t/**\r\n\t * Defines available adapters.\r\n\t */\r\n\tpublic _adapter!: IFlowDiagramAdapters;\r\n\r\n\t/**\r\n\t * Defines available events.\r\n\t */\r\n\tpublic _events!: IFlowDiagramEvents;\r\n\r\n\r\n\t/**\r\n\t */\r\n\tpublic _node: FlowDiagramNode;\r\n\r\n\r\n\t/**\r\n\t * A list of chart's FlowDiagram nodes.\r\n\t *\r\n\t * @param {DictionaryTemplate}\r\n\t */\r\n\tprotected _nodes: DictionaryTemplate;\r\n\r\n\r\n\t/**\r\n\t */\r\n\tpublic _link: FlowDiagramLink;\r\n\r\n\t/**\r\n\t * A list of FlowDiagram links connecting nodes.\r\n\t *\r\n\t * @param {ListTemplate}\r\n\t */\r\n\tprotected _links: ListTemplate;\r\n\r\n\t/**\r\n\t * A container that holds all of the link elements.\r\n\t */\r\n\tpublic linksContainer: Container;\r\n\r\n\t/**\r\n\t * A container that holds all of the node elements.\r\n\t */\r\n\tpublic nodesContainer: Container;\r\n\r\n\t/**\r\n\t * Sorted nodes iterator.\r\n\t *\r\n\t * @ignore\r\n\t */\r\n\tprotected _sorted: $iter.Iterator<[string, FlowDiagramNode]>;\r\n\r\n\r\n\t/**\r\n\t * Constructor\r\n\t */\r\n\tconstructor() {\r\n\r\n\t\t// Init\r\n\t\tsuper();\r\n\t\tthis.className = \"FlowDiagram\";\r\n\t\tthis.nodePadding = 20;\r\n\t\tthis.sortBy = \"none\";\r\n\t\tthis.sequencedInterpolation = true;\r\n\r\n\t\tthis.colors.step = 2;\r\n\t\tthis.minNodeSize = 0.02;\r\n\r\n\t\tlet linksContainer = this.chartContainer.createChild(Container);\r\n\t\tlinksContainer.shouldClone = false;\r\n\t\tlinksContainer.layout = \"none\";\r\n\t\tlinksContainer.isMeasured = false;\r\n\t\tthis.linksContainer = linksContainer;\r\n\r\n\t\tlet nodesContainer = this.chartContainer.createChild(Container);\r\n\t\tnodesContainer.shouldClone = false;\r\n\t\tnodesContainer.layout = \"none\";\r\n\t\tnodesContainer.isMeasured = false;\r\n\t\tthis.nodesContainer = nodesContainer;\r\n\r\n\t\t// this data item holds sums, averages, etc\r\n\t\tthis.dataItem = this.createDataItem();\r\n\t\tthis.dataItem.component = this;\r\n\r\n\t\t// Apply theme\r\n\t\tthis.applyTheme();\r\n\t}\r\n\r\n\tpublic dispose(): void {\r\n\t\tsuper.dispose();\r\n\t\tthis.dataItem.dispose();\r\n\t}\r\n\r\n\t/**\r\n\t * (Re)validates chart's data, effectively causing the chart to redraw.\r\n\t *\r\n\t * @ignore Exclude from docs\r\n\t */\r\n\tpublic validateData(): void {\r\n\t\tif (this._parseDataFrom == 0) {\r\n\t\t\tthis.nodes.clear();\r\n\t\t}\r\n\r\n\t\tthis.sortNodes();\r\n\r\n\t\tthis.colors.reset();\r\n\r\n\t\tsuper.validateData();\r\n\r\n\t\tlet sum = 0;\r\n\t\tlet count = 0;\r\n\t\tlet low: number;\r\n\t\tlet high: number;\r\n\r\n\t\t// build blocks\r\n\t\t$iter.each(this.dataItems.iterator(), (dataItem) => {\r\n\t\t\tlet fromName = dataItem.fromName;\r\n\r\n\t\t\tif (fromName) {\r\n\t\t\t\tlet node = this.nodes.getKey(fromName);\r\n\t\t\t\tif (!node) {\r\n\t\t\t\t\tnode = this.nodes.create(fromName);\r\n\t\t\t\t\tnode.name = fromName;\r\n\t\t\t\t\tnode.chart = this;\r\n\t\t\t\t\tnode.dataItem = dataItem;\r\n\t\t\t\t}\r\n\t\t\t\tdataItem.fromNode = node;\r\n\t\t\t\tdataItem.fromNode.outgoingDataItems.push(dataItem);\r\n\t\t\t}\r\n\t\t\tlet toName = dataItem.toName;\r\n\t\t\tif (toName) {\r\n\t\t\t\tlet node = this.nodes.getKey(toName);\r\n\t\t\t\tif (!node) {\r\n\t\t\t\t\tnode = this.nodes.create(toName);\r\n\t\t\t\t\tnode.name = toName;\r\n\t\t\t\t\tnode.chart = this;\r\n\t\t\t\t\tnode.dataItem = dataItem;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tdataItem.toNode = node;\r\n\t\t\t\tdataItem.toNode.incomingDataItems.push(dataItem);\r\n\t\t\t}\r\n\r\n\t\t\tif (!dataItem.fromNode) {\r\n\t\t\t\tlet strokeModifier = new LinearGradientModifier();\r\n\t\t\t\tstrokeModifier.opacities = [0, 1];\r\n\t\t\t\tdataItem.link.strokeModifier = strokeModifier;\r\n\t\t\t}\r\n\r\n\t\t\tif (!dataItem.toNode) {\r\n\t\t\t\tlet fillModifier = new LinearGradientModifier();\r\n\t\t\t\tfillModifier.opacities = [1, 0];\r\n\t\t\t\tdataItem.link.strokeModifier = fillModifier;\r\n\t\t\t}\r\n\r\n\t\t\tlet value = dataItem.value;\r\n\t\t\tif ($type.isNumber(value)) {\r\n\t\t\t\tsum += value;\r\n\t\t\t\tcount++;\r\n\r\n\t\t\t\tif (low > value || !$type.isNumber(low)) {\r\n\t\t\t\t\tlow = value;\r\n\t\t\t\t}\r\n\t\t\t\tif (high < value || !$type.isNumber(high)) {\r\n\t\t\t\t\thigh = value;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tlet key = \"value\";\r\n\r\n\t\tthis.dataItem.setCalculatedValue(key, high, \"high\");\r\n\t\tthis.dataItem.setCalculatedValue(key, low, \"low\");\r\n\t\tthis.dataItem.setCalculatedValue(key, sum, \"sum\");\r\n\t\tthis.dataItem.setCalculatedValue(key, sum / count, \"average\");\r\n\t\tthis.dataItem.setCalculatedValue(key, count, \"count\");\r\n\r\n\r\n\t\t$iter.each(this.nodes.iterator(), (strNode) => {\r\n\t\t\tlet node = strNode[1];\r\n\r\n\t\t\tif (node.fill instanceof Color) {\r\n\t\t\t\tnode.color = node.fill;\r\n\t\t\t}\r\n\r\n\t\t\tif (node.color == undefined) {\r\n\t\t\t\tnode.color = this.colors.next();\r\n\t\t\t}\r\n\r\n\t\t\tif (node.dataItem.color != undefined) {\r\n\t\t\t\tnode.color = node.dataItem.color;\r\n\t\t\t}\r\n\r\n\t\t\tif (!node.dataItem.visible) {\r\n\t\t\t\tnode.hide(0);\r\n\t\t\t}\r\n\r\n\t\t\tthis.getNodeValue(node);\r\n\t\t});\r\n\r\n\t\tthis.sortNodes();\r\n\t\tthis.feedLegend();\r\n\t}\r\n\r\n\t/**\r\n\t * [handleDataItemWorkingValueChange description]\r\n\t *\r\n\t * @ignore Exclude from docs\r\n\t */\r\n\tpublic handleDataItemWorkingValueChange(dataItem?: this[\"_dataItem\"], name?: string): void {\r\n\t\tthis.invalidate();\r\n\t}\r\n\r\n\r\n\t/**\r\n\t * Sorts nodes by either their values or names, based on `sortBy` setting.\r\n\t */\r\n\tprotected sortNodes() {\r\n\t\tif (this.sortBy == \"name\") {\r\n\t\t\tthis._sorted = this.nodes.sortedIterator();\r\n\t\t}\r\n\t\telse if (this.sortBy == \"value\") {\r\n\t\t\tthis._sorted = $iter.sort(this.nodes.iterator(), (x, y) => $order.reverse($number.order(x[1].total, y[1].total)));\r\n\t\t}\r\n\t\telse {\r\n\t\t\tthis._sorted = this.nodes.iterator();\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Updates a cummulative value of the node.\r\n\t *\r\n\t * A node's value is determined by summing values of all of the incoming\r\n\t * links or all of the outgoing links, whichever results in bigger number.\r\n\t *\r\n\t * @param node Node value\r\n\t */\r\n\tprotected getNodeValue(node: FlowDiagramNode) {\r\n\r\n\t\t// todo: totalIncomming totalOutgoing, total\r\n\r\n\t\tlet incomingTotal = 0;\r\n\t\tlet outgoingTotal = 0;\r\n\r\n\t\t$iter.each(node.incomingDataItems.iterator(), (dataItem: FlowDiagramDataItem) => {\r\n\t\t\tlet value = dataItem.getWorkingValue(\"value\");\r\n\t\t\tif ($type.isNumber(value)) {\r\n\t\t\t\tincomingTotal += value;\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\t$iter.each(node.outgoingDataItems.iterator(), (dataItem: FlowDiagramDataItem) => {\r\n\t\t\tlet value = dataItem.getWorkingValue(\"value\");\r\n\t\t\tif ($type.isNumber(value)) {\r\n\t\t\t\toutgoingTotal += value;\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tnode.total = incomingTotal + outgoingTotal;\r\n\t\tnode.totalIncoming = incomingTotal;\r\n\t\tnode.totalOutgoing = outgoingTotal;\r\n\t};\r\n\r\n\t/**\r\n\t * Changes the sort type of the nodes.\r\n\t *\r\n\t * This will actually reshuffle nodes using nice animation.\r\n\t */\r\n\tprotected changeSorting() {\r\n\t\tthis.sortNodes();\r\n\t}\r\n\r\n\t/**\r\n\t * Sets defaults that instantiate some objects that rely on parent, so they\r\n\t * cannot be set in constructor.\r\n\t */\r\n\tprotected applyInternalDefaults(): void {\r\n\r\n\t\tsuper.applyInternalDefaults();\r\n\r\n\t\t// Add a default screen reader title for accessibility\r\n\t\t// This will be overridden in screen reader if there are any `titles` set\r\n\t\tif (!$type.hasValue(this.readerTitle)) {\r\n\t\t\tthis.readerTitle = this.language.translate(\"Flow diagram\");\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Creates and returns a new data item.\r\n\t *\r\n\t * @return Data item\r\n\t */\r\n\tprotected createDataItem(): this[\"_dataItem\"] {\r\n\t\treturn new FlowDiagramDataItem();\r\n\t}\r\n\r\n\t/**\r\n\t * Padding for node square in pixels.\r\n\t *\r\n\t * Padding will add extra space around node's name label.\r\n\t *\r\n\t * @param value Padding (px)\r\n\t */\r\n\tpublic set nodePadding(value: number) {\r\n\t\tthis.setPropertyValue(\"nodePadding\", value, true);\r\n\t}\r\n\r\n\t/**\r\n\t * @return Padding (px)\r\n\t */\r\n\tpublic get nodePadding(): number {\r\n\t\treturn this.getPropertyValue(\"nodePadding\");\r\n\t}\r\n\r\n\t/**\r\n\t * Sort nodes by \"name\" or \"value\" or do not sort at all. If not sorted, nodes will appear in the same order as they are in the data.\r\n\t * @default \"none\"\r\n\t * @param value Node sorting\r\n\t */\r\n\tpublic set sortBy(value: \"none\" | \"name\" | \"value\") {\r\n\t\tthis.setPropertyValue(\"sortBy\", value);\r\n\t\tthis.changeSorting();\r\n\t}\r\n\r\n\t/**\r\n\t * @returns Node sorting\r\n\t */\r\n\tpublic get sortBy(): \"none\" | \"name\" | \"value\" {\r\n\t\treturn this.getPropertyValue(\"sortBy\");\r\n\t}\r\n\r\n\t/**\r\n\t * Sometimes nodes can get very small if their value is little. With this setting you\r\n\t * can set min size of a node (this is relative value from the total size of all nodes)\r\n\t * @default 0.02\r\n\t * @param value Node sorting\r\n\t */\r\n\tpublic set minNodeSize(value: number) {\r\n\t\tthis.setPropertyValue(\"minNodeSize\", value, true);\r\n\t}\r\n\r\n\t/**\r\n\t * @returns min node size\r\n\t */\r\n\tpublic get minNodeSize(): number {\r\n\t\treturn this.getPropertyValue(\"minNodeSize\");\r\n\t}\r\n\r\n\r\n\t/**\r\n\t * A list of chart's nodes.\r\n\t *\r\n\t * @param {DictionaryTemplate}\r\n\t */\r\n\tpublic get nodes(): DictionaryTemplate {\r\n\t\tif (!this._nodes) {\r\n\t\t\tlet template = this.createNode();\r\n\t\t\ttemplate.events.on(\"hit\", (event) => {\r\n\t\t\t\tevent.target.handleHit(event);\r\n\t\t\t});\r\n\t\t\tthis._nodes = new DictionaryTemplate(template);\r\n\t\t\tthis._disposers.push(new DictionaryDisposer(this._nodes));\r\n\t\t}\r\n\t\treturn this._nodes;\r\n\t}\r\n\r\n\t/**\r\n\t * @ignore\r\n\t */\r\n\tpublic createNode(): this[\"_node\"] {\r\n\t\tlet node = new FlowDiagramNode();\r\n\t\tthis._disposers.push(node);\r\n\t\treturn node;\r\n\t}\r\n\r\n\t/**\r\n\t * A list of chart's links.\r\n\t *\r\n\t * @param {ListTemplate}\r\n\t */\r\n\tpublic get links(): ListTemplate {\r\n\t\tif (!this._links) {\r\n\t\t\tthis._links = new ListTemplate(this.createLink());\r\n\t\t\tthis._disposers.push(new ListDisposer(this._links));\r\n\t\t}\r\n\t\treturn this._links;\r\n\t}\r\n\r\n\t/**\r\n\t * @ignore\r\n\t */\r\n\tpublic createLink(): this[\"_link\"] {\r\n\t\tlet link = new FlowDiagramLink();\r\n\t\tthis._disposers.push(link);\r\n\t\treturn link;\r\n\t}\r\n\r\n\t/**\r\n\t * Setups the legend to use the chart's data.\r\n\t * @ignore\r\n\t */\r\n\tpublic feedLegend(): void {\r\n\t\tlet legend = this.legend;\r\n\t\tif (legend) {\r\n\t\t\tlet legendData: any[] = [];\r\n\r\n\t\t\tthis.nodes.each((key, node) => {\r\n\t\t\t\tlegendData.push(node);\r\n\t\t\t});\r\n\r\n\t\t\tlegend.data = legendData;\r\n\t\t\tlegend.dataFields.name = \"name\";\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * @ignore\r\n\t */\r\n\tpublic disposeData() {\r\n\t\tsuper.disposeData();\r\n\t\tthis.nodes.clear();\r\n\t}\r\n}\r\n\r\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\r\nregistry.registeredClasses[\"FlowDiagram\"] = FlowDiagram;\r\n\n\n\n// WEBPACK FOOTER //\n// ../../../../../src/.internal/charts/types/FlowDiagram.ts","/**\r\n * Bullet module\r\n */\r\n\r\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\r\nimport { Bullet, IBulletProperties, IBulletAdapters, IBulletEvents } from \"./Bullet\";\r\nimport { Label } from \"../../core/elements/Label\";\r\nimport { registry } from \"../../core/Registry\";\r\nimport { color } from \"../../core/utils/Color\";\r\nimport { InterfaceColorSet } from \"../../core/utils/InterfaceColorSet\";\r\n\r\n\r\n/**\r\n * ============================================================================\r\n * REQUISITES\r\n * ============================================================================\r\n * @hidden\r\n */\r\n\r\n/**\r\n * Defines properties for [[Bullet]]\r\n */\r\nexport interface ILabelBulletProperties extends IBulletProperties { }\r\n\r\n/**\r\n * Defines events for [[Bullet]]\r\n */\r\nexport interface ILabelBulletEvents extends IBulletEvents { }\r\n\r\n/**\r\n * Defines adapters\r\n * Includes both the [[Adapter]] definitions and properties\r\n * @see {@link Adapter}\r\n */\r\nexport interface ILabelBulletAdapters extends IBulletAdapters, ILabelBulletProperties { }\r\n\r\n\r\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\r\n\r\n/**\r\n * Creates a bullet with a textual label.\r\n *\r\n * Uses [[Label]] instance to draw the label, so the label itself is\r\n * configurable.\r\n *\r\n * @see {@link IBulletEvents} for a list of available events\r\n * @see {@link IBulletAdapters} for a list of available Adapters\r\n * @todo Usage example\r\n * @important\r\n */\r\nexport class LabelBullet extends Bullet {\r\n\r\n\t/**\r\n\t * Defines available properties.\r\n\t */\r\n\tpublic _properties!: ILabelBulletProperties;\r\n\r\n\t/**\r\n\t * Defines available adapters.\r\n\t */\r\n\tpublic _adapter!: ILabelBulletAdapters;\r\n\r\n\t/**\r\n\t * Defines available events.\r\n\t */\r\n\tpublic _events!: ILabelBulletEvents;\r\n\r\n\t/**\r\n\t * A label (textual) element for the bullet.\r\n\t */\r\n\tpublic label: Label;\r\n\r\n\t/**\r\n\t * Constructor\r\n\t */\r\n\tconstructor() {\r\n\t\tsuper();\r\n\r\n\t\tthis.className = \"LabelBullet\";\r\n\r\n\t\tlet label = this.createChild(Label);\r\n\t\tlabel.shouldClone = false;\r\n\t\tlabel.verticalCenter = \"middle\";\r\n\t\tlabel.horizontalCenter = \"middle\";\r\n\t\tlabel.truncate = true;\r\n\t\tlabel.hideOversized = false;\r\n\r\n\t\tlabel.maxWidth = 500;\r\n\t\tlabel.maxHeight = 500;\r\n\r\n\t\tlabel.stroke = color();\r\n\t\tlabel.strokeOpacity = 0;\r\n\t\tlabel.fill = new InterfaceColorSet().getFor(\"text\");\r\n\r\n\t\tthis.events.on(\"maxsizechanged\", this.handleMaxSize, this, false);\r\n\r\n\t\tthis.label = label;\r\n\r\n\t\t// not good, as lineSeries will have labels somewhere in the middle.\r\n\t\t//this.locationX = 0.5;\r\n\t\t//this.locationY = 0.5;\r\n\r\n\t\tthis.applyTheme();\r\n\t}\r\n\r\n\tprotected handleMaxSize(){\r\n\t\tthis.label.maxWidth = this.maxWidth;\r\n\t\tthis.label.maxHeight = this.maxHeight;\r\n\t}\r\n\r\n\t/**\r\n\t * Copies all proprities and related stuff from another instance of\r\n\t * [[LabelBullet]].\r\n\t *\r\n\t * @param source Source element\r\n\t */\r\n\tpublic copyFrom(source: this): void {\r\n\t\tsuper.copyFrom(source);\r\n\t\tthis.label.copyFrom(source.label);\r\n\t}\r\n}\r\n\r\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\r\nregistry.registeredClasses[\"LabelBullet\"] = LabelBullet;\r\n\n\n\n// WEBPACK FOOTER //\n// ../../../../../src/.internal/charts/elements/LabelBullet.ts","/**\r\n * SankeyNode module\r\n */\r\n\r\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\r\nimport { FlowDiagramNode, IFlowDiagramNodeAdapters, IFlowDiagramNodeEvents, IFlowDiagramNodeProperties } from \"./FlowDiagramNode\";\r\nimport { SankeyDiagram, SankeyDiagramDataItem } from \"../types/SankeyDiagram\";\r\nimport { LabelBullet } from \"./LabelBullet\";\r\nimport { registry } from \"../../core/Registry\";\r\nimport { InterfaceColorSet } from \"../../core/utils/InterfaceColorSet\";\r\nimport * as $iter from \"../../core/utils/Iterator\";\r\nimport * as $type from \"../../core/utils/Type\";\r\nimport * as $utils from \"../../core/utils/Utils\";\r\n\r\n/**\r\n * ============================================================================\r\n * REQUISITES\r\n * ============================================================================\r\n * @hidden\r\n */\r\n\r\n/**\r\n * Defines properties for [[SankeyNode]].\r\n */\r\nexport interface ISankeyNodeProperties extends IFlowDiagramNodeProperties {\r\n\r\n\t/**\r\n\t * A level node is at. (0 - ...)\r\n\t */\r\n\tlevel?: number;\r\n}\r\n\r\n/**\r\n * Defines events for [[SankeyNode]].\r\n */\r\nexport interface ISankeyNodeEvents extends IFlowDiagramNodeEvents { }\r\n\r\n/**\r\n * Defines adapters for [[SankeyNode]].\r\n *\r\n * @see {@link Adapter}\r\n */\r\nexport interface ISankeyNodeAdapters extends IFlowDiagramNodeAdapters, ISankeyNodeProperties { }\r\n\r\n\r\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\r\n\r\n/**\r\n * Creates a node in a Sankey Diagram.\r\n *\r\n * A Sankey node is a block with a value, which represents its size on the\r\n * diagram.\r\n *\r\n * Nodes are connected via [[SankeyLink]] elements.\r\n *\r\n * @see {@link ISankeyNodeEvents} for a list of available events\r\n * @see {@link ISankeyNodeAdapters} for a list of available Adapters\r\n * @important\r\n */\r\nexport class SankeyNode extends FlowDiagramNode {\r\n\r\n\t/**\r\n\t * Defines available properties.\r\n\t */\r\n\tpublic _properties!: ISankeyNodeProperties;\r\n\r\n\t/**\r\n\t * Defines available adapters.\r\n\t */\r\n\tpublic _adapter!: ISankeyNodeAdapters;\r\n\r\n\t/**\r\n\t * Defines available events.\r\n\t */\r\n\tpublic _events!: ISankeyNodeEvents;\r\n\r\n\r\n\t/**\r\n\t * [nextInCoord description]\r\n\t *\r\n\t * @ignore Exclude from docs\r\n\t * @todo Description\r\n\t */\r\n\tpublic nextInCoord: number = 0;\r\n\r\n\t/**\r\n\t * [nextOutCoord description]\r\n\t *\r\n\t * @ignore Exclude from docs\r\n\t * @todo Description\r\n\t */\r\n\tpublic nextOutCoord: number = 0;\r\n\r\n\t/**\r\n\t * A chart instance this node is added to.\r\n\t */\r\n\tpublic chart: SankeyDiagram;\r\n\r\n\r\n\t/**\r\n\t * Defines the type of the [[SankeyDiagramDataItem]] used in the class.\r\n\t */\r\n\tpublic _dataItem: SankeyDiagramDataItem;\r\n\r\n\t/**\r\n\t * A label element which shows node's value.\r\n\t */\r\n\tpublic valueLabel: LabelBullet;\r\n\r\n\t/**\r\n\t * A label element which shows node's name.\r\n\t */\r\n\tpublic nameLabel: LabelBullet;\r\n\r\n\t/**\r\n\t * Constructor\r\n\t */\r\n\tconstructor() {\r\n\t\tsuper();\r\n\t\tthis.className = \"SankeyNode\";\r\n\r\n\t\tthis.width = 10;\r\n\t\tthis.height = 10;\r\n\r\n\t\tlet nameLabel = this.createChild(LabelBullet);\r\n\t\tnameLabel.shouldClone = false;\r\n\t\t//@should we auto update these locations if position is changed?\r\n\t\tnameLabel.locationX = 1;\r\n\t\tnameLabel.locationY = 0.5;\r\n\t\tnameLabel.label.text = \"{name}\";\r\n\r\n\t\t//nameLabel.label.textElement.hideOversized = false;\r\n\t\tnameLabel.width = 150;\r\n\t\tnameLabel.height = 150;\r\n\t\tnameLabel.label.horizontalCenter = \"left\";\r\n\t\tnameLabel.label.padding(0, 5, 0, 5);\r\n\t\tthis.nameLabel = nameLabel;\r\n\r\n\t\tlet valueLabel = this.createChild(LabelBullet);\r\n\t\tvalueLabel.shouldClone = false;\r\n\t\tvalueLabel.label.hideOversized = false;\r\n\t\tvalueLabel.locationX = 0.5;\r\n\t\tvalueLabel.locationY = 0.5;\r\n\t\tvalueLabel.width = 150;\r\n\t\tvalueLabel.height = 150;\r\n\t\t//valueLabel.label.text = \"{value}\";\r\n\t\tvalueLabel.label.horizontalCenter = \"middle\";\r\n\t\tthis.valueLabel = valueLabel;\r\n\r\n\t\tlet hiddenState = this.hiddenState;\r\n\t\thiddenState.properties.fill = new InterfaceColorSet().getFor(\"disabledBackground\");\r\n\t\thiddenState.properties.opacity = 0.5;\r\n\t\thiddenState.properties.visible = true;\r\n\r\n\t\tthis.background.hiddenState.copyFrom(hiddenState);\r\n\r\n\t}\r\n\r\n\r\n\t/**\r\n\t * Invalidates all links, attached to this node.\r\n\t *\r\n\t * @ignore Exclude from docs\r\n\t */\r\n\tpublic invalidateLinks(): void {\r\n\t\tsuper.invalidateLinks();\r\n\t\tthis.nextInCoord = 0;\r\n\t\tthis.nextOutCoord = 0;\r\n\t\tlet chart = this.chart;\r\n\r\n\t\tif (chart) {\r\n\t\t\tlet orientation = chart.orientation;\r\n\t\t\tif (this._incomingSorted) {\r\n\t\t\t\t$iter.each(this._incomingSorted, (dataItem) => {\r\n\t\t\t\t\tlet link = dataItem.link;\r\n\t\t\t\t\tlet value = dataItem.getWorkingValue(\"value\");\r\n\t\t\t\t\tif ($type.isNumber(value)) {\r\n\t\t\t\t\t\tlink.parent = this.chart.linksContainer;\r\n\r\n\t\t\t\t\t\tlet x: number;\r\n\t\t\t\t\t\tlet y: number;\r\n\t\t\t\t\t\tlet angle: number;\r\n\r\n\t\t\t\t\t\tif (orientation == \"horizontal\") {\r\n\t\t\t\t\t\t\tx = this.pixelX + this.dx;\r\n\t\t\t\t\t\t\ty = this.nextInCoord + this.pixelY + this.dy;\r\n\t\t\t\t\t\t\tangle = 0;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\ty = this.pixelY + this.dy;\r\n\t\t\t\t\t\t\tx = this.nextInCoord + this.pixelX + this.dx;\r\n\t\t\t\t\t\t\tangle = 90;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tlink.endX = x;\r\n\t\t\t\t\t\tlink.endY = y;\r\n\t\t\t\t\t\tlink.startAngle = angle;\r\n\t\t\t\t\t\tlink.endAngle = angle;\r\n\t\t\t\t\t\tlink.gradient.rotation = angle;\r\n\r\n\t\t\t\t\t\tlink.linkWidth = value * chart.valueHeight;\r\n\r\n\t\t\t\t\t\tif (!dataItem.fromNode) {\r\n\r\n\t\t\t\t\t\t\tif (orientation == \"horizontal\") {\r\n\t\t\t\t\t\t\t\tlink.maxWidth = 200;\r\n\t\t\t\t\t\t\t\tlink.startX = this.pixelX + this.dx - link.maxWidth;\r\n\t\t\t\t\t\t\t\tlink.startY = link.endY;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\t\tlink.maxHeight = 200;\r\n\t\t\t\t\t\t\t\tlink.startX = link.endX;\r\n\t\t\t\t\t\t\t\tlink.startY = this.pixelY + this.dy - link.maxHeight;\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t// TODO is this needed ?\r\n\t\t\t\t\t\t\t$utils.used(link.gradient);\r\n\r\n\t\t\t\t\t\t\tlink.fill = dataItem.toNode.color;\r\n\t\t\t\t\t\t\tlet stop = link.gradient.stops.getIndex(0);\r\n\t\t\t\t\t\t\tif (stop) {\r\n\t\t\t\t\t\t\t\tif (link.colorMode == \"gradient\") {\r\n\t\t\t\t\t\t\t\t\tstop.color = this.color;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tstop.opacity = 0;\r\n\t\t\t\t\t\t\t\tlink.fill = link.gradient;\r\n\t\t\t\t\t\t\t\tlink.stroke = link.gradient;\r\n\t\t\t\t\t\t\t\tlink.gradient.validate();\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t//link.validate();\r\n\t\t\t\t\t\tthis.nextInCoord += link.linkWidth;\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\t\t\t}\r\n\r\n\t\t\tif (this._outgoingSorted) {\r\n\t\t\t\t$iter.each(this._outgoingSorted, (dataItem) => {\r\n\t\t\t\t\tlet link = dataItem.link;\r\n\t\t\t\t\tlink.parent = this.chart.linksContainer;\r\n\t\t\t\t\tlet value = dataItem.getWorkingValue(\"value\");\r\n\t\t\t\t\tif ($type.isNumber(value)) {\r\n\t\t\t\t\t\tlet x: number;\r\n\t\t\t\t\t\tlet y: number;\r\n\t\t\t\t\t\tlet angle: number;\r\n\r\n\t\t\t\t\t\tif (orientation == \"horizontal\") {\r\n\t\t\t\t\t\t\tangle = 0;\r\n\t\t\t\t\t\t\tx = this.pixelX + this.pixelWidth + this.dx - 1;\r\n\t\t\t\t\t\t\ty = this.nextOutCoord + this.pixelY + this.dy;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\tangle = 90;\r\n\t\t\t\t\t\t\tx = this.nextOutCoord + this.pixelX + this.dx;\r\n\t\t\t\t\t\t\ty = this.pixelY + this.pixelHeight + this.dy - 1;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tlink.startX = x;\r\n\t\t\t\t\t\tlink.startY = y;\r\n\t\t\t\t\t\tlink.startAngle = angle;\r\n\t\t\t\t\t\tlink.endAngle = angle;\r\n\t\t\t\t\t\tlink.gradient.rotation = angle;\r\n\r\n\t\t\t\t\t\tlink.linkWidth = value * this.chart.valueHeight;\r\n\r\n\t\t\t\t\t\tif (!dataItem.toNode) {\r\n\t\t\t\t\t\t\tif (orientation == \"horizontal\") {\r\n\t\t\t\t\t\t\t\tlink.maxWidth = 200;\r\n\t\t\t\t\t\t\t\tlink.endX = this.pixelX + link.maxWidth + this.dx;\r\n\t\t\t\t\t\t\t\tlink.endY = link.startY;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\t\tlink.maxHeight = 200;\r\n\t\t\t\t\t\t\t\tlink.endX = link.startX;\r\n\t\t\t\t\t\t\t\tlink.endY = this.pixelY + link.maxHeight + this.dy;\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\tlink.opacity = this.opacity;\r\n\r\n\t\t\t\t\t\t\tlet stop = link.gradient.stops.getIndex(1);\r\n\t\t\t\t\t\t\tif (stop) {\r\n\t\t\t\t\t\t\t\tif (link.colorMode == \"gradient\") {\r\n\t\t\t\t\t\t\t\t\tstop.color = this.color;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tstop.opacity = 0;\r\n\t\t\t\t\t\t\t\tlink.fill = link.gradient;\r\n\t\t\t\t\t\t\t\tlink.stroke = link.gradient;\r\n\t\t\t\t\t\t\t\tlink.gradient.validate();\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t//link.validate();\r\n\t\t\t\t\t\tthis.nextOutCoord += link.linkWidth;\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tthis.positionBullet(this.nameLabel);\r\n\t\tthis.positionBullet(this.valueLabel);\r\n\t}\r\n\r\n\t/**\r\n\t * Positions the bullet so it is centered within the node element.\r\n\t *\r\n\t * @param bullet Target bullet\r\n\t */\r\n\tprotected positionBullet(bullet: LabelBullet) {\r\n\t\tif (bullet) {\r\n\t\t\tbullet.x = this.measuredWidth * bullet.locationX;\r\n\t\t\tbullet.y = this.measuredHeight * bullet.locationY;\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * A level node is displayed at. (0 - ...)\r\n\t *\r\n\t * Levels are measured from left to right.\r\n\t *\r\n\t * The nodes in the left-most column will have `level = 0`.\r\n\t *\r\n\t * Nodes in second column - `level = 1`, etc.\r\n\t *\r\n\t * @param value Level\r\n\t */\r\n\tpublic set level(value: number) {\r\n\t\tthis.setPropertyValue(\"level\", value, true);\r\n\t}\r\n\r\n\t/**\r\n\t * @return Level\r\n\t */\r\n\tpublic get level(): number {\r\n\t\treturn this.getPropertyValue(\"level\");\r\n\t}\r\n\r\n\t/**\r\n\t * Copies properties and labels from another [[SankeyNode]].\r\n\t *\r\n\t * @param source Source node\r\n\t */\r\n\tpublic copyFrom(source: this): void {\r\n\t\tsuper.copyFrom(source);\r\n\t\tthis.nameLabel.copyFrom(source.nameLabel);\r\n\t\tthis.valueLabel.copyFrom(source.valueLabel);\r\n\t}\r\n\r\n}\r\n\r\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\r\nregistry.registeredClasses[\"SankeyNode\"] = SankeyNode;\r\n\n\n\n// WEBPACK FOOTER //\n// ../../../../../src/.internal/charts/elements/SankeyNode.ts","/**\r\n * SankeyLink module\r\n */\r\n\r\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\r\nimport { SankeyDiagramDataItem, SankeyDiagram } from \"../types/SankeyDiagram\";\r\nimport { FlowDiagramLink, IFlowDiagramLinkAdapters, IFlowDiagramLinkEvents, IFlowDiagramLinkProperties } from \"./FlowDiagramLink\";\r\nimport { registry } from \"../../core/Registry\";\r\nimport { Polyspline } from \"../../core/elements/Polyspline\";\r\nimport { InterfaceColorSet } from \"../../core/utils/InterfaceColorSet\";\r\nimport * as $math from \"../../core/utils/Math\";\r\nimport * as $type from \"../../core/utils/Type\";\r\nimport * as $smoothing from \"../../core/rendering/Smoothing\";\r\nimport * as $path from \"../../core/rendering/Path\";\r\n\r\n\r\n/**\r\n * ============================================================================\r\n * REQUISITES\r\n * ============================================================================\r\n * @hidden\r\n */\r\n\r\n/**\r\n * Defines properties for [[SankeyLink]].\r\n */\r\nexport interface ISankeyLinkProperties extends IFlowDiagramLinkProperties {\r\n\r\n\t/**\r\n\t * [tension description]\r\n\t *\r\n\t * @todo Description\r\n\t */\r\n\ttension?: number;\r\n\r\n\t/**\r\n\t * [startX description]\r\n\t *\r\n\t * @todo Description\r\n\t */\r\n\tstartX?: number;\r\n\r\n\t/**\r\n\t * [startY description]\r\n\t *\r\n\t * @todo Description\r\n\t */\r\n\tstartY?: number;\r\n\r\n\t/**\r\n\t * [endX description]\r\n\t *\r\n\t * @todo Description\r\n\t */\r\n\tendX?: number;\r\n\r\n\t/**\r\n\t * [endY description]\r\n\t *\r\n\t * @todo Description\r\n\t */\r\n\tendY?: number;\r\n\r\n\t/**\r\n\t * [linkWidth description]\r\n\t *\r\n\t * @todo Description\r\n\t */\r\n\tlinkWidth?: number;\r\n\r\n\t/**\r\n\t * [controlPointDistance description]\r\n\t *\r\n\t * @todo Description\r\n\t */\r\n\tcontrolPointDistance?: number;\r\n}\r\n\r\n/**\r\n * Defines events for [[SankeyLink]].\r\n */\r\nexport interface ISankeyLinkEvents extends IFlowDiagramLinkEvents { }\r\n\r\n/**\r\n * Defines adapters for [[SankeyLink]].\r\n *\r\n * @see {@link Adapter}\r\n */\r\nexport interface ISankeyLinkAdapters extends IFlowDiagramLinkAdapters, ISankeyLinkProperties { }\r\n\r\n\r\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\r\n\r\n/**\r\n * This class creates a link (waved color-filled line) between two nodes in a\r\n * Sankey Diagram.\r\n *\r\n * @see {@link ISankeyLinkEvents} for a list of available events\r\n * @see {@link ISankeyLinkAdapters} for a list of available Adapters\r\n * @important\r\n */\r\nexport class SankeyLink extends FlowDiagramLink {\r\n\r\n\t/**\r\n\t * Defines available properties.\r\n\t */\r\n\tpublic _properties!: ISankeyLinkProperties;\r\n\r\n\t/**\r\n\t * Defines available adapters.\r\n\t */\r\n\tpublic _adapter!: ISankeyLinkAdapters;\r\n\r\n\t/**\r\n\t * Defines available events.\r\n\t */\r\n\tpublic _events!: ISankeyLinkEvents;\r\n\r\n\t/**\r\n\t * Defines a type of data item used by this class.\r\n\t */\r\n\tpublic _dataItem: SankeyDiagramDataItem;\r\n\r\n\t/**\r\n\t * Spline which goes through the middle of a link, used to calculate bullet and tooltip positions, invisible by default\r\n\t */\r\n\tpublic middleLine: Polyspline;\r\n\r\n\tpublic chart: SankeyDiagram;\r\n\r\n\t/**\r\n\t * Constructor\r\n\t */\r\n\tconstructor() {\r\n\t\tsuper();\r\n\t\tthis.className = \"SankeyLink\";\r\n\r\n\t\t// TODO can this be removed ?\r\n\t\tnew InterfaceColorSet();\r\n\r\n\t\tthis.tension = 0.8;\r\n\t\tthis.controlPointDistance = 0.2;\r\n\r\n\t\tthis.startAngle = 0;\r\n\t\tthis.endAngle = 0;\r\n\r\n\t\tthis.linkWidth = 0;\r\n\r\n\t\tthis.startX = 0;\r\n\t\tthis.endX = 0;\r\n\r\n\t\tthis.startY = 0;\r\n\t\tthis.endY = 0;\r\n\r\n\t\tthis.middleLine = this.createChild(Polyspline);\r\n\t\tthis.middleLine.shouldClone = false;\r\n\t\tthis.middleLine.strokeOpacity = 0;\r\n\r\n\t\tthis.applyTheme();\r\n\t}\r\n\r\n\tprotected makeBackwards() {\r\n\t\tif (this.states.getKey(\"backwards\") != undefined) {\r\n\t\t\tthis.setState(\"backwards\");\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * (Re)validates (redraws) the link.\r\n\t *\r\n\t * @ignore Exclude from docs\r\n\t */\r\n\tpublic validate() {\r\n\t\tsuper.validate();\r\n\r\n\t\tif (!this.isTemplate) {\r\n\r\n\t\t\tlet x0 = this.startX\r\n\t\t\tlet y0 = this.startY;\r\n\t\t\tlet x1 = this.endX;\r\n\t\t\tlet y1 = this.endY;\r\n\r\n\t\t\tif (this.states.getKey(\"backwards\")) {\r\n\t\t\t\tthis.setState(\"default\");\r\n\t\t\t}\r\n\r\n\t\t\tif (this.dataItem) {\r\n\t\t\t\tlet chart = this.dataItem.component;\r\n\r\n\t\t\t\tif (chart) {\r\n\t\t\t\t\tif (chart.orientation == \"horizontal\") {\r\n\t\t\t\t\t\tif (x1 < x0) {\r\n\t\t\t\t\t\t\t[x0, x1] = [x1, x0];\r\n\t\t\t\t\t\t\t[y0, y1] = [y1, y0];\r\n\t\t\t\t\t\t\tthis.makeBackwards();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse {\r\n\t\t\t\t\t\tif (y1 < y0) {\r\n\t\t\t\t\t\t\t[y0, y1] = [y1, y0];\r\n\t\t\t\t\t\t\t[x0, x1] = [x1, x0];\r\n\t\t\t\t\t\t\tthis.makeBackwards();\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\r\n\t\t\tif (!$type.isNumber(x1)) {\r\n\t\t\t\tx1 = x0;\r\n\t\t\t}\r\n\r\n\t\t\tif (!$type.isNumber(y1)) {\r\n\t\t\t\ty1 = y0;\r\n\t\t\t}\r\n\r\n\t\t\tlet startAngle = this.startAngle;\r\n\t\t\tlet endAngle = this.endAngle;\r\n\t\t\tlet w = this.linkWidth;\r\n\r\n\t\t\tlet path = \"\";\r\n\r\n\t\t\tlet xt0 = x0;\r\n\t\t\tlet yt0 = y0;\r\n\r\n\t\t\tlet xt1 = x1;\r\n\t\t\tlet yt1 = y1;\r\n\r\n\t\t\tlet xb0 = x0 + w * $math.sin(startAngle);\r\n\t\t\tlet xb1 = x1 + w * $math.sin(endAngle);\r\n\r\n\t\t\tlet yb0 = y0 + w * $math.cos(startAngle);\r\n\t\t\tlet yb1 = y1 + w * $math.cos(endAngle);\r\n\r\n\t\t\tlet xm0 = x0 + w / 2 * $math.sin(startAngle);\r\n\t\t\tlet xm1 = x1 + w / 2 * $math.sin(endAngle);\r\n\r\n\t\t\tlet ym0 = y0 + w / 2 * $math.cos(startAngle);\r\n\t\t\tlet ym1 = y1 + w / 2 * $math.cos(endAngle);\r\n\r\n\t\t\tthis.zIndex = this.zIndex || this.dataItem.index;\r\n\r\n\t\t\tlet tensionX = this.tension + (1 - this.tension) * $math.sin(startAngle);\r\n\t\t\tlet tensionY = this.tension + (1 - this.tension) * $math.cos(startAngle);\r\n\r\n\t\t\tthis.middleLine.tensionX = tensionX;\r\n\t\t\tthis.middleLine.tensionY = tensionY;\r\n\r\n\t\t\tif ($type.isNumber(w) && ($type.isNumber(x0) && $type.isNumber(x1) && $type.isNumber(y0) && $type.isNumber(y1))) {\r\n\r\n\t\t\t\t// solves issues with gradient fill of straight lines\r\n\t\t\t\tif ($math.round(xt0, 3) == $math.round(xt1, 3)) {\r\n\t\t\t\t\txt1 += 0.01;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif ($math.round(yt0, 3) == $math.round(yt1, 3)) {\r\n\t\t\t\t\tyt1 += 0.01;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif ($math.round(xb0, 3) == $math.round(xb1, 3)) {\r\n\t\t\t\t\txb1 += 0.01;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif ($math.round(yb0, 3) == $math.round(yb1, 3)) {\r\n\t\t\t\t\tyb1 += 0.01;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tlet minX = Math.min(xb0, xb1, xt0, xt1);\r\n\t\t\t\tlet minY = Math.min(yb0, yb1, yt0, yt1);\r\n\t\t\t\tlet maxX = Math.max(xb0, xb1, xt0, xt1);\r\n\t\t\t\tlet maxY = Math.max(yb0, yb1, yt0, yt1);\r\n\r\n\t\t\t\tthis._bbox = {\r\n\t\t\t\t\tx: minX,\r\n\t\t\t\t\ty: minY,\r\n\t\t\t\t\twidth: maxX - minX,\r\n\t\t\t\t\theight: maxY - minY\r\n\t\t\t\t};\r\n\r\n\t\t\t\tlet cpd = this.controlPointDistance;\r\n\r\n\t\t\t\tlet kxt0 = xt0 + (xt1 - xt0) * cpd * $math.cos(startAngle);\r\n\t\t\t\tlet kyt0 = yt0 + (yt1 - yt0) * cpd * $math.sin(startAngle);\r\n\r\n\t\t\t\tlet kxt1 = xt1 - (xt1 - xt0) * cpd * $math.cos(endAngle);\r\n\t\t\t\tlet kyt1 = yt1 - (yt1 - yt0) * cpd * $math.sin(endAngle);\r\n\r\n\t\t\t\tlet kxm0 = xm0 + (xm1 - xm0) * cpd * $math.cos(startAngle);\r\n\t\t\t\tlet kym0 = ym0 + (ym1 - ym0) * cpd * $math.sin(startAngle);\r\n\r\n\t\t\t\tlet kxm1 = xm1 - (xm1 - xm0) * cpd * $math.cos(endAngle);\r\n\t\t\t\tlet kym1 = ym1 - (ym1 - ym0) * cpd * $math.sin(endAngle);\r\n\r\n\t\t\t\tlet angle = $math.getAngle({ x: kxt0, y: kyt0 }, { x: kxt1, y: kyt1 });\r\n\r\n\t\t\t\tlet dx = (w / $math.cos(angle) - w) / $math.tan(angle) * $math.cos(startAngle);\r\n\t\t\t\tlet dy = (w / $math.sin(angle) - w) * $math.tan(angle) * $math.sin(startAngle);\r\n\r\n\t\t\t\tlet kxb0 = -dx / 2 + xb0 + (xb1 - xb0) * cpd * $math.cos(startAngle);\r\n\t\t\t\tlet kyb0 = -dy / 2 + yb0 + (yb1 - yb0) * cpd * $math.sin(startAngle);\r\n\r\n\t\t\t\tlet kxb1 = -dx / 2 + xb1 - (xb1 - xb0) * cpd * $math.cos(endAngle);\r\n\t\t\t\tlet kyb1 = -dy / 2 + yb1 - (yb1 - yb0) * cpd * $math.sin(endAngle);\r\n\r\n\r\n\t\t\t\tthis.middleLine.segments = [[{ x: xm0, y: ym0 }, { x: kxm0, y: kym0 }, { x: kxm1, y: kym1 }, { x: xm1, y: ym1 }]];\r\n\r\n\t\t\t\tkxt0 += dx / 2;\r\n\t\t\t\tkyt0 += dy / 2;\r\n\r\n\t\t\t\tkxt1 += dx / 2;\r\n\t\t\t\tkyt1 += dy / 2;\r\n\r\n\t\t\t\tpath += $path.moveTo({ x: xt0, y: yt0 });\r\n\t\t\t\tpath += new $smoothing.Tension(tensionX, tensionY).smooth([{ x: xt0, y: yt0 }, { x: kxt0, y: kyt0 }, { x: kxt1, y: kyt1 }, { x: xt1, y: yt1 }]);\r\n\t\t\t\tpath += $path.lineTo({ x: xb1, y: yb1 });\r\n\t\t\t\tpath += new $smoothing.Tension(tensionX, tensionY).smooth([{ x: xb1, y: yb1 }, { x: kxb1, y: kyb1 }, { x: kxb0, y: kyb0 }, { x: xb0, y: yb0 }]);\r\n\t\t\t\tpath += $path.closePath();\r\n\t\t\t}\r\n\r\n\t\t\tthis.link.path = path;\r\n\r\n\t\t\tif (this.maskBullets) {\r\n\t\t\t\tthis.bulletsMask.path = path;\r\n\t\t\t\tthis.bulletsContainer.mask = this.bulletsMask;\r\n\t\t\t}\r\n\t\t\tthis.positionBullets();\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * [startX description]\r\n\t *\r\n\t * @todo Description\r\n\t * @param value Start X\r\n\t */\r\n\tpublic set startX(value: number) {\r\n\t\tthis.setPropertyValue(\"startX\", value, true);\r\n\t}\r\n\r\n\t/**\r\n\t * @return Start X\r\n\t */\r\n\tpublic get startX(): number {\r\n\t\treturn this.getPropertyValue(\"startX\");\r\n\t}\r\n\r\n\t/**\r\n\t * [endX description]\r\n\t *\r\n\t * @todo Description\r\n\t * @param value End X\r\n\t */\r\n\tpublic set endX(value: number) {\r\n\t\tthis.setPropertyValue(\"endX\", value, true);\r\n\t}\r\n\r\n\t/**\r\n\t * @return End X\r\n\t */\r\n\tpublic get endX(): number {\r\n\t\treturn this.getPropertyValue(\"endX\");\r\n\t}\r\n\r\n\t/**\r\n\t * [startY description]\r\n\t *\r\n\t * @todo Description\r\n\t * @param value Start Y\r\n\t */\r\n\tpublic set startY(value: number) {\r\n\t\tthis.setPropertyValue(\"startY\", value, true);\r\n\t}\r\n\r\n\t/**\r\n\t * @return Start Y\r\n\t */\r\n\tpublic get startY(): number {\r\n\t\treturn this.getPropertyValue(\"startY\");\r\n\t}\r\n\r\n\t/**\r\n\t * [endY description]\r\n\t *\r\n\t * @todo Description\r\n\t * @param value End Y\r\n\t */\r\n\tpublic set endY(value: number) {\r\n\t\tthis.setPropertyValue(\"endY\", value, true);\r\n\t}\r\n\r\n\t/**\r\n\t * @return End Y\r\n\t */\r\n\tpublic get endY(): number {\r\n\t\treturn this.getPropertyValue(\"endY\");\r\n\t}\r\n\r\n\t/**\r\n\t * [linkWidth description]\r\n\t *\r\n\t * @todo Description\r\n\t * @param value [description]\r\n\t */\r\n\tpublic set linkWidth(value: number) {\r\n\t\tthis.setPropertyValue(\"linkWidth\", value, true);\r\n\t}\r\n\r\n\t/**\r\n\t * @return [description]\r\n\t */\r\n\tpublic get linkWidth(): number {\r\n\t\treturn this.getPropertyValue(\"linkWidth\");\r\n\t}\r\n\r\n\t/**\r\n\t * Distance of control point of a link, defines relative distance from a node at which linke should bend\r\n\t * @default 0.2\r\n\t * @param value\r\n\t */\r\n\tpublic set controlPointDistance(value: number) {\r\n\t\tthis.setPropertyValue(\"controlPointDistance\", value, true);\r\n\t}\r\n\r\n\t/**\r\n\t * @return relative control point distance\r\n\t */\r\n\tpublic get controlPointDistance(): number {\r\n\t\treturn this.getPropertyValue(\"controlPointDistance\");\r\n\t}\r\n\r\n\t/**\r\n\t * Tension of a spline, 1 would make the link to have sharp edges\r\n\t * @default 0.8\r\n\t * @param value\r\n\t */\r\n\tpublic set tension(value: number) {\r\n\t\tthis.setPropertyValue(\"tension\", value, true);\r\n\t}\r\n\r\n\t/**\r\n\t * @return tension value\r\n\t */\r\n\tpublic get tension(): number {\r\n\t\treturn this.getPropertyValue(\"tension\");\r\n\t}\r\n\r\n}\r\n\r\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\r\nregistry.registeredClasses[\"SankeyLink\"] = SankeyLink;\r\n\n\n\n// WEBPACK FOOTER //\n// ../../../../../src/.internal/charts/elements/SankeyLink.ts","/**\r\n * Sankey diagram module.\r\n */\r\n\r\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\r\nimport { FlowDiagram, FlowDiagramDataItem, IFlowDiagramAdapters, IFlowDiagramDataFields, IFlowDiagramEvents, IFlowDiagramProperties } from \"./FlowDiagram\";\r\nimport { percent } from \"../../core/utils/Percent\";\r\nimport { registry } from \"../../core/Registry\";\r\nimport { SankeyNode } from \"../elements/SankeyNode\";\r\nimport { SankeyLink } from \"../elements/SankeyLink\";\r\nimport { Animation } from \"../../core/utils/Animation\";\r\nimport { Orientation } from \"../../core/defs/Orientation\";\r\nimport * as $iter from \"../../core/utils/Iterator\";\r\nimport * as $math from \"../../core/utils/Math\";\r\nimport * as $type from \"../../core/utils/Type\";\r\nimport * as $object from \"../../core/utils/Object\";\r\n\r\n\r\n/**\r\n * ============================================================================\r\n * DATA ITEM\r\n * ============================================================================\r\n * @hidden\r\n */\r\n\r\n//@todo rearange notes after dragged\r\n\r\n/**\r\n * Defines a [[DataItem]] for [[SankeyDiagram]].\r\n *\r\n * @see {@link DataItem}\r\n */\r\nexport class SankeyDiagramDataItem extends FlowDiagramDataItem {\r\n\r\n\t/**\r\n\t * Defines a type of [[Component]] this data item is used for.\r\n\t */\r\n\tpublic _component!: SankeyDiagram;\r\n\r\n\t/**\r\n\t * An a link element, connecting two nodes.\r\n\t */\r\n\tpublic _link: SankeyLink;\r\n\r\n\t/**\r\n\t * An origin node.\r\n\t */\r\n\tpublic fromNode: SankeyNode;\r\n\r\n\t/**\r\n\t * A destination node.\r\n\t */\r\n\tpublic toNode: SankeyNode;\r\n\r\n\t/**\r\n\t * Constructor\r\n\t */\r\n\tconstructor() {\r\n\t\tsuper();\r\n\t\tthis.className = \"SankeyDiagramDataItem\";\r\n\t\tthis.applyTheme();\r\n\t}\r\n}\r\n\r\n\r\n/**\r\n * ============================================================================\r\n * REQUISITES\r\n * ============================================================================\r\n * @hidden\r\n */\r\n\r\n/**\r\n * Defines data fields for [[SankeyDiagram]].\r\n */\r\nexport interface ISankeyDiagramDataFields extends IFlowDiagramDataFields {\r\n\r\n\t/**\r\n\t * Name of the source node.\r\n\t */\r\n\tfromName?: string;\r\n\r\n\t/**\r\n\t * Name of the target node.\r\n\t */\r\n\ttoName?: string;\r\n\r\n\t/**\r\n\t * Value of the link between two nodes.\r\n\t */\r\n\tvalue?: string;\r\n\r\n\t/**\r\n\t * Color of a from node\r\n\t */\r\n\tcolor?: string;\r\n}\r\n\r\n/**\r\n * Defines properties for [[SankeyDiagram]]\r\n */\r\nexport interface ISankeyDiagramProperties extends IFlowDiagramProperties {\r\n\r\n\t/**\r\n\t * Sort nodes by name or value or do not sort at all\r\n\t */\r\n\tnodeAlign?: \"top\" | \"bottom\" | \"middle\";\r\n\r\n\r\n\t/**\r\n\t * Orientation of the chart.\r\n\t */\r\n\torientation?: Orientation;\r\n}\r\n\r\n/**\r\n * Defines events for [[SankeyDiagram]].\r\n */\r\nexport interface ISankeyDiagramEvents extends IFlowDiagramEvents { }\r\n\r\n/**\r\n * Defines adapters for [[SankeyDiagram]].\r\n *\r\n * @see {@link Adapter}\r\n */\r\nexport interface ISankeyDiagramAdapters extends IFlowDiagramAdapters, ISankeyDiagramProperties { }\r\n\r\n\r\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\r\n\r\n/**\r\n * Creates a Sankey Diagram chart.\r\n *\r\n * @see {@link ISankeyDiagramEvents} for a list of available Events\r\n * @see {@link ISankeyDiagramAdapters} for a list of available Adapters\r\n * @see {@link https://www.amcharts.com/docs/v4/chart-types/sankey-diagram/} for documentation\r\n * @important\r\n */\r\nexport class SankeyDiagram extends FlowDiagram {\r\n\r\n\r\n\t/**\r\n\t * Defines a type for the DataItem.\r\n\t */\r\n\tpublic _dataItem: SankeyDiagramDataItem;\r\n\r\n\t/**\r\n\t * Defines available data fields.\r\n\t */\r\n\tpublic _dataFields: ISankeyDiagramDataFields;\r\n\r\n\t/**\r\n\t * Defines available properties.\r\n\t */\r\n\tpublic _properties!: ISankeyDiagramProperties;\r\n\r\n\t/**\r\n\t * Defines available adapters.\r\n\t */\r\n\tpublic _adapter!: ISankeyDiagramAdapters;\r\n\r\n\t/**\r\n\t * Defines available events.\r\n\t */\r\n\tpublic _events!: ISankeyDiagramEvents;\r\n\r\n\t/**\r\n\t * An a link element, connecting two nodes.\r\n\t */\r\n\tpublic _link: SankeyLink;\r\n\r\n\t/**\r\n\t * @todo Description\r\n\t */\r\n\tprotected _levelSum: { [index: number]: number };\r\n\r\n\t/**\r\n\t * @todo Description\r\n\t */\r\n\tprotected _levelNodesCount: { [index: number]: number };\r\n\r\n\t/**\r\n\t */\r\n\tpublic _node: SankeyNode;\r\n\r\n\t/**\r\n\t * [maxSum description]\r\n\t *\r\n\t * @ignore Exclude from docs\r\n\t * @todo Description\r\n\t */\r\n\tpublic maxSum: number;\r\n\r\n\t/**\r\n\t * level with max sum\r\n\t */\r\n\tprotected _maxSumLevel: number;\r\n\r\n\t/**\r\n\t * [valueHeight description]\r\n\t *\r\n\t * @ignore Exclude from docs\r\n\t * @todo Description\r\n\t */\r\n\tprotected _valueHeight: number;\r\n\r\n\t/**\r\n\t * A total number of levels, present on this chart.\r\n\t */\r\n\tprotected _levelCount: number;\r\n\r\n\t/**\r\n\t * Sorted nodes iterator.\r\n\t *\r\n\t * @ignore\r\n\t */\r\n\tprotected _sorted: $iter.Iterator<[string, this[\"_node\"]]>;\r\n\r\n\tprotected _heightAnimation: Animation;\r\n\r\n\tprotected _level: number;\r\n\r\n\tprotected _counter: number;\r\n\r\n\r\n\t/**\r\n\t * Constructor\r\n\t */\r\n\tconstructor() {\r\n\r\n\t\t// Init\r\n\t\tsuper();\r\n\t\tthis.className = \"SankeyDiagram\";\r\n\t\tthis.orientation = \"horizontal\";\r\n\t\tthis.nodeAlign = \"middle\";\r\n\r\n\t\tthis.nodesContainer.width = percent(100);\r\n\t\tthis.nodesContainer.height = percent(100);\r\n\r\n\t\tthis.linksContainer.width = percent(100);\r\n\t\tthis.linksContainer.height = percent(100);\r\n\r\n\t\t// Apply theme\r\n\t\tthis.applyTheme();\r\n\t}\r\n\r\n\t/**\r\n\t * (Re)validates chart's data, effectively causing the chart to redraw.\r\n\t *\r\n\t * @ignore Exclude from docs\r\n\t */\r\n\tpublic validateData(): void {\r\n\t\tthis._valueHeight = undefined;\t\t\r\n\t\tsuper.validateData();\r\n\r\n\t\tthis._levelCount = 0;\r\n\r\n\t\tthis.nodes.each((key, node) => {\r\n\t\t\tnode.level = undefined;\r\n\t\t});\r\n\r\n\t\tthis.nodes.each((key, node) => {\r\n\t\t\tnode.level = this.getNodeLevel(node, 0);\r\n\t\t\tthis._levelCount = $math.max(this._levelCount, node.level);\r\n\t\t});\r\n\t}\r\n\r\n\t/**\r\n\t * Returns node's highest level.\r\n\t *\r\n\t * @param node Node\r\n\t * @param level Current level\r\n\t * @return New level\r\n\t */\r\n\tprotected getNodeLevel(node: this[\"_node\"], level: number): number {\r\n\t\tlet levels: number[] = [level];\r\n\t\t$iter.each(node.incomingDataItems.iterator(), (link) => {\r\n\t\t\tif (link.fromNode) {\r\n\t\t\t\tif ($type.isNumber(link.fromNode.level)) {\r\n\t\t\t\t\tlevels.push(link.fromNode.level + 1);\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tthis._counter = 0;\r\n\t\t\t\t\tthis.checkLoop(link.fromNode);\r\n\t\t\t\t\tif (this._counter < this.dataItems.length) {\r\n\t\t\t\t\t\tlevels.push(this.getNodeLevel(link.fromNode, level + 1));\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t})\r\n\r\n\t\treturn Math.max(...levels);\r\n\t}\r\n\r\n\t/**\r\n\t * Checks if there's no loop in the ancestor chain.\r\n\t * \r\n\t * @param node Node\r\n\t */\r\n\tprotected checkLoop(node: this[\"_node\"]): void {\r\n\t\tthis._counter++;\r\n\r\n\t\tif (this._counter > this.dataItems.length) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t$iter.each(node.incomingDataItems.iterator(), (link) => {\r\n\t\t\tthis.checkLoop(link.fromNode);\r\n\t\t})\r\n\r\n\t}\r\n\r\n\r\n\t/**\r\n\t * Calculates relation between pixel height and total value.\r\n\t *\r\n\t * In Sankey the actual thickness of links and height of nodes will depend\r\n\t * on their values.\r\n\t */\r\n\tprotected calculateValueHeight() {\r\n\t\t// calculate sums of each level\r\n\t\tthis._levelSum = {};\r\n\t\tthis._levelNodesCount = {};\r\n\t\tthis.maxSum = 0;\r\n\r\n\t\tlet total = this.dataItem.values.value.sum;\r\n\r\n\t\t$iter.each(this._sorted, (strNode) => {\r\n\t\t\tlet node = strNode[1];\r\n\t\t\tthis.getNodeValue(node);\r\n\t\t});\r\n\r\n\t\tthis.nodes.each((key, node) => {\r\n\t\t\tlet level = node.level;\r\n\r\n\t\t\tlet value = Math.max(node.totalIncoming, node.totalOutgoing);\r\n\r\n\r\n\t\t\tif (value / total < this.minNodeSize) {\r\n\t\t\t\tvalue = total * this.minNodeSize;\r\n\t\t\t}\r\n\r\n\t\t\tif ($type.isNumber(this._levelSum[level])) {\r\n\t\t\t\tthis._levelSum[level] += value;\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tthis._levelSum[level] = value;\r\n\t\t\t}\r\n\r\n\t\t\tif ($type.isNumber(this._levelNodesCount[level])) {\r\n\t\t\t\tthis._levelNodesCount[level]++;\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tthis._levelNodesCount[level] = 1;\r\n\t\t\t}\r\n\t\t});\r\n\r\n\r\n\t\tlet availableHeight: number;\r\n\t\tif (this.orientation == \"horizontal\") {\r\n\t\t\tavailableHeight = this.chartContainer.maxHeight - 1;\r\n\t\t}\r\n\t\telse {\r\n\t\t\tavailableHeight = this.chartContainer.maxWidth - 1;\r\n\t\t}\r\n\r\n\r\n\t\tlet maxSumLevel: number;\r\n\t\tlet minHeight: number;\r\n\r\n\t\t$object.each(this._levelSum, (key, value) => {\r\n\t\t\tlet realValue = value;\r\n\r\n\t\t\tlet levelNodeCount = this._levelNodesCount[key];\r\n\t\t\tlet valueHeight = (availableHeight - (levelNodeCount - 1) * this.nodePadding) / realValue;\r\n\r\n\t\t\tif (valueHeight == Infinity) {\r\n\t\t\t\tvalueHeight = 0;\r\n\t\t\t}\r\n\r\n\t\t\tif (minHeight > valueHeight || !$type.isNumber(minHeight)) {\r\n\t\t\t\tminHeight = valueHeight;\r\n\t\t\t\tthis.maxSum = realValue;\r\n\t\t\t\tmaxSumLevel = $type.toNumber(key);\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tthis._maxSumLevel = maxSumLevel;\r\n\r\n\t\tlet maxSumLevelNodeCount = this._levelNodesCount[this._maxSumLevel];\r\n\r\n\t\tlet valueHeight = (availableHeight - (maxSumLevelNodeCount - 1) * this.nodePadding) / this.maxSum;\r\n\r\n\t\tif (valueHeight == Infinity) {\r\n\t\t\tvalueHeight = 0;\r\n\t\t}\r\n\r\n\t\tif (!$type.isNumber(this.valueHeight)) {\r\n\t\t\tthis.valueHeight = valueHeight;\r\n\t\t}\r\n\t\telse {\r\n\t\t\tlet finalHeight;\r\n\t\t\ttry {\r\n\t\t\t\tfinalHeight = this._heightAnimation.animationOptions[0].to;\r\n\t\t\t}\r\n\t\t\tcatch (err) {\r\n\r\n\t\t\t}\r\n\t\t\t// without animations it will be non-smooth as maxValue jumps from one column to another\r\n\t\t\tif (finalHeight != valueHeight) {\r\n\t\t\t\tlet duration = this.interpolationDuration;\r\n\t\t\t\ttry {\r\n\t\t\t\t\tduration = this.nodes.template.states.getKey(\"active\").transitionDuration;\r\n\t\t\t\t}\r\n\t\t\t\tcatch (err) {\r\n\r\n\t\t\t\t}\r\n\r\n\t\t\t\tthis._heightAnimation = new Animation(this, { property: \"valueHeight\", from: this.valueHeight, to: valueHeight }, duration, this.interpolationEasing).start();\r\n\t\t\t\tthis._disposers.push(this._heightAnimation);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Redraws the chart.\r\n\t *\r\n\t * @ignore Exclude from docs\r\n\t */\r\n\tpublic validate(): void {\r\n\t\tsuper.validate();\r\n\r\n\t\tthis.calculateValueHeight();\r\n\r\n\t\tlet container = this.nodesContainer;\r\n\r\n\t\tlet nextCoordinate: { [index: number]: number } = {};\r\n\r\n\t\tlet maxSumLevelNodeCount = this._levelNodesCount[this._maxSumLevel];\r\n\r\n\t\tlet total = this.dataItem.values.value.sum;\r\n\r\n\t\tlet availableHeight: number;\r\n\t\tif (this.orientation == \"horizontal\") {\r\n\t\t\tavailableHeight = this.chartContainer.maxHeight - 1;\r\n\t\t}\r\n\t\telse {\r\n\t\t\tavailableHeight = this.chartContainer.maxWidth - 1;\r\n\t\t}\r\n\r\n\t\t$iter.each(this._sorted, (strNode) => {\r\n\t\t\tlet node = strNode[1];\r\n\t\t\tlet level = node.level;\r\n\t\t\tlet levelCoordinate: number = 0;\r\n\r\n\t\t\tlet nodeCount = this._levelNodesCount[level];\r\n\r\n\t\t\tswitch (this.nodeAlign) {\r\n\t\t\t\tcase \"bottom\":\r\n\t\t\t\t\tlevelCoordinate = (this.maxSum - this._levelSum[level]) * this.valueHeight - (nodeCount - maxSumLevelNodeCount) * this.nodePadding;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"middle\":\r\n\t\t\t\t\tlevelCoordinate = (this.maxSum - this._levelSum[level]) * this.valueHeight / 2 - (nodeCount - maxSumLevelNodeCount) * this.nodePadding / 2;\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t\tif (this.maxSum == 0) {\r\n\t\t\t\tswitch (this.nodeAlign) {\r\n\t\t\t\t\tcase \"bottom\":\r\n\t\t\t\t\t\tlevelCoordinate = availableHeight - nodeCount * (this.minNodeSize * availableHeight + this.nodePadding);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase \"middle\":\r\n\t\t\t\t\t\tlevelCoordinate = availableHeight / 2 - nodeCount / 2 * (this.minNodeSize * availableHeight + this.nodePadding);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tnode.parent = container;\r\n\r\n\t\t\tlet delta: number;\r\n\t\t\tlet x: number;\r\n\t\t\tlet y: number;\r\n\r\n\t\t\tlet value = Math.max(node.totalIncoming, node.totalOutgoing);\r\n\r\n\t\t\tif (value / total < this.minNodeSize) {\r\n\t\t\t\tvalue = total * this.minNodeSize;\r\n\t\t\t}\r\n\r\n\t\t\tif (this.orientation == \"horizontal\") {\r\n\t\t\t\tdelta = (this.innerWidth - node.pixelWidth) / this._levelCount;\r\n\r\n\t\t\t\tx = delta * node.level;\r\n\t\t\t\ty = nextCoordinate[level] || levelCoordinate;\r\n\r\n\t\t\t\tlet h = value * this.valueHeight;\r\n\r\n\t\t\t\tif (total == 0 && h == 0) {\r\n\t\t\t\t\th = this.minNodeSize * availableHeight;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tnode.height = h;\r\n\t\t\t\tnode.minX = x;\r\n\t\t\t\tnode.maxX = x;\r\n\t\t\t\tnextCoordinate[level] = y + h + this.nodePadding;\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tdelta = (this.innerHeight - node.pixelHeight) / this._levelCount;\r\n\r\n\t\t\t\tx = nextCoordinate[level] || levelCoordinate;\r\n\t\t\t\ty = delta * node.level;\r\n\r\n\t\t\t\tlet w = value * this.valueHeight;\r\n\r\n\t\t\t\tif (total == 0 && w == 0) {\r\n\t\t\t\t\tw = this.minNodeSize * availableHeight;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tnode.width = w;\r\n\t\t\t\tnode.minY = y;\r\n\t\t\t\tnode.maxY = y;\r\n\t\t\t\tnextCoordinate[level] = x + w + this.nodePadding;\r\n\t\t\t}\r\n\t\t\tnode.x = x;\r\n\t\t\tnode.y = y;\r\n\t\t});\r\n\t}\r\n\r\n\t/**\r\n\t * Performs actual operations to reveal this element.\r\n\t *\r\n\t * @ignore Exclude from docs\r\n\t * @param duration Fade in duration (ms)\r\n\t * @return Fade in duration (ms)\r\n\t */\r\n\tprotected showReal(duration?: number): $type.Optional {\r\n\r\n\t\tif (this.preventShow) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tif (this.interpolationDuration > 0) {\r\n\t\t\tlet container = this.nodesContainer;\r\n\r\n\t\t\tlet i: number = 0;\r\n\r\n\t\t\t$iter.each(this.links.iterator(), (link) => {\r\n\t\t\t\tlink.hide(0);\r\n\t\t\t})\r\n\r\n\t\t\t$iter.each(this._sorted, (strNode) => {\r\n\r\n\t\t\t\tlet node = strNode[1];\r\n\r\n\t\t\t\tlet property: \"dx\" | \"dy\";\r\n\r\n\t\t\t\tif (this.orientation == \"horizontal\") {\r\n\t\t\t\t\tnode.dx = -(container.pixelWidth - node.pixelWidth) / Math.max(this._levelCount, 1);\r\n\t\t\t\t\tproperty = \"dx\";\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tnode.dy = -(container.pixelHeight - node.pixelHeight) / Math.max(this._levelCount, 1);\r\n\t\t\t\t\tproperty = \"dy\";\r\n\t\t\t\t}\r\n\r\n\t\t\t\tlet delay = 0;\r\n\t\t\t\tlet duration = this.interpolationDuration;\r\n\t\t\t\tif (this.sequencedInterpolation) {\r\n\t\t\t\t\tdelay = this.sequencedInterpolationDelay * i + duration * i / $iter.length(this.nodes.iterator());\r\n\t\t\t\t}\r\n\r\n\t\t\t\tnode.opacity = 0;\r\n\t\t\t\tnode.invalidateLinks();\r\n\r\n\t\t\t\tnode.animate([{ property: \"opacity\", from: 0, to: 1 }, { property: property, to: 0 }], this.interpolationDuration, this.interpolationEasing).delay(delay);\r\n\r\n\t\t\t\t$iter.each(node.outgoingDataItems.iterator(), (dataItem) => {\r\n\t\t\t\t\tlet animation = dataItem.link.show(this.interpolationDuration);\r\n\t\t\t\t\tif (animation && !animation.isFinished()) {\r\n\t\t\t\t\t\tanimation.delay(delay);\r\n\t\t\t\t\t}\r\n\t\t\t\t})\r\n\r\n\t\t\t\t$iter.each(node.incomingDataItems.iterator(), (dataItem) => {\r\n\t\t\t\t\tif (!dataItem.fromNode) {\r\n\t\t\t\t\t\tlet animation = dataItem.link.show(this.interpolationDuration);\r\n\t\t\t\t\t\tif (animation && !animation.isFinished()) {\r\n\t\t\t\t\t\t\tanimation.delay(delay);\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\ti++;\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\treturn super.showReal();\r\n\t}\r\n\r\n\t/**\r\n\t * Changes the sort type of the nodes.\r\n\t *\r\n\t * This will actually reshuffle nodes using nice animation.\r\n\t */\r\n\tprotected changeSorting() {\r\n\t\tthis.sortNodes();\r\n\r\n\t\tlet nextCoordinate: { [index: number]: number } = {};\r\n\r\n\t\t$iter.each(this._sorted, (strNode) => {\r\n\t\t\tlet node = strNode[1];\r\n\t\t\tlet level = node.level;\r\n\r\n\t\t\tlet levelCoordinate = (this.maxSum - this._levelSum[level]) * this.valueHeight / 2;\r\n\r\n\t\t\tlet property: \"x\" | \"y\";\r\n\t\t\tlet nodeHeight: number;\r\n\t\t\tif (this.orientation == \"horizontal\") {\r\n\t\t\t\tproperty = \"y\";\r\n\t\t\t\tnodeHeight = node.pixelHeight;\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tproperty = \"x\";\r\n\t\t\t\tnodeHeight = node.pixelWidth;\r\n\t\t\t}\r\n\r\n\t\t\tnode.animate({ property: property, to: nextCoordinate[level] || levelCoordinate }, this.interpolationDuration, this.interpolationEasing);\r\n\t\t\tnextCoordinate[level] = (nextCoordinate[level] || levelCoordinate) + nodeHeight + this.nodePadding;\r\n\r\n\t\t\tnode.invalidateLinks();\r\n\t\t});\r\n\t}\r\n\r\n\t/**\r\n\t * Sets defaults that instantiate some objects that rely on parent, so they\r\n\t * cannot be set in constructor.\r\n\t */\r\n\tprotected applyInternalDefaults(): void {\r\n\r\n\t\tsuper.applyInternalDefaults();\r\n\r\n\t\t// Add a default screen reader title for accessibility\r\n\t\t// This will be overridden in screen reader if there are any `titles` set\r\n\t\tif (!$type.hasValue(this.readerTitle)) {\r\n\t\t\tthis.readerTitle = this.language.translate(\"Sankey diagram\");\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Creates and returns a new data item.\r\n\t *\r\n\t * @return Data item\r\n\t */\r\n\tprotected createDataItem(): this[\"_dataItem\"] {\r\n\t\treturn new SankeyDiagramDataItem();\r\n\t}\r\n\r\n\t/**\r\n\t * How to align nodes. In case layout is vertical, top means left and bottom means right\r\n\t *\r\n\t * @param value Node sorting\r\n\t */\r\n\tpublic set nodeAlign(value: \"top\" | \"middle\" | \"bottom\") {\r\n\t\tthis.setPropertyValue(\"nodeAlign\", value);\r\n\t\tthis.changeSorting();\r\n\t}\r\n\r\n\t/**\r\n\t * @returns Returns nodeAlign value\r\n\t */\r\n\tpublic get nodeAlign(): \"top\" | \"middle\" | \"bottom\" {\r\n\t\treturn this.getPropertyValue(\"nodeAlign\");\r\n\t}\r\n\r\n\t/**\r\n\t * Orientation of the chart: \"horizontal\" or \"vertical\";\r\n\t *\r\n\t * @param value Orientation\r\n\t */\r\n\tpublic set orientation(value: Orientation) {\r\n\t\tthis.setPropertyValue(\"orientation\", value, true);\r\n\t\tlet nameLabel = this.nodes.template.nameLabel;\r\n\r\n\t\tif (value == \"vertical\") {\r\n\t\t\tthis.nodes.template.width = undefined;\r\n\t\t\tnameLabel.label.horizontalCenter = \"middle\";\r\n\t\t\tnameLabel.locationX = 0.5;\r\n\t\t}\r\n\t\telse {\r\n\t\t\tthis.nodes.template.height = undefined;\r\n\t\t\tnameLabel.label.horizontalCenter = \"left\";\r\n\t\t\tnameLabel.locationX = 1;\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * @return Orientation\r\n\t */\r\n\tpublic get orientation(): Orientation {\r\n\t\treturn this.getPropertyValue(\"orientation\");\r\n\t}\r\n\r\n\t/**\r\n\t * @ignore\r\n\t */\r\n\tpublic createNode(): this[\"_node\"] {\r\n\t\tlet node = new SankeyNode();\r\n\t\tthis._disposers.push(node);\r\n\t\treturn node;\r\n\t}\r\n\r\n\t/**\r\n\t * @ignore\r\n\t */\r\n\tpublic createLink(): this[\"_link\"] {\r\n\t\tlet link = new SankeyLink();\r\n\t\tthis._disposers.push(link);\r\n\t\treturn link;\r\n\t}\r\n\r\n\r\n\t/**\r\n\t * @ignore\r\n\t */\r\n\tpublic get valueHeight(): number {\r\n\t\treturn this._valueHeight;\r\n\t}\r\n\r\n\r\n\t/**\r\n\t * @ignore\r\n\t */\r\n\tpublic set valueHeight(value: number) {\r\n\t\tif (value != this._valueHeight) {\r\n\t\t\tthis._valueHeight = value;\r\n\t\t\tthis.invalidate();\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * @ignore\r\n\t */\r\n\tdisposeData() {\r\n\t\tsuper.disposeData();\r\n\t\tthis._sorted = this.nodes.iterator();\r\n\t}\r\n\r\n}\r\n\r\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\r\nregistry.registeredClasses[\"SankeyDiagram\"] = SankeyDiagram;\r\n\n\n\n// WEBPACK FOOTER //\n// ../../../../../src/.internal/charts/types/SankeyDiagram.ts","/**\r\n * ChordNode module\r\n */\r\n\r\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\r\nimport { FlowDiagramNode, IFlowDiagramNodeAdapters, IFlowDiagramNodeEvents, IFlowDiagramNodeProperties } from \"./FlowDiagramNode\";\r\nimport { ChordDiagram, ChordDiagramDataItem } from \"../types/ChordDiagram\";\r\nimport { List } from \"../../core/utils/List\";\r\nimport { AxisLabelCircular } from \"../axes/AxisLabelCircular\";\r\nimport { registry } from \"../../core/Registry\";\r\nimport { Slice } from \"../../core/elements/Slice\";\r\nimport { InterfaceColorSet } from \"../../core/utils/InterfaceColorSet\";\r\nimport * as $iter from \"../../core/utils/Iterator\";\r\nimport * as $math from \"../../core/utils/Math\";\r\nimport * as $type from \"../../core/utils/Type\";\r\nimport { Bullet } from \"../elements/Bullet\";\r\n\r\n/**\r\n * ============================================================================\r\n * REQUISITES\r\n * ============================================================================\r\n * @hidden\r\n */\r\n\r\n/**\r\n * Defines properties for [[ChordNode]].\r\n */\r\nexport interface IChordNodeProperties extends IFlowDiagramNodeProperties { }\r\n\r\n/**\r\n * Defines events for [[ChordNode]].\r\n */\r\nexport interface IChordNodeEvents extends IFlowDiagramNodeEvents { }\r\n\r\n/**\r\n * Defines adapters for [[ChordNode]].\r\n *\r\n * @see {@link Adapter}\r\n */\r\nexport interface IChordNodeAdapters extends IFlowDiagramNodeAdapters, IChordNodeProperties { }\r\n\r\n\r\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\r\n\r\n/**\r\n * Creates a node in a Chord Diagram.\r\n *\r\n * A Chord node is a block with a value, which represents its size on the\r\n * diagram.\r\n *\r\n * Nodes are connected via [[ChordLink]] elements.\r\n *\r\n * @see {@link IChordNodeEvents} for a list of available events\r\n * @see {@link IChordNodeAdapters} for a list of available Adapters\r\n * @important\r\n */\r\nexport class ChordNode extends FlowDiagramNode {\r\n\r\n\t/**\r\n\t * Defines available properties.\r\n\t */\r\n\tpublic _properties!: IChordNodeProperties;\r\n\r\n\t/**\r\n\t * Defines available adapters.\r\n\t */\r\n\tpublic _adapter!: IChordNodeAdapters;\r\n\r\n\t/**\r\n\t * Defines available events.\r\n\t */\r\n\tpublic _events!: IChordNodeEvents;\r\n\r\n\t/**\r\n\t * A list of data items of the items coming in from another node, one level\r\n\t * up.\r\n\t *\r\n\t * These are what ingoing links are build out of.\r\n\t */\r\n\tprotected _incomingDataItems: List;\r\n\r\n\t/**\r\n\t * A list of data items of the items going out of the node.\r\n\t *\r\n\t * These are what outgoing links are build out of.\r\n\t */\r\n\tprotected _outgoingDataItems: List;\r\n\r\n\t/**\r\n\t * Sorted list of incoming items.\r\n\t */\r\n\tprotected _incomingSorted: $iter.Iterator;\r\n\r\n\t/**\r\n\t * Sorted list of outgoing items.\r\n\t */\r\n\tprotected _outgoingSorted: $iter.Iterator;\r\n\r\n\t/**\r\n\t * A chart instance this node is added to.\r\n\t */\r\n\tpublic chart: ChordDiagram;\r\n\r\n\r\n\t/**\r\n\t * Defines the type of the [[ChordDiagramDataItem]] used in the class.\r\n\t */\r\n\tpublic _dataItem: ChordDiagramDataItem;\r\n\r\n\r\n\t/**\r\n\t * Slice sprite of a node\r\n\t */\r\n\tpublic slice: Slice;\r\n\r\n\t/**\r\n\t * A label element which shows node's name.\r\n\t */\r\n\tpublic label: AxisLabelCircular;\r\n\r\n\t/**\r\n\t * @ignore\r\n\t */\r\n\tpublic nextAngle: number;\r\n\r\n\t/**\r\n\t * @ignore\r\n\t */\r\n\tpublic trueStartAngle: number;\r\n\r\n\t/**\r\n\t * Constructor\r\n\t */\r\n\tconstructor() {\r\n\t\tsuper();\r\n\t\tthis.className = \"ChordNode\";\r\n\r\n\t\tlet label = this.createChild(AxisLabelCircular);\r\n\t\tlabel.location = 0.5;\r\n\t\tlabel.radius = 5;\r\n\t\tlabel.text = \"{name}\";\r\n\t\tlabel.zIndex = 1;\r\n\t\tlabel.shouldClone = false;\r\n\t\tthis.label = label;\r\n\r\n\t\tthis.layout = \"none\";\r\n\r\n\t\tthis.events.on(\"positionchanged\", this.updateRotation, this, false);\r\n\r\n\t\tthis.isMeasured = false;\r\n\t\tthis.slice = this.createChild(Slice);\r\n\t\tthis.slice.isMeasured = false;\r\n\r\n\t\tlet hiddenState = this.hiddenState;\r\n\t\thiddenState.properties.fill = new InterfaceColorSet().getFor(\"disabledBackground\");\r\n\t\thiddenState.properties.opacity = 0.5;\r\n\t\thiddenState.properties.visible = true;\r\n\r\n\t\tthis.setStateOnChildren = false;\r\n\r\n\t\tthis.slice.hiddenState.properties.visible = true;\r\n\r\n\t\tthis.adapter.add(\"tooltipX\", (tooltipX, target)=>{\r\n\t\t return target.slice.ix * (target.slice.radius - (target.slice.radius - target.slice.pixelInnerRadius) / 2);\r\n\t\t})\r\n\r\n\t\tthis.adapter.add(\"tooltipY\", (tooltipY, target)=>{\r\n\t\t return target.slice.iy * (target.slice.radius - (target.slice.radius - target.slice.pixelInnerRadius) / 2);\r\n\t\t})\r\n\t}\r\n\r\n\r\n\t/**\r\n\t * Invalidates all links, attached to this node.\r\n\t *\r\n\t * @ignore Exclude from docs\r\n\t */\r\n\tpublic invalidateLinks(): void {\r\n\t\tsuper.invalidateLinks();\r\n\r\n\t\tlet label = this.label;\r\n\t\tlet slice = this.slice;\r\n\t\tlet chart = this.chart;\r\n\t\tif (chart && slice) {\r\n\r\n\t\t\tlet sum = this.total;\r\n\t\t\tlet arc = slice.arc;\r\n\t\t\tlet sliceStartAngle = slice.startAngle;\r\n\r\n\t\t\tthis.children.each((child) => {\r\n\t\t\t\tif (child instanceof Bullet) {\r\n\t\t\t\t\tlet locationX = child.locationX;\r\n\t\t\t\t\tif (!$type.isNumber(locationX)) {\r\n\t\t\t\t\t\tlocationX = 0.5;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tlet locationY = child.locationY;\r\n\t\t\t\t\tif (!$type.isNumber(locationY)) {\r\n\t\t\t\t\t\tlocationY = 1;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tlet childAngle = sliceStartAngle + arc * locationX;\r\n\t\t\t\t\tlet childRadius = locationY * slice.radius;\r\n\r\n\t\t\t\t\tchild.x = childRadius * $math.cos(childAngle);\r\n\t\t\t\t\tchild.y = childRadius * $math.sin(childAngle);\r\n\t\t\t\t}\r\n\t\t\t})\r\n\r\n\r\n\t\t\tlet labelAngle = sliceStartAngle + arc * label.location;\r\n\t\t\tlet startAngle = sliceStartAngle + (1 - sum / this.adjustedTotal) * arc * 0.5; // if value of a node is > then sum of the links, add to center link\r\n\r\n\t\t\tif ($type.isNaN(startAngle)) {\r\n\t\t\t\tstartAngle = sliceStartAngle;\r\n\t\t\t}\r\n\r\n\t\t\tlabel.fixPosition(labelAngle, slice.radius);\r\n\r\n\t\t\tthis.nextAngle = startAngle;\r\n\r\n\t\t\tif (this._outgoingSorted) {\r\n\r\n\t\t\t\t$iter.each(this._outgoingSorted, (dataItem) => {\r\n\t\t\t\t\tlet link = dataItem.link;\r\n\t\t\t\t\tlink.parent = this.chart.linksContainer;\r\n\t\t\t\t\tlet value = dataItem.getWorkingValue(\"value\");\r\n\r\n\t\t\t\t\tif ($type.isNumber(value)) {\r\n\r\n\t\t\t\t\t\tif (chart.nonRibbon) {\r\n\t\t\t\t\t\t\tlet percentWidth = link.percentWidth;\r\n\t\t\t\t\t\t\tif (!$type.isNumber(percentWidth)) {\r\n\t\t\t\t\t\t\t\tpercentWidth = 5;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tpercentWidth = percentWidth / 100;\r\n\r\n\t\t\t\t\t\t\tlink.startAngle = sliceStartAngle + arc / 2 - arc / 2 * percentWidth;\r\n\t\t\t\t\t\t\tlink.arc = arc * percentWidth;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\tlink.arc = value * chart.valueAngle;\r\n\t\t\t\t\t\t\tlink.startAngle = this.nextAngle;\r\n\t\t\t\t\t\t\tthis.nextAngle += link.arc;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tif (!dataItem.toNode) {\r\n\t\t\t\t\t\t\tlink.endAngle = link.startAngle;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tlink.radius = slice.pixelInnerRadius;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t//link.validate();\r\n\t\t\t\t});\r\n\t\t\t}\r\n\r\n\t\t\tif (this._incomingSorted) {\r\n\t\t\t\t$iter.each(this._incomingSorted, (dataItem) => {\r\n\t\t\t\t\tlet link = dataItem.link;\r\n\r\n\t\t\t\t\tlink.radius = slice.pixelInnerRadius;\r\n\r\n\t\t\t\t\tif (chart.nonRibbon) {\r\n\t\t\t\t\t\tlet percentWidth = link.percentWidth;\r\n\t\t\t\t\t\tif (!$type.isNumber(percentWidth)) {\r\n\t\t\t\t\t\t\tpercentWidth = 5;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tpercentWidth = percentWidth / 100;\r\n\r\n\t\t\t\t\t\tlink.endAngle = sliceStartAngle + arc / 2 - arc / 2 * percentWidth;\r\n\t\t\t\t\t\tlink.arc = arc * percentWidth;\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse {\r\n\t\t\t\t\t\tlink.endAngle = this.nextAngle;\r\n\t\t\t\t\t\tlet value = dataItem.getWorkingValue(\"value\");\r\n\t\t\t\t\t\tif ($type.isNumber(value)) {\r\n\t\t\t\t\t\t\tlink.arc = value * chart.valueAngle; // yes, this is needed\r\n\t\t\t\t\t\t\tthis.nextAngle += link.arc;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif (!dataItem.fromNode) {\r\n\t\t\t\t\t\tlink.startAngle = link.endAngle;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t//link.validate();\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 * @ignore\r\n\t * updates slice start angle so that when we drag a node it would face the center\r\n\t */\r\n\tprotected updateRotation() {\r\n\t\tlet slice = this.slice;\r\n\t\tlet mAngle = this.trueStartAngle + slice.arc / 2;\r\n\t\tlet radius = slice.radius;\r\n\r\n\t\tlet tx = radius * $math.cos(mAngle);\r\n\t\tlet ty = radius * $math.sin(mAngle);\r\n\r\n\t\tlet angle = $math.getAngle({ x: tx + this.pixelX, y: ty + this.pixelY });\r\n\r\n\t\tslice.startAngle = this.trueStartAngle + (angle - mAngle);\r\n\r\n\t\tthis.dx = - this.pixelX;\r\n\t\tthis.dy = - this.pixelY;\r\n\t}\r\n\r\n\r\n\t/**\r\n\t * Copies properties and labels from another [[ChordNode]].\r\n\t *\r\n\t * @param source Source node\r\n\t */\r\n\tpublic copyFrom(source: this): void {\r\n\t\tsuper.copyFrom(source);\r\n\t\tthis.label.copyFrom(source.label);\r\n\t\tthis.slice.copyFrom(source.slice);\r\n\t}\r\n}\r\n\r\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\r\nregistry.registeredClasses[\"ChordNode\"] = ChordNode;\r\n\n\n\n// WEBPACK FOOTER //\n// ../../../../../src/.internal/charts/elements/ChordNode.ts","/**\r\n * Functionality for drawing quadratic curves.\r\n */\r\n\r\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\r\nimport { Line, ILineProperties, ILineAdapters, ILineEvents } from \"./Line\";\r\nimport { IPoint, IOrientationPoint } from \"../defs/IPoint\";\r\nimport { color } from \"../utils/Color\";\r\nimport * as $path from \"../rendering/Path\";\r\nimport * as $math from \"../utils/Math\";\r\nimport * as $type from \"../utils/Type\";\r\n\r\n/**\r\n * ============================================================================\r\n * REQUISITES\r\n * ============================================================================\r\n * @hidden\r\n */\r\n\r\n/**\r\n * Defines available properties for [[QuadraticCurve]].\r\n */\r\nexport interface IQuadraticCurveProperties extends ILineProperties {\r\n\t/**\r\n\t * X coordinate of control point.\r\n\t */\r\n\tcpx?: number;\r\n\r\n\t/**\r\n\t * Y coordinate of control point.\r\n\t */\r\n\tcpy?: number;\r\n}\r\n\r\n/**\r\n * Defines events for [[QuadraticCurve]].\r\n */\r\nexport interface IQuadraticCurveEvents extends ILineEvents { }\r\n\r\n/**\r\n * Defines adapters for [[QuadraticCurve]].\r\n *\r\n * @see {@link Adapter}\r\n */\r\nexport interface IQuadraticCurveAdapters extends ILineAdapters, IQuadraticCurveProperties { }\r\n\r\n\r\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\r\n\r\n/**\r\n * Draws a waved line.\r\n *\r\n * @see {@link IQuadraticCurveEvents} for a list of available events\r\n * @see {@link IQuadraticCurveAdapters} for a list of available Adapters\r\n */\r\nexport class QuadraticCurve extends Line {\r\n\r\n\t/**\r\n\t * Defines available properties.\r\n\t */\r\n\tpublic _properties!: IQuadraticCurveProperties;\r\n\r\n\t/**\r\n\t * Defines available adapters.\r\n\t */\r\n\tpublic _adapter!: IQuadraticCurveAdapters;\r\n\r\n\t/**\r\n\t * Defines available events.\r\n\t */\r\n\tpublic _events!: IQuadraticCurveEvents;\r\n\r\n\t/**\r\n\t * Constructor\r\n\t */\r\n\tconstructor() {\r\n\t\tsuper();\r\n\t\tthis.className = \"QuadraticCurve\";\r\n\t\tthis.element = this.paper.add(\"path\");\r\n\t\tthis.pixelPerfect = false;\r\n\r\n\t\tthis.fill = color();\r\n\r\n\t\tthis.applyTheme();\r\n\t}\r\n\r\n\t/**\r\n\t * Draws the waved line.\r\n\t *\r\n\t * @ignore Exclude from docs\r\n\t */\r\n\tpublic draw(): void {\r\n\t\t//super.draw();\r\n\t\tif($type.isNumber(this.x1 + this.x2 + this.y1 + this.y2 + this.cpx + this.cpy )){\r\n\r\n\t\t\tlet p1: IPoint = { x: this.x1, y: this.y1 };\r\n\t\t\tlet p2: IPoint = { x: this.x2, y: this.y2 };\r\n\t\t\tlet cp: IPoint = { x: this.cpx, y: this.cpy };\r\n\r\n\t\t\tlet d: string = $path.moveTo(p1) + $path.quadraticCurveTo(p2, cp);\r\n\r\n\t\t\tthis.path = d;\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * X coordinate of control point.\r\n\t *\r\n\t * @param value X\r\n\t */\r\n\tpublic set cpx(value: number) {\r\n\t\tthis.setPropertyValue(\"cpx\", value, true);\r\n\t}\r\n\r\n\t/**\r\n\t * @return X\r\n\t */\r\n\tpublic get cpx(): number {\r\n\t\treturn this.getPropertyValue(\"cpx\");\r\n\t}\r\n\r\n\t/**\r\n\t * Y coordinate of control point.\r\n\t *\r\n\t * @param value Y\r\n\t */\r\n\tpublic set cpy(value: number) {\r\n\t\tthis.setPropertyValue(\"cpy\", value, true);\r\n\t}\r\n\r\n\t/**\r\n\t * @return Y\r\n\t */\r\n\tpublic get cpy(): number {\r\n\t\treturn this.getPropertyValue(\"cpy\");\r\n\t}\r\n\r\n\t/**\r\n\t * Converts relative position along the line (0-1) into pixel coordinates.\r\n\t *\r\n\t * @param position Position (0-1)\r\n\t * @return Coordinates\r\n\t */\r\n\tpublic positionToPoint(position: number): IOrientationPoint {\r\n\t\tlet p1 = {x:this.x1, y:this.y1};\r\n\t\tlet cp = {x:this.cpx, y:this.cpy};\r\n\t\tlet p2 = {x:this.x2, y:this.y2};\r\n\r\n\t\tlet point1 = $math.getPointOnQuadraticCurve(p1, p2, cp, position);\r\n\t\tlet point2 = $math.getPointOnQuadraticCurve(p1, p2, cp, position + 0.001);\r\n\r\n\t\treturn {x:point1.x, y:point1.y, angle:$math.getAngle(point1, point2)};\r\n\t}\r\n}\r\n\n\n\n// WEBPACK FOOTER //\n// ../../../../../src/.internal/core/elements/QuadraticCurve.ts","/**\r\n * ChordLink module\r\n */\r\n\r\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\r\nimport { ChordDiagramDataItem } from \"../types/ChordDiagram\";\r\nimport { FlowDiagramLink, IFlowDiagramLinkAdapters, IFlowDiagramLinkEvents, IFlowDiagramLinkProperties } from \"./FlowDiagramLink\";\r\nimport { registry } from \"../../core/Registry\";\r\nimport { QuadraticCurve } from \"../../core/elements/QuadraticCurve\";\r\nimport * as $math from \"../../core/utils/Math\";\r\nimport * as $path from \"../../core/rendering/Path\";\r\n\r\n\r\n/**\r\n * ============================================================================\r\n * REQUISITES\r\n * ============================================================================\r\n * @hidden\r\n */\r\n\r\n/**\r\n * Defines properties for [[ChordLink]].\r\n */\r\nexport interface IChordLinkProperties extends IFlowDiagramLinkProperties {\r\n\r\n\t/**\r\n\t * [radius description]\r\n\t *\r\n\t * @todo Description\r\n\t */\r\n\tradius?: number;\r\n\r\n\r\n\t/**\r\n\t * [arc description]\r\n\t *\r\n\t * @todo Description\r\n\t */\r\n\tarc?: number;\r\n}\r\n\r\n/**\r\n * Defines events for [[ChordLink]].\r\n */\r\nexport interface IChordLinkEvents extends IFlowDiagramLinkEvents { }\r\n\r\n/**\r\n * Defines adapters for [[ChordLink]].\r\n *\r\n * @see {@link Adapter}\r\n */\r\nexport interface IChordLinkAdapters extends IFlowDiagramLinkAdapters, IChordLinkProperties { }\r\n\r\n\r\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\r\n\r\n/**\r\n * This class creates a link (waved color-filled line) between two nodes in a\r\n * Chord Diagram.\r\n *\r\n * @see {@link IChordLinkEvents} for a list of available events\r\n * @see {@link IChordLinkAdapters} for a list of available Adapters\r\n * @important\r\n */\r\nexport class ChordLink extends FlowDiagramLink {\r\n\r\n\t/**\r\n\t * Defines available properties.\r\n\t */\r\n\tpublic _properties!: IChordLinkProperties;\r\n\r\n\t/**\r\n\t * Defines available adapters.\r\n\t */\r\n\tpublic _adapter!: IChordLinkAdapters;\r\n\r\n\t/**\r\n\t * Defines available events.\r\n\t */\r\n\tpublic _events!: IChordLinkEvents;\r\n\r\n\t/**\r\n\t * Defines a type of data item used by this class.\r\n\t */\r\n\tpublic _dataItem: ChordDiagramDataItem;\r\n\r\n\t/**\r\n\t * Spline which goes through the middle of a link, used to calculate bullet and tooltip positions, invisible by default\r\n */\r\n\tpublic middleLine: QuadraticCurve;\r\n\r\n\t/**\r\n\t * Constructor\r\n\t */\r\n\tconstructor() {\r\n\t\tsuper();\r\n\t\tthis.className = \"ChordLink\";\r\n\r\n\t\tthis.middleLine = this.createChild(QuadraticCurve);\r\n\t\tthis.middleLine.shouldClone = false;\r\n\t\tthis.middleLine.strokeOpacity = 0;\r\n\r\n\t\tthis.applyTheme();\r\n\t}\r\n\r\n\t/**\r\n\t * (Re)validates (redraws) the link.\r\n\t *\r\n\t * @ignore Exclude from docs\r\n\t */\r\n\tpublic validate() {\r\n\t\tsuper.validate();\r\n\r\n\t\tif (!this.isTemplate) {\r\n\t\t\tlet startAngle = this.startAngle;\r\n\t\t\tlet endAngle = this.endAngle;\r\n\r\n\t\t\tlet arc = this.arc;\r\n\t\t\tlet radius = this.radius;\r\n\r\n\t\t\tlet fromNode = this.dataItem.fromNode;\r\n\t\t\tlet toNode = this.dataItem.toNode;\r\n\r\n\t\t\tlet fromX = 0;\r\n\t\t\tlet fromY = 0;\r\n\r\n\t\t\tif (fromNode) {\r\n\t\t\t\tfromX = fromNode.pixelX + fromNode.dx;\r\n\t\t\t\tfromY = fromNode.pixelY + fromNode.dy;\r\n\t\t\t}\r\n\r\n\t\t\tlet toX = 0;\r\n\t\t\tlet toY = 0;\r\n\r\n\t\t\tif (toNode) {\r\n\t\t\t\ttoX = toNode.pixelX + toNode.dx;\r\n\t\t\t\ttoY = toNode.pixelY + toNode.dy;\r\n\t\t\t}\r\n\r\n\t\t\tif (radius > 0) {\r\n\t\t\t\tlet x1 = radius * $math.cos(startAngle) + fromX;\r\n\t\t\t\tlet y1 = radius * $math.sin(startAngle) + fromY;\r\n\t\t\t\tlet x2 = radius * $math.cos(endAngle) + toX;\r\n\t\t\t\tlet y2 = radius * $math.sin(endAngle) + toY;\r\n\r\n\t\t\t\t//let cpAngle = startAngle + arc + (endAngle - startAngle - arc) / 2;\r\n\t\t\t\t//let arcWidth = $math.getDistance({x:x1, y:y1}, {x:x4, y:y4});\r\n\r\n\t\t\t\t//let cpx = (arcWidth) * $math.cos(cpAngle);\r\n\t\t\t\t//let cpy = (arcWidth) * $math.sin(cpAngle);\r\n\r\n\t\t\t\tlet cp = { x: 0, y: 0 };\r\n\t\t\t\tlet path = $path.moveTo({ x: x1, y: y1 });\r\n\r\n\t\t\t\tpath += $path.arcTo(startAngle, arc, radius);\r\n\t\t\t\tpath += $path.quadraticCurveTo({ x: x2, y: y2 }, cp);\r\n\t\t\t\tpath += $path.arcTo(endAngle, arc, radius);\r\n\t\t\t\tpath += $path.quadraticCurveTo({ x: x1, y: y1 }, cp);\r\n\r\n\t\t\t\tif (arc > 0) {\r\n\t\t\t\t\tthis.link.path = path;\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tthis.link.path = \"\";\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (this.maskBullets) {\r\n\t\t\t\t\tthis.bulletsMask.path = path;\r\n\t\t\t\t\tthis.bulletsContainer.mask = this.bulletsMask;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tlet mAngle1 = startAngle + arc / 2;\r\n\t\t\t\tlet mAngle2 = endAngle + arc / 2;\r\n\r\n\t\t\t\tlet middleLine = this.middleLine;\r\n\r\n\t\t\t\tmiddleLine.x1 = radius * $math.cos(mAngle1) + fromX;\r\n\t\t\t\tmiddleLine.y1 = radius * $math.sin(mAngle1) + fromY;\r\n\t\t\t\tmiddleLine.x2 = radius * $math.cos(mAngle2) + toX;\r\n\t\t\t\tmiddleLine.y2 = radius * $math.sin(mAngle2) + toY;\r\n\r\n\t\t\t\tmiddleLine.cpx = 0;\r\n\t\t\t\tmiddleLine.cpy = 0;\r\n\r\n\t\t\t\tmiddleLine.stroke = this.fill;\r\n\r\n\t\t\t\tthis.positionBullets();\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t/**\r\n\t * [radius description]\r\n\t *\r\n\t * @todo Description\r\n\t * @param value End Y\r\n\t */\r\n\tpublic set radius(value: number) {\r\n\t\tthis.setPropertyValue(\"radius\", value, true);\r\n\t}\r\n\r\n\t/**\r\n\t * @return End Y\r\n\t */\r\n\tpublic get radius(): number {\r\n\t\treturn this.getPropertyValue(\"radius\");\r\n\t}\r\n\r\n\t/**\r\n\t * [arc description]\r\n\t *\r\n\t * @todo Description\r\n\t * @param value [description]\r\n\t */\r\n\tpublic set arc(value: number) {\r\n\t\tthis.setPropertyValue(\"arc\", value, true);\r\n\t}\r\n\r\n\t/**\r\n\t * @return [description]\r\n\t */\r\n\tpublic get arc(): number {\r\n\t\treturn this.getPropertyValue(\"arc\");\r\n\t}\r\n\r\n}\r\n\r\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\r\nregistry.registeredClasses[\"ChordLink\"] = ChordLink;\r\n\n\n\n// WEBPACK FOOTER //\n// ../../../../../src/.internal/charts/elements/ChordLink.ts","/**\r\n * Chord diagram module.\r\n */\r\n\r\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\r\nimport { FlowDiagram, FlowDiagramDataItem, IFlowDiagramAdapters, IFlowDiagramDataFields, IFlowDiagramEvents, IFlowDiagramProperties } from \"./FlowDiagram\";\r\nimport { percent, Percent } from \"../../core/utils/Percent\";\r\nimport { DictionaryTemplate } from \"../../core/utils/Dictionary\";\r\nimport { Container } from \"../../core/Container\";\r\nimport { registry } from \"../../core/Registry\";\r\nimport { ChordNode } from \"../elements/ChordNode\";\r\nimport { ChordLink } from \"../elements/ChordLink\";\r\nimport * as $iter from \"../../core/utils/Iterator\";\r\nimport * as $math from \"../../core/utils/Math\";\r\nimport * as $type from \"../../core/utils/Type\";\r\nimport * as $utils from \"../../core/utils/Utils\";\r\nimport { IRectangle } from \"../../core/defs/IRectangle\";\r\n\r\n/**\r\n * ============================================================================\r\n * DATA ITEM\r\n * ============================================================================\r\n * @hidden\r\n */\r\n\r\n//@todo rearange notes after dragged\r\n\r\n/**\r\n * Defines a [[DataItem]] for [[ChordDiagram]].\r\n *\r\n * @see {@link DataItem}\r\n */\r\nexport class ChordDiagramDataItem extends FlowDiagramDataItem {\r\n\r\n\t/**\r\n\t * Defines a type of [[Component]] this data item is used for.\r\n\t */\r\n\tpublic _component!: ChordDiagram;\r\n\r\n\t/**\r\n\t * An a link element, connecting two nodes.\r\n\t */\r\n\tpublic _link: ChordLink;\r\n\r\n\t/**\r\n\t * An origin node.\r\n\t */\r\n\tpublic fromNode: ChordNode;\r\n\r\n\t/**\r\n\t * A destination node.\r\n\t */\r\n\tpublic toNode: ChordNode;\r\n\r\n\t/**\r\n\t * Constructor\r\n\t */\r\n\tconstructor() {\r\n\t\tsuper();\r\n\t\tthis.className = \"ChordDiagramDataItem\";\r\n\t\tthis.applyTheme();\r\n\t}\r\n}\r\n\r\n\r\n/**\r\n * ============================================================================\r\n * REQUISITES\r\n * ============================================================================\r\n * @hidden\r\n */\r\n\r\n/**\r\n * Defines data fields for [[ChordDiagram]].\r\n */\r\nexport interface IChordDiagramDataFields extends IFlowDiagramDataFields {\r\n\r\n\t/**\r\n\t * Name of the source node.\r\n\t */\r\n\tfromName?: string;\r\n\r\n\t/**\r\n\t * Name of the target node.\r\n\t */\r\n\ttoName?: string;\r\n\r\n\t/**\r\n\t * Value of the link between two nodes.\r\n\t */\r\n\tvalue?: string;\r\n\r\n\t/**\r\n\t * Color of a from node\r\n\t */\r\n\tcolor?: string;\r\n}\r\n\r\n/**\r\n * Defines properties for [[ChordDiagram]]\r\n */\r\nexport interface IChordDiagramProperties extends IFlowDiagramProperties {\r\n\t/**\r\n\t * Radius of the Chord. Absolute or relative.\r\n\t */\r\n\tradius?: number | Percent;\r\n\r\n\t/**\r\n\t * Inner radius of the Chord nodes. Absolute or relative. Negative value means that the inner radius will be calculated from the radius, not from the center.\r\n\t */\r\n\tinnerRadius?: number | Percent;\r\n\r\n\t/**\r\n\t * An angle radar face starts on. (degrees)\r\n\t *\r\n\t * @default -90\r\n\t */\r\n\tstartAngle?: number;\r\n\r\n\t/**\r\n\t * An angle radar face ends on. (degrees)\r\n\t *\r\n\t * @default 270\r\n\t */\r\n\tendAngle?: number;\r\n\r\n\r\n\t/**\r\n\t * If you set this to true, all the lines will be of the same width.\r\n\t *\r\n\t * @default false\r\n\t */\r\n\tnonRibbon?: boolean;\r\n}\r\n\r\n/**\r\n * Defines events for [[ChordDiagram]].\r\n */\r\nexport interface IChordDiagramEvents extends IFlowDiagramEvents { }\r\n\r\n/**\r\n * Defines adapters for [[ChordDiagram]].\r\n *\r\n * @see {@link Adapter}\r\n */\r\nexport interface IChordDiagramAdapters extends IFlowDiagramAdapters, IChordDiagramProperties { }\r\n\r\n\r\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\r\n\r\n/**\r\n * Creates a Chord Diagram chart.\r\n *\r\n * @see {@link IChordDiagramEvents} for a list of available Events\r\n * @see {@link IChordDiagramAdapters} for a list of available Adapters\r\n * @see {@link https://www.amcharts.com/docs/v4/chart-types/chord-diagram/} for documentation\r\n * @important\r\n */\r\nexport class ChordDiagram extends FlowDiagram {\r\n\r\n\t/**\r\n\t * Defines a type for the DataItem.\r\n\t */\r\n\tpublic _dataItem: ChordDiagramDataItem;\r\n\r\n\t/**\r\n\t * Defines available data fields.\r\n\t */\r\n\tpublic _dataFields: IChordDiagramDataFields;\r\n\r\n\t/**\r\n\t * Defines available properties.\r\n\t */\r\n\tpublic _properties!: IChordDiagramProperties;\r\n\r\n\t/**\r\n\t * Defines available adapters.\r\n\t */\r\n\tpublic _adapter!: IChordDiagramAdapters;\r\n\r\n\t/**\r\n\t * Defines available events.\r\n\t */\r\n\tpublic _events!: IChordDiagramEvents;\r\n\r\n\t/**\r\n\t * A list of chart's Chord nodes.\r\n\t *\r\n\t * @param {DictionaryTemplate}\r\n\t */\r\n\tpublic nodes: DictionaryTemplate;\r\n\r\n\t/**\r\n\t * An a link element, connecting two nodes.\r\n\t */\r\n\tpublic _link: ChordLink;\r\n\r\n\t/**\r\n\t * Sorted nodes iterator.\r\n\t *\r\n\t * @ignore\r\n\t */\r\n\tprotected _sorted: $iter.Iterator<[string, ChordNode]>;\r\n\r\n\t/**\r\n\t * [valueAngle description]\r\n\t *\r\n\t * @ignore Exclude from docs\r\n\t * @todo Description\r\n\t */\r\n\tpublic valueAngle: number = 0;\r\n\r\n\t/**\r\n\t * A container for chord elemens.\r\n\t */\r\n\tpublic chordContainer:Container;\r\n\r\n\t/**\r\n\t */\r\n\tpublic _node:ChordNode;\r\n\r\n\r\n\t/**\r\n\t * Constructor\r\n\t */\r\n\tconstructor() {\r\n\r\n\t\t// Init\r\n\t\tsuper();\r\n\t\tthis.className = \"ChordDiagram\";\r\n\r\n\t\tthis.startAngle = -90;\r\n\t\tthis.endAngle = 270;\r\n\r\n\t\tthis.radius = percent(80);\r\n\r\n\t\tthis.innerRadius = - 15;\r\n\r\n\t\tthis.nodePadding = 5;\r\n\r\n\t\tlet chordContainer = this.chartContainer.createChild(Container);\r\n\t\tchordContainer.align = \"center\";\r\n\t\tchordContainer.valign = \"middle\";\r\n\t\tchordContainer.shouldClone = false;\r\n\t\tchordContainer.layout = \"absolute\";\r\n\t\tthis.chordContainer = chordContainer;\r\n\r\n\t\tthis.nodesContainer.parent = chordContainer;\r\n\t\tthis.linksContainer.parent = chordContainer;\r\n\r\n\t\tthis.chartContainer.events.on(\"maxsizechanged\", this.invalidate, this, false);\r\n\r\n\t\t// Apply theme\r\n\t\tthis.applyTheme();\r\n\t}\r\n\r\n\t/**\r\n\t * Redraws the chart.\r\n\t *\r\n\t * @ignore Exclude from docs\r\n\t */\r\n\tpublic validate(): void {\r\n\t\tlet chartContainer = this.chartContainer;\r\n\r\n\t\tlet endAngle = this.endAngle;\r\n\t\tlet startAngle = this.startAngle + this.nodePadding / 2;\r\n\r\n\t\tlet rect = $math.getArcRect(this.startAngle, this.endAngle, 1);\r\n\t\tlet innerRect: IRectangle = { x: 0, y: 0, width: 0, height: 0 };\r\n\r\n\t\trect = $math.getCommonRectangle([rect, innerRect]);\r\n\r\n\t\tlet maxRadius = Math.min(chartContainer.innerWidth / rect.width, chartContainer.innerHeight / rect.height);\r\n\r\n\t\tif(!$type.isNumber(maxRadius)){\r\n\t\t\tmaxRadius = 0;\r\n\t\t}\r\n\r\n\t\tlet radius = $utils.relativeRadiusToValue(this.radius, maxRadius);\r\n\t\tlet pixelInnerRadius = $utils.relativeRadiusToValue(this.innerRadius, radius, true);\r\n\r\n\t\tlet total = this.dataItem.values.value.sum;\r\n\t\tlet count = 0;\r\n\r\n\t\tlet newTotal = 0;\r\n\t\t$iter.each(this._sorted, (strNode) => {\r\n\t\t\tlet node = strNode[1];\r\n\t\t\tthis.getNodeValue(node);\r\n\t\t\tcount++;\r\n\t\t\tlet value = node.total;\r\n\t\t\tif(node.total / total < this.minNodeSize){\r\n\t\t\t\tvalue = total * this.minNodeSize;\r\n\t\t\t}\r\n\t\t\tnewTotal += value;\r\n\t\t});\r\n\r\n\t\tthis.valueAngle = (endAngle - this.startAngle - this.nodePadding * count) / newTotal;\r\n\r\n\t\t$iter.each(this._sorted, (strNode) => {\r\n\t\t\tlet node = strNode[1];\r\n\t\t\tlet slice = node.slice;\r\n\r\n\t\t\tslice.radius = radius;\r\n\t\t\tslice.innerRadius = pixelInnerRadius;\r\n\r\n\t\t\tlet value = node.total;\r\n\r\n\t\t\tif(node.total / total < this.minNodeSize){\r\n\t\t\t\tvalue = total * this.minNodeSize;\r\n\t\t\t}\r\n\r\n\t\t\tnode.adjustedTotal = value;\r\n\r\n\t\t\tlet arc: number;\r\n\t\t\tif (this.nonRibbon) {\r\n\t\t\t\tarc = (endAngle - this.startAngle) / count - this.nodePadding;\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tarc = this.valueAngle * value;\r\n\t\t\t}\r\n\r\n\t\t\tslice.arc = arc;\r\n\t\t\tslice.startAngle = startAngle;\r\n\t\t\tnode.trueStartAngle = startAngle;\r\n\t\t\tnode.parent = this.nodesContainer;\r\n\t\t\tnode.validate(); // otherwise flickers - nodes are already created, but not yet positioned etc.\r\n\t\t\tstartAngle += arc + this.nodePadding;\r\n\t\t})\r\n\r\n\t\tthis.chordContainer.definedBBox = { x: radius * rect.x, y: radius * rect.y, width: radius * rect.width, height: radius * rect.height };\r\n\t\tthis.chordContainer.invalidateLayout();\r\n\r\n\t\tsuper.validate();\r\n\t}\r\n\r\n\t/**\r\n\t * Sets defaults that instantiate some objects that rely on parent, so they\r\n\t * cannot be set in constructor.\r\n\t */\r\n\tprotected applyInternalDefaults(): void {\r\n\r\n\t\tsuper.applyInternalDefaults();\r\n\r\n\t\t// Add a default screen reader title for accessibility\r\n\t\t// This will be overridden in screen reader if there are any `titles` set\r\n\t\tif (!$type.hasValue(this.readerTitle)) {\r\n\t\t\tthis.readerTitle = this.language.translate(\"Chord diagram\");\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Creates and returns a new data item.\r\n\t *\r\n\t * @return Data item\r\n\t */\r\n\tprotected createDataItem(): this[\"_dataItem\"] {\r\n\t\treturn new ChordDiagramDataItem();\r\n\t}\r\n\r\n\t/**\r\n\t * Starting angle of the Radar face. (degrees)\r\n\t *\r\n\t * Normally, a circular radar face begins (the radial axis is drawn) at the\r\n\t * top center. (at -90 degrees)\r\n\t *\r\n\t * You can use `startAngle` to change this setting.\r\n\t *\r\n\t * E.g. setting this to 0 will make the radial axis start horizontally to\r\n\t * the right, as opposed to vertical.\r\n\t *\r\n\t * For a perfect circle the absolute sum of `startAngle` and `endAngle`\r\n\t * needs to be 360.\r\n\t *\r\n\t * However, it's **not** necessary to do so. You can set those to lesser\r\n\t * numbers, to create semi-circles.\r\n\t *\r\n\t * E.g. `startAngle = -90` with `endAngle = 0` will create a radar face that\r\n\t * looks like a quarter of a circle.\r\n\t *\r\n\t * @default -90\r\n\t * @param value Start angle (degrees)\r\n\t */\r\n\tpublic set startAngle(value: number) {\r\n\t\tthis.setPropertyValue(\"startAngle\", value, true);\r\n\t}\r\n\r\n\t/**\r\n\t * @return Start angle (degrees)\r\n\t */\r\n\tpublic get startAngle(): number {\r\n\t\treturn this.getPropertyValue(\"startAngle\");\r\n\t}\r\n\r\n\t/**\r\n\t * Starting angle of the Radar face. (degrees)\r\n\t *\r\n\t * Normally, a circular radar face ends (the radial axis is drawn) exactly\r\n\t * where it has started, forming a full 360 circle. (at 270 degrees)\r\n\t *\r\n\t * You can use `endAngle` to end the circle somewhere else.\r\n\t *\r\n\t * E.g. setting this to 180 will make the radar face end at horizontal line\r\n\t * to the left off the center.\r\n\t *\r\n\t * For a perfect circle the absolute sum of `startAngle` and `endAngle`\r\n\t * needs to be 360.\r\n\t *\r\n\t * However, it's **not** necessary to do so. You can set those to lesser\r\n\t * numbers, to create semi-circles.\r\n\t *\r\n\t * E.g. `startAngle = -90` with `endAngle = 0` will create a radar face that\r\n\t * looks like a quarter of a circle.\r\n\t *\r\n\t * @default -90\r\n\t * @param value End angle (degrees)\r\n\t */\r\n\tpublic set endAngle(value: number) {\r\n\t\tthis.setPropertyValue(\"endAngle\", value, true);\r\n\t}\r\n\r\n\t/**\r\n\t * @return End angle (degrees)\r\n\t */\r\n\tpublic get endAngle(): number {\r\n\t\treturn this.getPropertyValue(\"endAngle\");\r\n\t}\r\n\r\n\t/**\r\n\t * Outer radius of the Radar face.\r\n\t *\r\n\t * This can either be in absolute pixel value, or relative [[Percent]].\r\n\t *\r\n\t * @param value Outer radius\r\n\t */\r\n\tpublic set radius(value: number | Percent) {\r\n\t\tthis.setPercentProperty(\"radius\", value, true, false, 10, false);\r\n\t}\r\n\r\n\t/**\r\n\t * @return Outer radius\r\n\t */\r\n\tpublic get radius(): number | Percent {\r\n\t\treturn this.getPropertyValue(\"radius\");\r\n\t}\r\n\r\n\t/**\r\n\t * Inner radius of the Chord nodes.\r\n\t *\r\n\t * This can either be in absolute pixel value, or relative [[Percent]].\r\n\t *\r\n\t * @param value Outer radius\r\n\t */\r\n\tpublic set innerRadius(value: number | Percent) {\r\n\t\tthis.setPercentProperty(\"innerRadius\", value, true, false, 10, false);\r\n\t}\r\n\r\n\t/**\r\n\t * @return Inner radius\r\n\t */\r\n\tpublic get innerRadius(): number | Percent {\r\n\t\treturn this.getPropertyValue(\"innerRadius\");\r\n\t}\r\n\r\n\r\n\r\n\t/**\r\n\t *\r\n\t * If you set this to true, all the lines will be of the same width. This is done by making middleLine of a ChordLink visible.\r\n\t *\r\n\t * @param value\r\n\t */\r\n\tpublic set nonRibbon(value: boolean) {\r\n\t\tthis.setPropertyValue(\"nonRibbon\", value, true);\r\n\t\tthis.links.template.middleLine.strokeOpacity = 1;\r\n\t\tthis.links.template.link.fillOpacity = 0;\r\n\t}\r\n\r\n\t/**\r\n\t * @return Non-ribbon\r\n\t */\r\n\tpublic get nonRibbon(): boolean {\r\n\t\treturn this.getPropertyValue(\"nonRibbon\");\r\n\t}\r\n\r\n\t/**\r\n\t * @ignore\r\n\t */\r\n\tpublic createNode():this[\"_node\"]{\r\n\t\tlet node = new ChordNode();\r\n\t\tthis._disposers.push(node);\r\n\t\treturn node;\r\n\t}\r\n\r\n\t/**\r\n\t * @ignore\r\n\t */\r\n\tpublic createLink():this[\"_link\"]{\r\n\t\tlet link = new ChordLink();\r\n\t\tthis._disposers.push(link);\r\n\t\treturn link;\r\n\t}\r\n\r\n}\r\n\r\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\r\nregistry.registeredClasses[\"ChordDiagram\"] = ChordDiagram;\r\n\n\n\n// WEBPACK FOOTER //\n// ../../../../../src/.internal/charts/types/ChordDiagram.ts","/**\r\n * TreeMap series module.\r\n */\r\n\r\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\r\nimport { ColumnSeries, IColumnSeriesProperties, IColumnSeriesDataFields, IColumnSeriesAdapters, IColumnSeriesEvents, ColumnSeriesDataItem } from \"./ColumnSeries\";\r\nimport { visualProperties } from \"../../core/Sprite\";\r\nimport { TreeMap, TreeMapDataItem } from \"../types/TreeMap\";\r\nimport { Animation } from \"../../core/utils/Animation\";\r\nimport { registry } from \"../../core/Registry\";\r\nimport { InterfaceColorSet } from \"../../core/utils/InterfaceColorSet\";\r\nimport * as $type from \"../../core/utils/Type\";\r\nimport { RoundedRectangle } from \"../../core/elements/RoundedRectangle\";\r\nimport { Container } from \"../../core/Container\";\r\nimport * as $object from \"../../core/utils/Object\";\r\nimport { LegendDataItem } from \"../../charts/Legend\";\r\n\r\n/**\r\n * ============================================================================\r\n * DATA ITEM\r\n * ============================================================================\r\n * @hidden\r\n */\r\n\r\n/**\r\n * Defines a [[DataItem]] for [[TreeMapSeries]].\r\n *\r\n * @see {@link DataItem}\r\n */\r\nexport class TreeMapSeriesDataItem extends ColumnSeriesDataItem {\r\n\r\n\t/**\r\n\t * Defines a type of [[Component]] this data item is used for.\r\n\t */\r\n\tpublic _component!: TreeMapSeries;\r\n\r\n\t/**\r\n\t * Constructor\r\n\t */\r\n\tconstructor() {\r\n\t\tsuper();\r\n\t\tthis.className = \"TreeMapSeriesDataItem\";\r\n\r\n\t\tthis.applyTheme();\r\n\t}\r\n\r\n\t/**\r\n\t * Data for the this particular item.\r\n\t *\r\n\t * @param value Item's data\r\n\t */\r\n\t//public set dataContext(value: Object) {\r\n\t//\tthis._dataContext = value;\r\n\t//}\r\n\r\n\r\n\r\n\t/**\r\n\t * @return Item's data\r\n\t */\r\n\t/*\r\n public get dataContext(): Object {\r\n\t // It's because data of tree series is TreeMapDataItems.\r\n\t if (this._dataContext) {\r\n\t\t return (this._dataContext).dataContext;\r\n\t }\r\n }*/\r\n\r\n\t/**\r\n\t * The name of the item's parent item.\r\n\t *\r\n\t * @return Parent name\r\n\t */\r\n\tpublic get parentName(): string {\r\n\t\tlet treeMapDataItem = this.treeMapDataItem;\r\n\t\tif (treeMapDataItem && treeMapDataItem.parent) {\r\n\t\t\treturn treeMapDataItem.parent.name;\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Item's numeric value.\r\n\t *\r\n\t * @readonly\r\n\t * @return Value\r\n\t */\r\n\tpublic get value(): number {\r\n\t\tlet treeMapDataItem = this.treeMapDataItem;\r\n\t\tif (treeMapDataItem) {\r\n\t\t\treturn treeMapDataItem.value;\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * A corresponding data item from the tree map.\r\n\t *\r\n\t * @readonly\r\n\t * @return Data item\r\n\t */\r\n\tpublic get treeMapDataItem(): TreeMapDataItem {\r\n\t\treturn this._dataContext;\r\n\t}\r\n\r\n\t/**\r\n\t * Hides the Data Item and related visual elements.\r\n\t *\r\n\t * @param duration Animation duration (ms)\r\n\t * @param delay Delay animation (ms)\r\n\t * @param toValue A value to set to `fields` when hiding\r\n\t * @param fields A list of data fields to set value to `toValue`\r\n\t */\r\n\tpublic hide(duration?: number, delay?: number, toValue?: number, fields?: string[]): $type.Optional {\r\n\t\tlet treeMapDataItem = this.treeMapDataItem;\r\n\t\tif (treeMapDataItem) {\r\n\t\t\ttreeMapDataItem.hide(duration);\r\n\t\t}\r\n\t\treturn super.hide(duration, delay, toValue, fields);\r\n\t}\r\n\r\n\t/**\r\n\t * Shows the Data Item and related visual elements.\r\n\t *\r\n\t * @param duration Animation duration (ms)\r\n\t * @param delay Delay animation (ms)\r\n\t * @param fields A list of fields to set values of\r\n\t */\r\n\tpublic show(duration?: number, delay?: number, fields?: string[]): $type.Optional {\r\n\t\tlet treeMapDataItem = this.treeMapDataItem;\r\n\t\tif (treeMapDataItem) {\r\n\t\t\ttreeMapDataItem.show(duration, delay, fields);\r\n\t\t}\r\n\t\treturn super.show(duration, delay, fields);\r\n\t}\r\n}\r\n\r\n\r\n/**\r\n * ============================================================================\r\n * REQUISITES\r\n * ============================================================================\r\n * @hidden\r\n */\r\n\r\n/**\r\n * Defines data fields for [[TreeMapSeries]].\r\n */\r\nexport interface ITreeMapSeriesDataFields extends IColumnSeriesDataFields {\r\n\r\n\t/**\r\n\t * Name of the field in data that holds numeric value.\r\n\t */\r\n\tvalue?: string;\r\n\r\n}\r\n\r\n/**\r\n * Defines properties for [[TreeMapSeries]].\r\n */\r\nexport interface ITreeMapSeriesProperties extends IColumnSeriesProperties { }\r\n\r\n/**\r\n * Defines events for [[TreeMapSeries]].\r\n */\r\nexport interface ITreeMapSeriesEvents extends IColumnSeriesEvents { }\r\n\r\n/**\r\n * Defines adapters for [[TreeMapSeries]].\r\n *\r\n * @see {@link Adapter}\r\n */\r\nexport interface ITreeMapSeriesAdapters extends IColumnSeriesAdapters, ITreeMapSeriesProperties { }\r\n\r\n\r\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\r\n\r\n/**\r\n * Defines Series for a TreeMap chart.\r\n *\r\n * @see {@link ITreeMapSeriesEvents} for a list of available Events\r\n * @see {@link ITreeMapSeriesAdapters} for a list of available Adapters\r\n * @todo Example\r\n * @important\r\n */\r\nexport class TreeMapSeries extends ColumnSeries {\r\n\r\n\t/**\r\n\t * Defines the type of data fields used for the series.\r\n\t */\r\n\tpublic _dataFields: ITreeMapSeriesDataFields;\r\n\r\n\t/**\r\n\t * Defines available properties.\r\n\t */\r\n\tpublic _properties!: ITreeMapSeriesProperties;\r\n\r\n\t/**\r\n\t * Defines available adapters.\r\n\t */\r\n\tpublic _adapter!: ITreeMapSeriesAdapters;\r\n\r\n\t/**\r\n\t * Defines available events.\r\n\t */\r\n\tpublic _events!: ITreeMapSeriesEvents;\r\n\r\n\t/**\r\n\t * The level in treemap hierarchy series is at.\r\n\t */\r\n\tpublic level: number;\r\n\r\n\t/**\r\n\t * Type of the data item used by series.\r\n\t */\r\n\tpublic _dataItem: TreeMapSeriesDataItem;\r\n\r\n\t/**\r\n\t * A chart series belongs to.\r\n\t */\r\n\tpublic _chart: TreeMap;\r\n\r\n\t/**\r\n\t * Parent data item of a series.\r\n\t */\r\n\tpublic parentDataItem: TreeMapDataItem;\r\n\r\n\t/**\r\n\t * Constructor\r\n\t */\r\n\tconstructor() {\r\n\t\tsuper();\r\n\r\n\t\tthis.className = \"TreeMapSeries\";\r\n\t\tthis.applyTheme();\r\n\r\n\t\tthis.fillOpacity = 1;\r\n\t\tthis.strokeOpacity = 1;\r\n\t\tthis.minBulletDistance = 0;\r\n\t\tthis.columns.template.tooltipText = \"{parentName} {name}: {value}\"; //@todo add format number?\r\n\t\tthis.columns.template.configField = \"config\";\r\n\r\n\t\tlet interfaceColors = new InterfaceColorSet();\r\n\r\n\t\tthis.stroke = interfaceColors.getFor(\"background\");\r\n\t\tthis.dataFields.openValueX = \"x0\";\r\n\t\tthis.dataFields.valueX = \"x1\";\r\n\t\tthis.dataFields.openValueY = \"y0\";\r\n\t\tthis.dataFields.valueY = \"y1\";\r\n\r\n\t\tthis.sequencedInterpolation = false;\r\n\r\n\t\tthis.showOnInit = false;\r\n\r\n\t\t// otherwise nodes don't stack nicely to each other\r\n\t\tthis.columns.template.pixelPerfect = false;\r\n\t}\r\n\r\n\t/**\r\n\t * Processes data item.\r\n\t *\r\n\t * @param dataItem Data item\r\n\t * @param dataContext Raw data\r\n\t * @param index Index of the data item\r\n\t */\r\n\tprotected processDataItem(dataItem: this[\"_dataItem\"], dataContext?: Object): void {\r\n\t\t(dataContext).seriesDataItem = dataItem; // save a reference here. dataContext is TreeMapDataItem and we need to know dataItem sometimes\r\n\t\tsuper.processDataItem(dataItem, dataContext);\r\n\t}\r\n\r\n\t/**\r\n\t * Returns a new/empty DataItem of the type appropriate for this object.\r\n\t *\r\n\t * @see {@link DataItem}\r\n\t * @return Data Item\r\n\t */\r\n\tprotected createDataItem(): this[\"_dataItem\"] {\r\n\t\treturn new TreeMapSeriesDataItem();\r\n\t}\r\n\r\n\t/**\r\n\t * Shows series.\r\n\t *\r\n\t * @param duration Duration of fade in (ms)\r\n\t * @return Animation\r\n\t */\r\n\tpublic show(duration?: number): Animation {\r\n\t\tif(this.preventShow){\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tlet interpolationDuration = this.defaultState.transitionDuration;\r\n\t\tif ($type.isNumber(duration)) {\r\n\t\t\tinterpolationDuration = duration;\r\n\t\t}\r\n\r\n\t\tthis.dataItems.each((dataItem) => {\r\n\t\t\t//dataItem.treeMapDataItem.setWorkingValue(\"value\", dataItem.treeMapDataItem.values.value.value);\r\n\t\t\tdataItem.show(duration);\r\n\t\t})\r\n\r\n\t\treturn super.showReal(interpolationDuration);\r\n\t}\r\n\r\n\r\n\t/**\r\n\t * Hides series.\r\n\t *\r\n\t * @param duration Duration of fade out (ms)\r\n\t * @return Animation\r\n\t */\r\n\tpublic hide(duration?: number): Animation {\r\n\r\n\t\tlet interpolationDuration = this.defaultState.transitionDuration;\r\n\t\tif ($type.isNumber(duration)) {\r\n\t\t\tinterpolationDuration = duration;\r\n\t\t}\r\n\r\n\t\tlet animation = super.hideReal(interpolationDuration);\r\n\r\n\t\tthis.dataItems.each((dataItem) => {\r\n\t\t\t//dataItem.treeMapDataItem.setWorkingValue(\"value\", 0);\r\n\t\t\tdataItem.hide(duration);\r\n\t\t})\r\n\t\treturn animation;\r\n\t}\r\n\r\n\t/**\r\n\t * Process values.\r\n\t *\r\n\t * @ignore Exclude from docs\r\n\t */\r\n\tpublic processValues() {\r\n\r\n\t\t// Just overriding so that inherited method does not kick in.\r\n\r\n\t}\r\n\r\n\t/**\r\n\t * Returns relative start location for the data item.\r\n\t *\r\n\t * @param dataItem Data item\r\n\t * @return Location (0-1)\r\n\t */\r\n\tprotected getStartLocation(dataItem: this[\"_dataItem\"]): number {\t\t\r\n\t\treturn 0;\r\n\t}\t\r\n\r\n\t/**\r\n\t * Returns relative end location for the data item.\r\n\t *\r\n\t * @param dataItem Data item\r\n\t * @return Location (0-1)\r\n\t */\r\n\tprotected getEndLocation(dataItem: this[\"_dataItem\"]): number {\r\n\t\treturn 1;\r\n\t}\t\r\n\r\n\r\n\t/**\r\n\t * @ignore\r\n\t */\r\n\tpublic dataChangeUpdate() {\r\n\r\n\t}\r\n\r\n\t/**\r\n\t * Processes JSON-based config before it is applied to the object.\r\n\t *\r\n\t * @ignore Exclude from docs\r\n\t * @param config Config\r\n\t */\r\n\tpublic processConfig(config?: { [index: string]: any }): void {\r\n\r\n\t\tif (config) {\r\n\r\n\t\t\t// Add empty data fields if the they are not set, so that XYSeries\r\n\t\t\t// dataField check does not result in error.\r\n\t\t\tif (!$type.hasValue(config.dataFields) || !$type.isObject(config.dataFields)) {\r\n\t\t\t\tconfig.dataFields = {};\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t\tsuper.processConfig(config);\r\n\t}\r\n\r\n\t/**\r\n\t * Creates elements in related legend container, that mimics the look of this\r\n\t * Series.\r\n\t *\r\n\t * @ignore Exclude from docs\r\n\t * @param marker Legend item container\r\n\t */\r\n\tpublic createLegendMarker(marker: Container) {\r\n\t\tlet w: number = marker.pixelWidth;\r\n\t\tlet h: number = marker.pixelHeight;\r\n\r\n\t\tmarker.removeChildren();\r\n\r\n\t\tlet column: RoundedRectangle = marker.createChild(RoundedRectangle);\r\n\t\tcolumn.shouldClone = false;\r\n\t\t$object.copyProperties(this, column, visualProperties);\r\n\r\n\t\t//column.copyFrom(this.columns.template);\r\n\t\tcolumn.padding(0, 0, 0, 0); // if columns will have padding (which is often), legend marker will be very narrow\r\n\t\tcolumn.width = w;\r\n\t\tcolumn.height = h;\r\n\r\n\t\tlet legendDataItem = marker.dataItem;\r\n\t\tlegendDataItem.color = column.fill;\r\n\t\tlegendDataItem.colorOrig = column.fill;\r\n\t}\r\n\r\n\tprotected disableUnusedColumns(dataItem: ColumnSeriesDataItem) {\r\n\t\tsuper.disableUnusedColumns(dataItem);\r\n\t\tif(dataItem.column){\r\n\t\t\tdataItem.column.__disabled = false;\r\n\t\t}\r\n\t}\t\r\n}\r\n\r\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\r\nregistry.registeredClasses[\"TreeMapSeries\"] = TreeMapSeries;\r\nregistry.registeredClasses[\"TreeMapSeriesDataItem\"] = TreeMapSeriesDataItem;\r\n\n\n\n// WEBPACK FOOTER //\n// ../../../../../src/.internal/charts/series/TreeMapSeries.ts","/**\r\n * TreeMap chart module.\r\n *\r\n * Parts of the functionality used in this module are taken from D3.js library\r\n * (https://d3js.org/)\r\n */\r\n\r\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\r\nimport { XYChart, IXYChartProperties, IXYChartDataFields, IXYChartAdapters, IXYChartEvents, XYChartDataItem } from \"./XYChart\";\r\nimport { registry } from \"../../core/Registry\";\r\nimport { DictionaryTemplate, DictionaryDisposer } from \"../../core/utils/Dictionary\";\r\nimport { ValueAxis } from \"../axes/ValueAxis\";\r\nimport { OrderedListTemplate } from \"../../core/utils/SortedList\";\r\nimport { TreeMapSeries } from \"../series/TreeMapSeries\";\r\nimport { Color } from \"../../core/utils/Color\";\r\nimport { TreeMapSeriesDataItem } from \"../series/TreeMapSeries\";\r\nimport { NavigationBar } from \"../elements/NavigationBar\";\r\nimport { ColorSet } from \"../../core/utils/ColorSet\";\r\nimport { MouseCursorStyle } from \"../../core/interaction/Mouse\";\r\nimport { Export } from \"../../core/export/Export\";\r\nimport * as $iter from \"../../core/utils/Iterator\";\r\nimport * as $type from \"../../core/utils/Type\";\r\nimport * as $array from \"../../core/utils/Array\";\r\nimport { Animation } from \"../../core/utils/Animation\";\r\nimport { LegendDataItem } from \"../../charts/Legend\";\r\n\r\n/**\r\n * ============================================================================\r\n * DATA ITEM\r\n * ============================================================================\r\n * @hidden\r\n */\r\n\r\n/**\r\n * Defines a [[DataItem]] for [[TreeMap]].\r\n *\r\n * @see {@link DataItem}\r\n */\r\nexport class TreeMapDataItem extends XYChartDataItem {\r\n\r\n\t/**\r\n\t * Defines a type of [[Component]] this data item is used for.\r\n\t */\r\n\tpublic _component!: TreeMap;\r\n\r\n\t/**\r\n\t * A treemap level this data item is displayed at.\r\n\t */\r\n\tprotected _level: number;\r\n\r\n\t/**\r\n\t * Series of children data items.\r\n\t */\r\n\tprotected _series: TreeMapSeries;\r\n\r\n\t/**\r\n\t * Related series data item.\r\n\t */\r\n\tpublic seriesDataItem: TreeMapSeriesDataItem;\r\n\r\n\t/**\r\n\t * Required for squarify functionality.\r\n\t *\r\n\t * @ignore Exclude from docs\r\n\t */\r\n\tpublic rows: TreeMapDataItem[] = [];\r\n\r\n\t/**\r\n\t * Required for squarify functionality.\r\n\t *\r\n\t * @ignore Exclude from docs\r\n\t */\r\n\tpublic rowsRatio: number;\r\n\r\n\t/**\r\n\t * Required for squarify functionality.\r\n\t *\r\n\t * @ignore Exclude from docs\r\n\t */\r\n\tpublic dice: boolean;\r\n\r\n\t/**\r\n\t * A reference to a corresponding legend data item.\r\n\t */\r\n\tprotected _legendDataItem: LegendDataItem;\r\n\r\n\t/**\r\n\t * Constructor\r\n\t */\r\n\tconstructor() {\r\n\t\tsuper();\r\n\t\tthis.className = \"TreeMapDataItem\";\r\n\r\n\t\tthis.values.value = {workingValue:0};\r\n\r\n\t\tthis.values.x0 = {};\r\n\r\n\t\tthis.values.y0 = {};\r\n\r\n\t\tthis.values.x1 = {};\r\n\r\n\t\tthis.values.y1 = {};\r\n\r\n\t\tthis.hasChildren.children = true;\r\n\r\n\t\tthis.applyTheme();\r\n\t}\r\n\r\n\t/**\r\n\t * A legend's data item, that corresponds to this data item.\r\n\t *\r\n\t * @param value Legend data item\r\n\t */\r\n\tpublic set legendDataItem(value: LegendDataItem) {\r\n\t\tthis._legendDataItem = value;\r\n\t\tif (value.label) {\r\n\t\t\tvalue.label.dataItem = this;\r\n\t\t}\r\n\t\tif (value.valueLabel) {\r\n\t\t\tvalue.valueLabel.dataItem = this;\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * @return Legend data item\r\n\t */\r\n\tpublic get legendDataItem(): LegendDataItem {\r\n\t\treturn this._legendDataItem;\r\n\t}\r\n\r\n\t/**\r\n\t * Returns a duration (ms) the Data Item should take to animate from one\r\n\t * value to another.\r\n\t *\r\n\t * If the duration is not specified via parameter, this method will try to\r\n\t * request a default duration from the related `Component`.\r\n\t *\r\n\t * @param duration Default duration (ms)\r\n\t * @return Duration (ms)\r\n\t */\r\n\tpublic getDuration(): number {\r\n\t\treturn 0;\r\n\t}\r\n\r\n\t/**\r\n\t * Numeric value of the item.\r\n\t *\r\n\t * @param value Value\r\n\t */\r\n\tpublic set value(value: number) {\r\n\t\tthis.setValue(\"value\", value);\r\n\t}\r\n\r\n\t/**\r\n\t * @return Value\r\n\t */\r\n\tpublic get value(): number {\r\n\r\n\t\tlet value = 0;\r\n\t\tif (!this.children || this.children.length == 0) {\r\n\t\t\tvalue = this.values[\"value\"].workingValue;\r\n\t\t}\r\n\r\n\t\telse {\r\n\t\t\t$iter.each(this.children.iterator(), (child) => {\r\n\t\t\t\tlet childValue = child.value;\r\n\t\t\t\tif ($type.isNumber(childValue)) {\r\n\t\t\t\t\tvalue += childValue;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t}\r\n\r\n\t\treturn value;\r\n\t\t/*\r\n\t\tlet value = this.values[\"value\"].workingValue;\r\n\r\n\t\tif (!$type.isNumber(value)) {\r\n\t\t\tvalue = 0;\r\n\t\t\tif (this.children) {\r\n\t\t\t\t$iter.each(this.children.iterator(), (child) => {\r\n\t\t\t\t\tif ($type.isNumber(child.value)) {\r\n\t\t\t\t\t\tvalue += child.value;\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\treturn value;*/\r\n\t}\r\n\r\n\t/**\r\n\t * Percent value of a node\r\n\t */\r\n\tpublic get percent(): number {\r\n\t\tif (this.parent) {\r\n\t\t\treturn this.value / this.parent.value * 100;\r\n\t\t}\r\n\t\treturn 100;\r\n\t}\r\n\r\n\t/**\r\n\t * Item's X position.\r\n\t *\r\n\t * @ignore Exclude from docs\r\n\t * @todo Description (review)\r\n\t * @param value X\r\n\t */\r\n\tpublic set x0(value: number) {\r\n\t\tthis.setValue(\"x0\", value);\r\n\t}\r\n\r\n\t/**\r\n\t * @return X\r\n\t */\r\n\tpublic get x0(): number {\r\n\t\treturn this.values.x0.value;\r\n\t}\r\n\r\n\t/**\r\n\t * Item's X position.\r\n\t *\r\n\t * @ignore Exclude from docs\r\n\t * @todo Description (review)\r\n\t * @param value X\r\n\t */\r\n\tpublic set x1(value: number) {\r\n\t\tthis.setValue(\"x1\", value);\r\n\t}\r\n\r\n\t/**\r\n\t * @return X\r\n\t */\r\n\tpublic get x1(): number {\r\n\t\treturn this.values.x1.value;\r\n\t}\r\n\r\n\t/**\r\n\t * Item's Y position.\r\n\t *\r\n\t * @ignore Exclude from docs\r\n\t * @todo Description (review)\r\n\t * @param value Y\r\n\t */\r\n\tpublic set y0(value: number) {\r\n\t\tthis.setValue(\"y0\", value);\r\n\t}\r\n\r\n\t/**\r\n\t * @return Y\r\n\t */\r\n\tpublic get y0(): number {\r\n\t\treturn this.values.y0.value;\r\n\t}\r\n\r\n\t/**\r\n\t * Item's Y position.\r\n\t *\r\n\t * @ignore Exclude from docs\r\n\t * @todo Description (review)\r\n\t * @param value Y\r\n\t */\r\n\tpublic set y1(value: number) {\r\n\t\tthis.setValue(\"y1\", value);\r\n\t}\r\n\r\n\t/**\r\n\t * @return Y\r\n\t */\r\n\tpublic get y1(): number {\r\n\t\treturn this.values.y1.value;\r\n\t}\r\n\r\n\t/**\r\n\t * Item's name.\r\n\t *\r\n\t * @param name Name\r\n\t */\r\n\tpublic set name(name: string) {\r\n\t\tthis.setProperty(\"name\", name);\r\n\t}\r\n\r\n\t/**\r\n\t * @return Name\r\n\t */\r\n\tpublic get name(): string {\r\n\t\treturn this.properties.name;\r\n\t}\r\n\r\n\t/**\r\n\t * A list of item's sub-children.\r\n\t *\r\n\t * Having children means that the TreeMap chat will automatically be\r\n\t * \"drillable\". Clicking on an item with children will zoom to the item, then\r\n\t * display its children.\r\n\t *\r\n\t * Treemap can have any level of nesting.\r\n\t *\r\n\t * @param children Item's children\r\n\t */\r\n\tpublic set children(children: OrderedListTemplate) {\r\n\t\tthis.setProperty(\"children\", children);\r\n\t}\r\n\r\n\t/**\r\n\t * @return Item's children\r\n\t */\r\n\tpublic get children(): OrderedListTemplate {\r\n\t\treturn this.properties.children;\r\n\t}\r\n\r\n\t/**\r\n\t * Depth level in the treemap hierarchy.\r\n\t *\r\n\t * The top-level item will have level set at 0. Its children will have\r\n\t * level 1, and so on.\r\n\t *\r\n\t * @readonly\r\n\t * @return Level\r\n\t */\r\n\tpublic get level(): number {\r\n\t\tif (!this.parent) {\r\n\t\t\treturn 0;\r\n\t\t}\r\n\t\telse {\r\n\t\t\treturn this.parent.level + 1;\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Item's color.\r\n\t *\r\n\t * If not set, will use parent's color, or, if that is not set either,\r\n\t * automatically assigned color from chart's color set. (`chart.colors`)\r\n\t *\r\n\t * @param value Color\r\n\t */\r\n\tpublic set color(value: Color) {\r\n\t\tthis.setProperty(\"color\", value);\r\n\t}\r\n\r\n\t/**\r\n\t * @ignore\r\n\t * For the legend to work properly\r\n\t */\r\n\tpublic get fill(): Color {\r\n\t\treturn this.color;\r\n\t}\r\n\r\n\t/**\r\n\t * @return Color\r\n\t */\r\n\tpublic get color(): Color {\r\n\t\tlet color = this.properties.color;\r\n\r\n\t\tif (color == undefined) {\r\n\t\t\tif (this.parent) {\r\n\t\t\t\tcolor = this.parent.color;\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (color == undefined) {\r\n\t\t\tif (this.component) {\r\n\t\t\t\tcolor = this.component.colors.getIndex(this.component.colors.step * this.index);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn color;\r\n\t}\r\n\r\n\t/**\r\n\t * Series of children data items\r\n\t * @todo: proper descrition\r\n\t */\r\n\tpublic set series(series: TreeMapSeries) {\r\n\t\tif (series != this._series) {\r\n\t\t\tif (this._series) {\r\n\t\t\t\tthis.component.series.removeValue(this._series);\r\n\t\t\t\tthis._series.dispose();\r\n\t\t\t}\r\n\t\t\tthis._series = series;\r\n\t\t\tthis._disposers.push(series);\r\n\t\t}\r\n\t}\r\n\r\n\tpublic get series(): TreeMapSeries {\r\n\t\treturn this._series;\r\n\t}\r\n\r\n\t/**\r\n\t * Hides the Data Item and related visual elements.\r\n\t *\r\n\t * @param duration Animation duration (ms)\r\n\t * @param delay Delay animation (ms)\r\n\t * @param toValue A value to set to `fields` when hiding\r\n\t * @param fields A list of data fields to set value to `toValue`\r\n\t */\r\n\tpublic hide(duration?: number, delay?: number, toValue?: number, fields?: string[]): $type.Optional {\r\n\t\tthis.setWorkingValue(\"value\", 0);\r\n\r\n\t\tif (this.children) {\r\n\t\t\tthis.children.each((child) => {\r\n\t\t\t\tchild.hide(duration, delay, toValue, fields);\r\n\t\t\t})\r\n\t\t}\r\n\r\n\t\tlet seriesDataItem = this.seriesDataItem;\r\n\t\tif (seriesDataItem) {\r\n\t\t\tseriesDataItem.bullets.each((key, value) => {\r\n\t\t\t\tvalue.hide();\r\n\t\t\t\tvalue.preventShow = true;\r\n\t\t\t})\r\n\t\t}\r\n\r\n\t\treturn super.hide(duration, delay, toValue, fields);\r\n\t}\r\n\r\n\t/**\r\n\t * Shows the Data Item and related visual elements.\r\n\t *\r\n\t * @param duration Animation duration (ms)\r\n\t * @param delay Delay animation (ms)\r\n\t * @param fields A list of fields to set values of\r\n\t */\r\n\tpublic show(duration?: number, delay?: number, fields?: string[]): $type.Optional {\r\n\t\tthis.setWorkingValue(\"value\", this.values.value.value);\r\n\t\tif (this.children) {\r\n\t\t\tthis.children.each((child) => {\r\n\t\t\t\tchild.show(duration, delay, fields);\r\n\t\t\t})\r\n\t\t}\r\n\r\n\t\tlet seriesDataItem = this.seriesDataItem;\r\n\t\tif (seriesDataItem) {\r\n\t\t\tseriesDataItem.bullets.each((key, value) => {\r\n\t\t\t\tvalue.preventShow = false;\r\n\t\t\t})\r\n\t\t}\r\n\r\n\t\treturn super.show(duration, delay, fields);\r\n\t}\r\n}\r\n\r\n\r\n/**\r\n * ============================================================================\r\n * REQUISITES\r\n * ============================================================================\r\n * @hidden\r\n */\r\n\r\n/**\r\n * Defines data fields for [[TreeMap]].\r\n */\r\nexport interface ITreeMapDataFields extends IXYChartDataFields {\r\n\r\n\t/**\r\n\t * A name of the field in data that holds item's numeric value.\r\n\t */\r\n\tvalue?: string;\r\n\r\n\t/**\r\n\t * A name of the field in data that holds item's sub-items.\r\n\t */\r\n\tchildren?: string;\r\n\r\n\t/**\r\n\t * A name of the field in data that holds item's name.\r\n\t */\r\n\tname?: string;\r\n\r\n\t/**\r\n\t * A name of the field in data that holds item's color.\r\n\t *\r\n\t * If not set, a new color will be automatically assigned to each item as\r\n\t * defined by theme.\r\n\t */\r\n\tcolor?: string;\r\n\r\n}\r\n\r\n/**\r\n * Defines properties for [[TreeMap]].\r\n */\r\nexport interface ITreeMapProperties extends IXYChartProperties {\r\n\r\n\t/**\r\n\t * Maximum number of levels the chart will display initially.\r\n\t *\r\n\t * @default 2\r\n\t */\r\n\tmaxLevels?: number;\r\n\r\n\t/**\r\n\t * Current drill-down level the treemap is at.\r\n\t */\r\n\tcurrentLevel?: number;\r\n\r\n\t/**\r\n\t * Sorting direction of treemap items.\r\n\t *\r\n\t * @default \"descending\"\r\n\t */\r\n\tsorting?: \"none\" | \"ascending\" | \"descending\";\r\n\r\n\t/**\r\n\t * If set to `true`, columns of parent nodes will be hidden when user\r\n\t * drills-down into deeper levels.\r\n\t * \r\n\t * @sice 4.7.4\r\n\t * @default false\r\n\t */\r\n\thideParentColumns?: boolean;\r\n\r\n}\r\n\r\n/**\r\n * Defines events for [[TreeMap]].\r\n */\r\nexport interface ITreeMapEvents extends IXYChartEvents { }\r\n\r\n/**\r\n * Defines adapters for [[TreeMap]].\r\n *\r\n * @see {@link Adapter}\r\n */\r\nexport interface ITreeMapAdapters extends IXYChartAdapters, ITreeMapProperties { }\r\n\r\n\r\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\r\n\r\n/**\r\n * Creates a TreeMap chart.\r\n *\r\n * @see {@link ITreeMapEvents} for a list of available Events\r\n * @see {@link ITreeMapAdapters} for a list of available Adapters\r\n * @see {@link https://www.amcharts.com/docs/v4/chart-types/treemap/} for documentation\r\n */\r\nexport class TreeMap extends XYChart {\r\n\r\n\t/**\r\n\t * Defines a type of the data item used for this chart.\r\n\t */\r\n\tpublic _dataItem: TreeMapDataItem;\r\n\r\n\t/**\r\n\t * Defines available data fields.\r\n\t */\r\n\tpublic _dataFields: ITreeMapDataFields;\r\n\r\n\t/**\r\n\t * Defines available properties.\r\n\t */\r\n\tpublic _properties!: ITreeMapProperties;\r\n\r\n\t/**\r\n\t * Defines available adapters.\r\n\t */\r\n\tpublic _adapter!: ITreeMapAdapters;\r\n\r\n\t/**\r\n\t * Defines available events.\r\n\t */\r\n\tpublic _events!: ITreeMapEvents;\r\n\r\n\t/**\r\n\t * A horizontal value axis.\r\n\t *\r\n\t * TreeMap chart is basically an XY chart, which means it has vertical and\r\n\t * horizontal value axes.\r\n\t *\r\n\t * As with any XY-based chart, it can be zoomed.\r\n\t */\r\n\tpublic xAxis: ValueAxis;\r\n\r\n\t/**\r\n\t * A vertical value axis.\r\n\t *\r\n\t * TreeMap chart is basically an XY chart, which means it has vertical and\r\n\t * horizontal value axes.\r\n\t *\r\n\t * As with any XY-based chart, it can be zoomed.\r\n\t */\r\n\tpublic yAxis: ValueAxis;\r\n\r\n\t/**\r\n\t * An algorithm used to divide area into squares based on their value.\r\n\t *\r\n\t * Available options: squarify (default), binaryTree, slice, dice, sliceDice.\r\n\t *\r\n\t * ```TypeScript\r\n\t * chart.layoutAlgorithm = chart.sliceDice;\r\n\t * ```\r\n\t * ```JavaScript\r\n\t * chart.layoutAlgorithm = chart.sliceDice;\r\n\t * ```\r\n\t * ```JSON\r\n\t * {\r\n\t * // ...\r\n\t * \"layoutAlgorithm\": \"sliceDice\",\r\n\t * // ...\r\n\t * }\r\n\t * ```\r\n\t *\r\n\t * @see {@link https://www.amcharts.com/docs/v4/chart-types/treemap/#Area_division_methods} For more info and examples.\r\n\t * @default squarify\r\n\t */\r\n\tpublic layoutAlgorithm: (parent: TreeMapDataItem) => void = this.squarify;\r\n\r\n\t/**\r\n\t * Defines a type of series that this chart uses.\r\n\t */\r\n\tpublic _seriesType: TreeMapSeries;\r\n\r\n\t/**\r\n\t * [_homeDataItem description]\r\n\t *\r\n\t * @todo Description\r\n\t */\r\n\tprotected _homeDataItem: TreeMapDataItem;\r\n\r\n\t/**\r\n\t * [_tempSeries description]\r\n\t *\r\n\t * @todo Description\r\n\t */\r\n\tprotected _tempSeries: TreeMapSeries[];\r\n\r\n\t/**\r\n\t * A text dispalyed on the home button in breadcurmb nav control.\r\n\t */\r\n\tprotected _homeText: string;\r\n\r\n\t/**\r\n\t * A set of colors to be applied automatically to each new chart item, if\r\n\t * not explicitly set.\r\n\t */\r\n\tpublic colors: ColorSet;\r\n\r\n\t/**\r\n\t * Holds series object for each TreeMap level.\r\n\t *\r\n\t * \"0\" is the top-level series.\r\n\t * \"1\" is the second level.\r\n\t * Etc.\r\n\t *\r\n\t * @todo Description\r\n\t * @param Templates for each level\r\n\t */\r\n\tpublic seriesTemplates: DictionaryTemplate;\r\n\r\n\t/**\r\n\t * Is the chart zoomable?\r\n\t *\r\n\t * If the chart is `zoomable`, and items have sub-items, the chart will\r\n\t * drill-down to sub-items when click on their parent item.\r\n\t *\r\n\t * @default true\r\n\t */\r\n\tpublic zoomable: boolean = true;\r\n\r\n\r\n\t/**\r\n\t * A navigation bar used to show \"breadcrumb\" control, indicating current\r\n\t * drill-down path.\r\n\t */\r\n\tprotected _navigationBar: NavigationBar;\r\n\r\n\t/**\r\n\t * Currently selected data item.\r\n\t * @readonly\r\n\t */\r\n\tpublic currentlyZoomed: TreeMapDataItem;\r\n\r\n\t/**\r\n\t * Constructor\r\n\t */\r\n\tconstructor() {\r\n\r\n\t\t// Init\r\n\t\tsuper();\r\n\t\tthis.className = \"TreeMap\";\r\n\r\n\t\tthis._usesData = true;\r\n\r\n\t\tthis.maxLevels = 2;\r\n\t\tthis.currentLevel = 0;\r\n\t\tthis.hideParentColumns = false;\r\n\r\n\t\tthis.colors = new ColorSet();\r\n\t\tthis.sorting = \"descending\";\r\n\r\n\t\t// create two value axes for the chart\r\n\t\tlet xAxis = this.xAxes.push(new ValueAxis());\r\n\t\txAxis.title.disabled = true;\r\n\t\txAxis.strictMinMax = true;\r\n\r\n\t\tlet xRenderer = xAxis.renderer;\r\n\t\txRenderer.inside = true;\r\n\t\txRenderer.labels.template.disabled = true;\r\n\t\txRenderer.ticks.template.disabled = true;\r\n\t\txRenderer.grid.template.disabled = true;\r\n\t\txRenderer.axisFills.template.disabled = true;\r\n\t\txRenderer.minGridDistance = 100;\r\n\t\txRenderer.line.disabled = true;\r\n\t\txRenderer.baseGrid.disabled = true;\r\n\t\t//xRenderer.inversed = true;\r\n\r\n\t\tlet yAxis = this.yAxes.push(new ValueAxis());\r\n\t\tyAxis.title.disabled = true;\r\n\t\tyAxis.strictMinMax = true;\r\n\r\n\t\tlet yRenderer = yAxis.renderer;\r\n\t\tyRenderer.inside = true;\r\n\t\tyRenderer.labels.template.disabled = true;\r\n\t\tyRenderer.ticks.template.disabled = true;\r\n\t\tyRenderer.grid.template.disabled = true;\r\n\t\tyRenderer.axisFills.template.disabled = true;\r\n\t\tyRenderer.minGridDistance = 100;\r\n\t\tyRenderer.line.disabled = true;\r\n\t\tyRenderer.baseGrid.disabled = true;\r\n\t\tyRenderer.inversed = true;\r\n\r\n\t\t// shortcuts\r\n\t\tthis.xAxis = xAxis;\r\n\t\tthis.yAxis = yAxis;\r\n\r\n\t\tconst template = new TreeMapSeries();\r\n\t\tthis.seriesTemplates = new DictionaryTemplate(template);\r\n\t\ttemplate.virtualParent = this;\r\n\t\tthis._disposers.push(new DictionaryDisposer(this.seriesTemplates));\r\n\t\tthis._disposers.push(template);\r\n\r\n\t\tthis.zoomOutButton.events.on(\"hit\", () => {\r\n\t\t\tthis.zoomToChartDataItem(this._homeDataItem);\r\n\t\t}, undefined, false)\r\n\r\n\t\tthis.seriesTemplates.events.on(\"insertKey\", (event) => {\r\n\t\t\tevent.newValue.isTemplate = true;\r\n\t\t}, undefined, false)\r\n\r\n\t\t// Apply theme\r\n\t\tthis.applyTheme();\r\n\t}\r\n\r\n\t/**\r\n\t * A navigation bar used to show \"breadcrumb\" control, indicating current\r\n\t * drill-down path.\r\n\t */\r\n\tpublic set navigationBar(navigationBar: NavigationBar) {\r\n\t\tif (this._navigationBar != navigationBar) {\r\n\t\t\tthis._navigationBar = navigationBar;\r\n\t\t\tnavigationBar.parent = this;\r\n\t\t\tnavigationBar.toBack();\r\n\t\t\tnavigationBar.links.template.events.on(\"hit\", (event) => {\r\n\t\t\t\tlet dataItem = event.target.dataItem.dataContext;\r\n\t\t\t\tif (!dataItem.isDisposed()) {\r\n\t\t\t\t\tthis.zoomToChartDataItem(dataItem);\r\n\t\t\t\t\tthis.createTreeSeries(dataItem);\r\n\t\t\t\t}\r\n\t\t\t}, undefined, true);\r\n\r\n\t\t\tthis._disposers.push(navigationBar);\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Returns navigationBar if it is added to a chart\r\n\t */\r\n\tpublic get navigationBar(): NavigationBar {\r\n\t\treturn this._navigationBar;\r\n\t}\r\n\r\n\r\n\t/**\r\n\t * (Re)validates chart's data.\r\n\t *\r\n\t * @ignore Exclude from docs\r\n\t */\r\n\tpublic validateData(): void {\r\n\r\n\t\tthis.series.clear();\r\n\t\tthis._tempSeries = [];\r\n\r\n\t\tsuper.validateData();\r\n\r\n\t\tif (this._homeDataItem) {\r\n\t\t\tthis._homeDataItem.dispose();\r\n\t\t}\r\n\r\n\t\tlet homeDataItem = this.dataItems.template.clone(); // cant' use createDataItem here!\r\n\r\n\t\tthis._homeDataItem = homeDataItem;\r\n\r\n\t\t$iter.each(this.dataItems.iterator(), (dataItem) => {\r\n\t\t\tdataItem.parent = homeDataItem;\r\n\t\t});\r\n\r\n\t\thomeDataItem.children = this.dataItems;\r\n\r\n\t\thomeDataItem.x0 = 0;\r\n\t\thomeDataItem.y0 = 0;\r\n\t\thomeDataItem.name = this._homeText;\r\n\r\n\t\tlet maxX = 1000;\r\n\t\tlet maxY = Math.round((maxX * this.pixelHeight / this.pixelWidth) / 10) * 10 || 1000;\r\n\r\n\t\thomeDataItem.x1 = maxX;\r\n\t\thomeDataItem.y1 = maxY;\r\n\r\n\t\tthis.xAxis.min = 0;\r\n\t\tthis.xAxis.max = maxX;\r\n\t\tthis.xAxis.getMinMax();\r\n\r\n\t\tthis.yAxis.min = 0;\r\n\t\tthis.yAxis.max = maxY;\r\n\t\tthis.yAxis.getMinMax();\r\n\r\n\t\tthis.layoutItems(homeDataItem);\r\n\r\n\t\tthis.createTreeSeries(homeDataItem);\r\n\r\n\t\tthis.feedLegend();\r\n\t}\r\n\r\n\t/**\r\n\t * Layouts and sizes all items according to their value and\r\n\t * `layoutAlgorithm`.\r\n\t *\r\n\t * @ignore Exclude from docs\r\n\t * @param parent Parent data item\r\n\t */\r\n\tpublic layoutItems(parent: TreeMapDataItem, sorting?: \"none\" | \"ascending\" | \"descending\"): void {\r\n\t\tif (parent) {\r\n\t\t\tlet children = parent.children;\r\n\r\n\t\t\tif (!sorting) {\r\n\t\t\t\tsorting = this.sorting;\r\n\t\t\t}\r\n\r\n\t\t\tif (sorting == \"ascending\") {\r\n\t\t\t\tchildren.values.sort((a, b) => {\r\n\t\t\t\t\treturn a.value - b.value;\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t\tif (sorting == \"descending\") {\r\n\t\t\t\tchildren.values.sort((a, b) => {\r\n\t\t\t\t\treturn b.value - a.value;\r\n\t\t\t\t});\r\n\t\t\t}\r\n\r\n\t\t\tthis._updateDataItemIndexes(0);\r\n\r\n\t\t\tthis.layoutAlgorithm(parent);\r\n\r\n\t\t\tfor (let i = 0, len = children.length; i < len; i++) {\r\n\r\n\t\t\t\tlet node = children.getIndex(i);\r\n\r\n\t\t\t\tif (node.children) {\r\n\t\t\t\t\tthis.layoutItems(node);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\r\n\t/**\r\n\t * Creates and returns a new treemap series.\r\n\t *\r\n\t * @todo Description\r\n\t * @param dataItem Data item to create series out of\r\n\t */\r\n\tprotected createTreeSeries(dataItem: TreeMapDataItem) {\r\n\t\tthis._tempSeries = [];\r\n\r\n\t\tlet navigationData = [dataItem];\r\n\r\n\t\t// create parent series and navigation data\r\n\t\tlet parentDataItem = dataItem.parent;\r\n\t\twhile (parentDataItem != undefined) {\r\n\t\t\tthis.initSeries(parentDataItem);\r\n\t\t\tnavigationData.push(parentDataItem);\r\n\t\t\tparentDataItem = parentDataItem.parent;\r\n\t\t}\r\n\r\n\t\tnavigationData.reverse();\r\n\r\n\t\tif (this.navigationBar) {\r\n\t\t\tthis.navigationBar.data = navigationData;\r\n\t\t}\r\n\r\n\t\t// create series and children series\r\n\t\tthis.createTreeSeriesReal(dataItem);\r\n\r\n\t\t// add those which are not in the list\r\n\t\t$array.each(this._tempSeries, (series) => {\r\n\t\t\tif (this.series.indexOf(series) == -1) {\r\n\t\t\t\tthis.series.push(series);\r\n\t\t\t}\r\n\t\t\tseries.zIndex = series.level;\r\n\t\t})\r\n\t}\r\n\r\n\t/**\r\n\t * [createTreeSeriesReal description]\r\n\t *\r\n\t * @todo Description\r\n\t * @param dataItem [description]\r\n\t */\r\n\tprotected createTreeSeriesReal(dataItem: TreeMapDataItem) {\r\n\t\tif (dataItem.children) {\r\n\t\t\tlet level = dataItem.level;\r\n\r\n\t\t\tif (level < this.currentLevel + this.maxLevels) {\r\n\r\n\t\t\t\tthis.initSeries(dataItem);\r\n\r\n\t\t\t\tfor (let i = 0; i < dataItem.children.length; i++) {\r\n\t\t\t\t\tlet child = dataItem.children.getIndex(i);\r\n\t\t\t\t\tif (child.children) {\r\n\t\t\t\t\t\tthis.createTreeSeriesReal(child);\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}\r\n\r\n\tprotected setData(value: any[]) {\r\n\t\tthis.currentLevel = 0;\r\n\t\tthis.currentlyZoomed = undefined;\r\n\t\tthis.xAxis.start = 0;\r\n\t\tthis.xAxis.end = 1;\r\n\t\tthis.yAxis.start = 0;\r\n\t\tthis.yAxis.end = 1;\r\n\t\tsuper.setData(value);\r\n\t}\r\n\t/**\r\n\t * @ignore\r\n\t * Overriding, as tree map series are created on the fly all the time\r\n\t */\r\n\tprotected seriesAppeared(): boolean {\r\n\t\treturn true;\r\n\t}\r\n\r\n\r\n\t/**\r\n\t * Initializes the treemap series.\r\n\t *\r\n\t * @todo Description\r\n\t * @param dataItem Chart data item\r\n\t */\r\n\tprotected initSeries(dataItem: TreeMapDataItem) {\r\n\t\tif (!dataItem.series) {\r\n\t\t\tlet series: TreeMapSeries;\r\n\r\n\t\t\tlet template = this.seriesTemplates.getKey(dataItem.level.toString());\r\n\t\t\tif (template) {\r\n\t\t\t\tseries = template.clone();\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tseries = this.series.create();\r\n\t\t\t}\r\n\t\t\t// for the legend to get {value}\r\n\t\t\tseries.dataItem.dataContext = dataItem;\r\n\r\n\t\t\tseries.name = dataItem.name;\r\n\t\t\tseries.parentDataItem = dataItem;\r\n\t\t\tdataItem.series = series;\r\n\r\n\t\t\tlet level = dataItem.level;\r\n\t\t\tseries.level = level;\r\n\r\n\t\t\tlet dataContext: any = dataItem.dataContext;\r\n\t\t\tif (dataContext) {\r\n\t\t\t\tseries.config = dataContext.config;\r\n\t\t\t}\r\n\r\n\t\t\tthis.dataUsers.removeValue(series); // series do not use data directly, that's why we remove it\r\n\t\t\tseries.data = dataItem.children.values;\r\n\t\t\tseries.fill = dataItem.color;\r\n\r\n\t\t\tseries.columnsContainer.hide(0);\r\n\t\t\tseries.bulletsContainer.hide(0);\r\n\r\n\t\t\tseries.columns.template.adapter.add(\"fill\", (fill, target) => {\r\n\t\t\t\tlet dataItem = target.dataItem;\r\n\t\t\t\tif (dataItem) {\r\n\t\t\t\t\tlet treeMapDataItem = dataItem.treeMapDataItem;\r\n\t\t\t\t\tif (treeMapDataItem) {\r\n\t\t\t\t\t\ttarget.fill = treeMapDataItem.color;\r\n\t\t\t\t\t\ttarget.adapter.remove(\"fill\"); //@todo: make it possible adapters applied once?\r\n\t\t\t\t\t\treturn treeMapDataItem.color;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\tif (this.zoomable && (dataItem.level > this.currentLevel || (dataItem.children && dataItem.children.length > 0))) {\r\n\t\t\t\tseries.columns.template.cursorOverStyle = MouseCursorStyle.pointer;\r\n\t\t\t\tif (this.zoomable) {\r\n\t\t\t\t\tseries.columns.template.events.on(\"hit\", (event) => {\r\n\t\t\t\t\t\tlet seriesDataItem = event.target.dataItem;\r\n\r\n\t\t\t\t\t\tif (dataItem.level > this.currentLevel) {\r\n\t\t\t\t\t\t\tthis.zoomToChartDataItem(seriesDataItem.treeMapDataItem.parent);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\tthis.zoomToSeriesDataItem(seriesDataItem);\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t}, this, undefined);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tthis._tempSeries.push(dataItem.series);\r\n\t}\r\n\r\n\t/**\r\n\t * Toggles bullets so that labels that belong to current drill level are\r\n\t * shown.\r\n\t *\r\n\t * @param duration Animation duration (ms)\r\n\t */\r\n\tprotected toggleBullets(duration?: number): void {\r\n\t\t// hide all series which are not in tempSeries\r\n\t\t$iter.each(this.series.iterator(), (series) => {\r\n\t\t\tif (this._tempSeries.indexOf(series) == - 1) {\r\n\t\t\t\t//series.hideReal(duration);\r\n\t\t\t\tseries.columnsContainer.hide();\r\n\t\t\t\tseries.bulletsContainer.hide(duration);\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\t//series.showReal(duration);\r\n\t\t\t\tseries.columnsContainer.show();\r\n\t\t\t\tseries.bulletsContainer.show(duration);\r\n\r\n\t\t\t\tseries.dataItems.each((dataItem) => {\r\n\t\t\t\t\tdataItem.bullets.each((key, bullet) => {\r\n\t\t\t\t\t\tbullet.show();\r\n\t\t\t\t\t})\r\n\t\t\t\t})\r\n\r\n\t\t\t\tif (series.level < this.currentLevel) {\r\n\t\t\t\t\tif (this.hideParentColumns) {\r\n\t\t\t\t\t\tseries.columnsContainer.hide();\r\n\t\t\t\t\t}\r\n\t\t\t\t\tseries.bulletsContainer.hide(duration);\r\n\t\t\t\t}\r\n\t\t\t\telse if (series.level == this.currentLevel) {\r\n\t\t\t\t\tif (this.maxLevels > 1) {\r\n\t\t\t\t\t\tseries.dataItems.each((dataItem) => {\r\n\t\t\t\t\t\t\tif (dataItem.treeMapDataItem.children) {\r\n\t\t\t\t\t\t\t\tdataItem.bullets.each((key, bullet) => {\r\n\t\t\t\t\t\t\t\t\tbullet.hide();\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})\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}\r\n\r\n\t/**\r\n\t * Zooms to particular item in series.\r\n\t *\r\n\t * @param dataItem Data item\r\n\t */\r\n\tpublic zoomToSeriesDataItem(dataItem: TreeMapSeriesDataItem): void {\r\n\t\tthis.zoomToChartDataItem(dataItem.treeMapDataItem);\r\n\t}\r\n\r\n\t/**\r\n\t * Zooms to particular item. If dataItem is not specified, the chart will zoom-out.\r\n\t *\r\n\t * @ignore Exclude from docs\r\n\t * @param dataItem Data item\r\n\t */\r\n\tpublic zoomToChartDataItem(dataItem?: TreeMapDataItem): void {\r\n\t\tif (!dataItem) {\r\n\t\t\tdataItem = this._homeDataItem;\r\n\t\t}\r\n\r\n\t\tlet zoomOutButton = this.zoomOutButton;\r\n\t\t// this is needed because if there is only one fist level, it won't be shown\r\n\t\tif (zoomOutButton) {\r\n\t\t\tif (dataItem != this._homeDataItem) {\r\n\t\t\t\tzoomOutButton.show();\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tzoomOutButton.hide();\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (dataItem && dataItem.children) {\r\n\t\t\tthis.xAxis.zoomToValues(dataItem.x0, dataItem.x1);\r\n\t\t\tthis.yAxis.zoomToValues(dataItem.y0, dataItem.y1);\r\n\r\n\t\t\tthis.currentLevel = dataItem.level;\r\n\t\t\tthis.currentlyZoomed = dataItem;\r\n\r\n\t\t\tthis.createTreeSeries(dataItem);\r\n\r\n\t\t\tlet rangeChangeAnimation = this.xAxis.rangeChangeAnimation || this.yAxis.rangeChangeAnimation;\r\n\r\n\t\t\tif (rangeChangeAnimation && !rangeChangeAnimation.isDisposed() && !rangeChangeAnimation.isFinished()) {\r\n\t\t\t\tthis._dataDisposers.push(rangeChangeAnimation);\r\n\r\n\t\t\t\trangeChangeAnimation.events.once(\"animationended\", () => {\r\n\t\t\t\t\tthis.toggleBullets();\r\n\t\t\t\t})\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tthis.toggleBullets();\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Sets defaults that instantiate some objects that rely on parent, so they\r\n\t * cannot be set in constructor.\r\n\t */\r\n\tprotected applyInternalDefaults(): void {\r\n\r\n\t\tsuper.applyInternalDefaults();\r\n\r\n\t\t// Add a default screen reader title for accessibility\r\n\t\t// This will be overridden in screen reader if there are any `titles` set\r\n\t\tif (!$type.hasValue(this.readerTitle)) {\r\n\t\t\tthis.readerTitle = this.language.translate(\"TreeMap chart\");\r\n\t\t}\r\n\t\t//this.homeText = this.language.translate(\"Home\");\r\n\t}\r\n\r\n\t/**\r\n\t * Returns a new/empty DataItem of the type appropriate for this object.\r\n\t *\r\n\t * @see {@link DataItem}\r\n\t * @return Data Item\r\n\t */\r\n\tprotected createDataItem(): this[\"_dataItem\"] {\r\n\t\treturn new TreeMapDataItem();\r\n\t}\r\n\r\n\t/**\r\n\t * Maximum number of levels the chart will display initially.\r\n\t *\r\n\t * @default 2\r\n\t * @param value Maximum drill-down level\r\n\t */\r\n\tpublic set maxLevels(value: number) {\r\n\t\tthis.setPropertyValue(\"maxLevels\", value, true);\r\n\t}\r\n\r\n\t/**\r\n\t * @return Maximum drill-down level\r\n\t */\r\n\tpublic get maxLevels(): number {\r\n\t\treturn this.getPropertyValue(\"maxLevels\");\r\n\t}\r\n\r\n\t/**\r\n\t * Current drill-down level the chart is at.\r\n\t *\r\n\t * @param value Current level\r\n\t */\r\n\tpublic set currentLevel(value: number) {\r\n\t\tthis.setPropertyValue(\"currentLevel\", value, true);\r\n\t}\r\n\r\n\t/**\r\n\t * @return Current level\r\n\t */\r\n\tpublic get currentLevel(): number {\r\n\t\treturn this.getPropertyValue(\"currentLevel\");\r\n\t}\r\n\r\n\t/**\r\n\t * If set to `true`, columns of parent nodes will be hidden when user\r\n\t * drills-down into deeper levels.\r\n\t * \r\n\t * @sice 4.7.4\r\n\t * @default false\r\n\t * @param value Hide?\r\n\t */\r\n\tpublic set hideParentColumns(value: boolean) {\r\n\t\tthis.setPropertyValue(\"hideParentColumns\", value);\r\n\t}\r\n\r\n\t/**\r\n\t * @return Hide?\r\n\t */\r\n\tpublic get hideParentColumns(): boolean {\r\n\t\treturn this.getPropertyValue(\"hideParentColumns\");\r\n\t}\r\n\r\n\t/**\r\n\t * Sorting direction of treemap items.\r\n\t *\r\n\t * Available options: \"none\", \"ascending\", and \"descending\" (default).\r\n\t *\r\n\t * @default \"descending\"\r\n\t * @param value [description]\r\n\t */\r\n\tpublic set sorting(value: \"none\" | \"ascending\" | \"descending\") {\r\n\t\tthis.setPropertyValue(\"sorting\", value, true);\r\n\t}\r\n\r\n\tpublic get sorting(): \"none\" | \"ascending\" | \"descending\" {\r\n\t\treturn this.getPropertyValue(\"sorting\");\r\n\t}\r\n\r\n\t/**\r\n\t * Creates and returns a new series of the suitable type.\r\n\t *\r\n\t * @return new series\r\n\t */\r\n\tprotected createSeries(): this[\"_seriesType\"] {\r\n\t\treturn new TreeMapSeries();\r\n\t}\r\n\r\n\t/**\r\n\t * A text displayed on the \"home\" button which is used to go back to level 0\r\n\t * after drill into sub-items.\r\n\t *\r\n\t * @param value Home text\r\n\t */\r\n\tpublic set homeText(value: string) {\r\n\t\tthis._homeText = value;\r\n\t\tif (this._homeDataItem) {\r\n\t\t\tthis._homeDataItem.name = this._homeText;\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * @return Home text\r\n\t */\r\n\tpublic get homeText(): string {\r\n\t\treturn this._homeText;\r\n\t}\r\n\r\n\t/**\r\n\t * Processes JSON-based config before it is applied to the object.\r\n\t *\r\n\t * @ignore Exclude from docs\r\n\t * @param config Config\r\n\t */\r\n\tpublic processConfig(config?: { [index: string]: any }): void {\r\n\r\n\t\tif (config) {\r\n\r\n\t\t\t// Instantiate layout algorithm\r\n\t\t\tif ($type.hasValue(config[\"layoutAlgorithm\"]) && $type.isString(config[\"layoutAlgorithm\"])) {\r\n\t\t\t\tswitch (config[\"layoutAlgorithm\"]) {\r\n\t\t\t\t\tcase \"squarify\":\r\n\t\t\t\t\t\tconfig[\"layoutAlgorithm\"] = this.squarify;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase \"binaryTree\":\r\n\t\t\t\t\t\tconfig[\"layoutAlgorithm\"] = this.binaryTree;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase \"slice\":\r\n\t\t\t\t\t\tconfig[\"layoutAlgorithm\"] = this.slice;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase \"dice\":\r\n\t\t\t\t\t\tconfig[\"layoutAlgorithm\"] = this.dice;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase \"sliceDice\":\r\n\t\t\t\t\t\tconfig[\"layoutAlgorithm\"] = this.sliceDice;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tdefault:\r\n\t\t\t\t\t\tdelete config[\"layoutAlgorithm\"];\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\r\n\t\t\t// Set type for navigation bar\r\n\t\t\tif ($type.hasValue(config.navigationBar) && !$type.hasValue(config.navigationBar.type)) {\r\n\t\t\t\tconfig.navigationBar.type = \"NavigationBar\";\r\n\t\t\t}\r\n\r\n\t\t\tsuper.processConfig(config);\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Measures the size of container and informs its children of how much size\r\n\t * they can occupy, by setting their relative `maxWidth` and `maxHeight`\r\n\t * properties.\r\n\t *\r\n\t * @ignore Exclude from docs\r\n\t */\r\n\tpublic validateLayout() {\r\n\t\tsuper.validateLayout();\r\n\t\tthis.layoutItems(this.currentlyZoomed);\r\n\t}\r\n\r\n\t/**\r\n\t * Validates (processes) data items.\r\n\t *\r\n\t * @ignore Exclude from docs\r\n\t */\r\n\tpublic validateDataItems() {\r\n\t\tsuper.validateDataItems();\r\n\t\tthis.layoutItems(this._homeDataItem);\r\n\r\n\t\t$iter.each(this.series.iterator(), (series) => {\r\n\t\t\tseries.validateRawData();\r\n\t\t});\r\n\r\n\t\tthis.zoomToChartDataItem(this._homeDataItem);\r\n\t}\r\n\r\n\r\n\t/**\r\n\t * ==========================================================================\r\n\t * TREEMAP LAYOUT FUNCTIONS\r\n\t * ==========================================================================\r\n\t * @hidden\r\n\t */\r\n\r\n\t/**\r\n\t * The functions below are from D3.js library (https://d3js.org/)\r\n\t *\r\n\t * --------------------------------------------------------------------------\r\n\t * Copyright 2017 Mike Bostock\r\n\t *\r\n\t * Redistribution and use in source and binary forms, with or without\r\n\t * modification, are permitted provided that the following conditions are met:\r\n\t *\r\n\t * 1. Redistributions of source code must retain the above copyright notice,\r\n\t * this list of conditions and the following disclaimer.\r\n\t *\r\n\t * 2. Redistributions in binary form must reproduce the above copyright\r\n\t * notice,this list of conditions and the following disclaimer in the\r\n\t * documentation and/or other materials provided with the distribution.\r\n\t *\r\n\t * 3. Neither the name of the copyright holder nor the names of its\r\n\t * contributors may be used to endorse or promote products derived from\r\n\t * this software without specific prior written permission.\r\n\t *\r\n\t * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\r\n\t * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\r\n\t * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\r\n\t * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE\r\n\t * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\r\n\t * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\r\n\t * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\r\n\t * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\r\n\t * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\r\n\t * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\r\n\t * POSSIBILITY OF SUCH DAMAGE.\r\n\t * --------------------------------------------------------------------------\r\n\t * @hidden\r\n\t */\r\n\r\n\t/**\r\n\t * Treemap layout algorithm: binaryTree.\r\n\t *\r\n\t * @ignore Exclude from docs\r\n\t * @param parent Data item\r\n\t */\r\n\tpublic binaryTree(parent: TreeMapDataItem): void {\r\n\t\tlet nodes = parent.children,\r\n\t\t\ti, n = nodes.length,\r\n\t\t\tsum, sums = new Array(n + 1);\r\n\r\n\t\tfor (sums[0] = sum = i = 0; i < n; ++i) {\r\n\t\t\tsums[i + 1] = sum += nodes.getIndex(i).value;\r\n\t\t}\r\n\r\n\t\tif(n > 0){\r\n\t\t\tpartition(0, n, parent.value, parent.x0, parent.y0, parent.x1, parent.y1);\r\n\t\t}\r\n\r\n\t\tfunction partition(i: number, j: number, value: number, x0: number, y0: number, x1: number, y1: number) {\r\n\r\n\t\t\tif (i >= j - 1) {\r\n\t\t\t\tlet node = nodes.getIndex(i);\r\n\t\t\t\tnode.x0 = x0;\r\n\t\t\t\tnode.y0 = y0;\r\n\t\t\t\tnode.x1 = x1;\r\n\t\t\t\tnode.y1 = y1;\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\tlet valueOffset = sums[i],\r\n\t\t\t\tvalueTarget = (value / 2) + valueOffset,\r\n\t\t\t\tk = i + 1,\r\n\t\t\t\thi = j - 1;\r\n\r\n\t\t\twhile (k < hi) {\r\n\t\t\t\tlet mid = k + hi >>> 1;\r\n\t\t\t\tif (sums[mid] < valueTarget) {\r\n\t\t\t\t\tk = mid + 1;\r\n\t\t\t\t} else {\r\n\t\t\t\t\thi = mid;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif ((valueTarget - sums[k - 1]) < (sums[k] - valueTarget) && i + 1 < k) {\r\n\t\t\t\t--k;\r\n\t\t\t}\r\n\r\n\t\t\tlet valueLeft = sums[k] - valueOffset,\r\n\t\t\t\tvalueRight = value - valueLeft;\r\n\r\n\t\t\tif(value == 0){\r\n\t\t\t\tlet node = nodes.getIndex(i);\r\n\t\t\t\tnode.x0 = x0;\r\n\t\t\t\tnode.y0 = y0;\r\n\t\t\t\tnode.x1 = x1;\r\n\t\t\t\tnode.y1 = y1;\t\t\t\t\r\n\t\t\t\treturn;\r\n\t\t\t}\t\t\t\t\r\n\r\n\t\t\tif ((x1 - x0) > (y1 - y0)) {\r\n\t\t\t\tlet xk = (x0 * valueRight + x1 * valueLeft) / value;\r\n\t\t\t\tpartition(i, k, valueLeft, x0, y0, xk, y1);\r\n\t\t\t\tpartition(k, j, valueRight, xk, y0, x1, y1);\r\n\t\t\t} else {\r\n\t\t\t\tlet yk = (y0 * valueRight + y1 * valueLeft) / value;\r\n\t\t\t\tpartition(i, k, valueLeft, x0, y0, x1, yk);\r\n\t\t\t\tpartition(k, j, valueRight, x0, yk, x1, y1);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Treemap layout algorithm: slice.\r\n\t *\r\n\t * @ignore Exclude from docs\r\n\t * @param parent Data item\r\n\t */\r\n\tpublic slice(parent: TreeMapDataItem): void {\r\n\t\tlet x0 = parent.x0;\r\n\t\tlet x1 = parent.x1;\r\n\t\tlet y0 = parent.y0;\r\n\t\tlet y1 = parent.y1;\r\n\r\n\t\tlet nodes = parent.children;\r\n\t\tlet node;\r\n\t\tlet i = -1;\r\n\t\tlet n = nodes.length;\r\n\t\tlet k = parent.value && (y1 - y0) / parent.value;\r\n\r\n\t\twhile (++i < n) {\r\n\t\t\tnode = nodes.getIndex(i);\r\n\t\t\tnode.x0 = x0;\r\n\t\t\tnode.x1 = x1;\r\n\t\t\tnode.y0 = y0;\r\n\t\t\ty0 += node.value * k;\r\n\t\t\tnode.y1 = y0;\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Treemap layout algorithm: dice.\r\n\t *\r\n\t * @ignore Exclude from docs\r\n\t * @param parent Data item\r\n\t */\r\n\tpublic dice(parent: TreeMapDataItem): void {\r\n\t\tlet x0 = parent.x0;\r\n\t\tlet x1 = parent.x1;\r\n\t\tlet y0 = parent.y0;\r\n\t\tlet y1 = parent.y1;\r\n\r\n\t\tlet nodes = parent.children,\r\n\t\t\tnode,\r\n\t\t\ti = -1,\r\n\t\t\tn = nodes.length,\r\n\t\t\tk = parent.value && (x1 - x0) / parent.value;\r\n\r\n\t\twhile (++i < n) {\r\n\t\t\tnode = nodes.getIndex(i);\r\n\t\t\tnode.y0 = y0;\r\n\t\t\tnode.y1 = y1;\r\n\t\t\tnode.x0 = x0;\r\n\t\t\tx0 += node.value * k;\r\n\t\t\tnode.x1 = x0;\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Treemap layout algorithm: slideDice.\r\n\t *\r\n\t * @ignore Exclude from docs\r\n\t * @param parent Data item\r\n\t */\r\n\tpublic sliceDice(parent: TreeMapDataItem): void {\r\n\t\tif (parent.level & 1) {\r\n\t\t\tthis.slice(parent);\r\n\t\t} else {\r\n\t\t\tthis.dice(parent);\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Treemap layout algorithm: squarify.\r\n\t *\r\n\t * @ignore Exclude from docs\r\n\t * @param parent Data item\r\n\t */\r\n\tpublic squarify(parent: TreeMapDataItem): void {\r\n\t\tlet ratio = (1 + Math.sqrt(5)) / 2;\r\n\r\n\t\tlet x0 = parent.x0;\r\n\t\tlet x1 = parent.x1;\r\n\t\tlet y0 = parent.y0;\r\n\t\tlet y1 = parent.y1;\r\n\r\n\t\tlet nodes = parent.children;\r\n\t\tlet nodeValue;\r\n\t\tlet i0 = 0;\r\n\t\tlet i1 = 0;\r\n\t\tlet n = nodes.length;\r\n\t\tlet dx;\r\n\t\tlet dy;\r\n\t\tlet value = parent.value;\r\n\t\tlet sumValue;\r\n\t\tlet minValue;\r\n\t\tlet maxValue;\r\n\t\tlet newRatio;\r\n\t\tlet minRatio;\r\n\t\tlet alpha;\r\n\t\tlet beta;\r\n\r\n\t\twhile (i0 < n) {\r\n\t\t\tdx = x1 - x0;\r\n\t\t\tdy = y1 - y0;\r\n\r\n\t\t\t// Find the next non-empty node.\r\n\t\t\tdo {\r\n\t\t\t\tsumValue = nodes.getIndex(i1++).value;\r\n\t\t\t} while (!sumValue && i1 < n);\r\n\r\n\t\t\tminValue = maxValue = sumValue;\r\n\t\t\talpha = Math.max(dy / dx, dx / dy) / (value * ratio);\r\n\t\t\tbeta = sumValue * sumValue * alpha;\r\n\t\t\tminRatio = Math.max(maxValue / beta, beta / minValue);\r\n\r\n\t\t\t// Keep adding nodes while the aspect ratio maintains or improves.\r\n\t\t\tfor (; i1 < n; ++i1) {\r\n\t\t\t\tsumValue += nodeValue = nodes.getIndex(i1).value;\r\n\t\t\t\tif (nodeValue < minValue) {\r\n\t\t\t\t\tminValue = nodeValue;\r\n\t\t\t\t}\r\n\t\t\t\tif (nodeValue > maxValue) {\r\n\t\t\t\t\tmaxValue = nodeValue;\r\n\t\t\t\t}\r\n\t\t\t\tbeta = sumValue * sumValue * alpha;\r\n\t\t\t\tnewRatio = Math.max(maxValue / beta, beta / minValue);\r\n\t\t\t\tif (newRatio > minRatio) {\r\n\t\t\t\t\tsumValue -= nodeValue; break;\r\n\t\t\t\t}\r\n\t\t\t\tminRatio = newRatio;\r\n\t\t\t}\r\n\r\n\t\t\t// Position and record the row orientation.\r\n\t\t\tlet row = this.dataItems.template.clone();\r\n\t\t\trow.value = sumValue;\r\n\t\t\trow.dice = dx < dy;\r\n\t\t\trow.children = nodes.slice(i0, i1);\r\n\t\t\trow.x0 = x0;\r\n\t\t\trow.y0 = y0;\r\n\t\t\trow.x1 = x1;\r\n\t\t\trow.y1 = y1;\r\n\r\n\t\t\tif (row.dice) {\r\n\t\t\t\trow.y1 = value ? (y0 += (dy * sumValue) / value) : y1;\r\n\t\t\t\tthis.dice(row);\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\trow.x1 = value ? (x0 += (dx * sumValue) / value) : x1;\r\n\t\t\t\tthis.slice(row);\r\n\t\t\t}\r\n\t\t\tvalue -= sumValue;\r\n\t\t\ti0 = i1;\r\n\t\t}\r\n\t}\r\n\r\n\tprotected handleSeriesAdded2() {\r\n\t\t// void\r\n\t}\r\n\r\n\t/**\r\n\t * [handleDataItemValueChange description]\r\n\t *\r\n\t * @ignore Exclude from docs\r\n\t * @todo Description\r\n\t */\r\n\tpublic handleDataItemValueChange(dataItem?: this[\"_dataItem\"], name?: string): void {\r\n\t\tif (name == \"value\") {\r\n\t\t\tthis.invalidateDataItems();\r\n\t\t}\r\n\t}\r\n\r\n\tpublic handleDataItemWorkingValueChange(dataItem?: this[\"_dataItem\"], name?: string): void {\r\n\t\tif (name == \"value\") {\r\n\t\t\tthis.invalidateDataItems();\r\n\t\t}\r\n\t}\r\n\r\n\tprotected getLegendLevel(dataItem: TreeMapDataItem): TreeMapDataItem {\r\n\t\tif (!dataItem) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tif (!dataItem.children) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tif (dataItem.children.length > 1) {\r\n\t\t\treturn dataItem;\r\n\t\t}\r\n\t\telse if (dataItem.children.length == 1) {\r\n\t\t\tlet child = dataItem.children.getIndex(0);\r\n\t\t\tif (child.children) {\r\n\t\t\t\treturn this.getLegendLevel(child);\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\treturn dataItem;\r\n\t\t\t}\r\n\t\t}\r\n\t\telse {\r\n\t\t\treturn dataItem;\r\n\t\t}\r\n\t}\r\n\r\n\tprotected handleLegendSeriesAdded(series:TreeMapSeries){\r\n\t\t// void\r\n\t}\t\r\n\r\n\t/**\r\n\t * A data item associated with top node.\r\n\t * \r\n\t * @since 4.8.2\r\n\t */\r\n\tpublic get homeDataItem(): TreeMapDataItem {\r\n\t\treturn this._homeDataItem;\r\n\t}\r\n\r\n\t/**\r\n\t * Setups the legend to use the chart's data.\r\n\t * @ignore\r\n\t */\r\n\tpublic feedLegend(): void {\r\n\t\tlet legend = this.legend;\r\n\t\tif (legend) {\r\n\r\n\t\t\tlegend.dataFields.name = \"name\";\r\n\r\n\t\t\tlet legendParent = this.getLegendLevel(this._homeDataItem);\r\n\r\n\t\t\tif (legendParent) {\r\n\t\t\t\tlet legendData: Array = [];\r\n\r\n\t\t\t\tlegendParent.children.each((dataItem) => {\r\n\t\t\t\t\t//if (!dataItem.hiddenInLegend) {\r\n\t\t\t\t\tlegendData.push(dataItem);\r\n\t\t\t\t\t//}\r\n\t\t\t\t});\r\n\r\n\t\t\t\tlegend.data = legendData;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * @ignore\r\n\t */\r\n\tpublic disposeData() {\r\n\r\n\t\tsuper.disposeData();\r\n\r\n\t\tthis._homeDataItem = undefined;\r\n\r\n\t\tthis.series.clear();\r\n\r\n\t\tif (this.navigationBar) {\r\n\t\t\tthis.navigationBar.disposeData();\r\n\t\t}\r\n\r\n\t\tthis.xAxis.disposeData();\r\n\t\tthis.yAxis.disposeData();\r\n\t}\r\n\r\n\t/**\r\n\t * Since this chart uses hierarchical data, we need to remove childrent\r\n\t * dataField from export of non-hierarchical formats such as CSV and XSLX.\r\n\t *\r\n\t * @return Export\r\n\t */\r\n\tprotected getExporting(): Export {\r\n\t\tconst exporting = super.getExporting();\r\n\t\texporting.adapter.add(\"formatDataFields\", (info) => {\r\n\t\t\tif (info.format == \"csv\" || info.format == \"xlsx\") {\r\n\t\t\t\tif ($type.hasValue(this.dataFields.children)) {\r\n\t\t\t\t\tdelete info.dataFields[this.dataFields.children];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn info;\r\n\t\t})\r\n\t\treturn exporting;\r\n\t}\r\n\r\n}\r\n\r\n/**\r\n * Register class, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\r\nregistry.registeredClasses[\"TreeMap\"] = TreeMap;\r\n\n\n\n// WEBPACK FOOTER //\n// ../../../../../src/.internal/charts/types/TreeMap.ts","/**\r\n * Module, defining Axis Renderer for horizontal 3D axes.\r\n */\r\n\r\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\r\nimport { AxisRendererX, IAxisRendererXProperties, IAxisRendererXAdapters, IAxisRendererXEvents } from \"../axes/AxisRendererX\";\r\nimport { Sprite, ISpriteEvents, AMEvent } from \"../../core/Sprite\";\r\nimport { XYChart3D } from \"../types/XYChart3D\";\r\nimport { Grid } from \"../axes/Grid\";\r\nimport { IPoint } from \"../../core/defs/IPoint\";\r\nimport { MutableValueDisposer } from \"../../core/utils/Disposer\";\r\nimport { registry } from \"../../core/Registry\";\r\nimport * as $path from \"../../core/rendering/Path\";\r\n\r\n\r\n/**\r\n * ============================================================================\r\n * REQUISITES\r\n * ============================================================================\r\n * @hidden\r\n */\r\n\r\n/**\r\n * Defines properties for [[AxisRendererX3D]].\r\n */\r\nexport interface IAxisRendererX3DProperties extends IAxisRendererXProperties { }\r\n\r\n/**\r\n * Defines events for [[AxisRendererX3D]].\r\n */\r\nexport interface IAxisRendererX3DEvents extends IAxisRendererXEvents { }\r\n\r\n/**\r\n * Defines adapters for [[AxisRendererX3D]].\r\n *\r\n * @see {@link Adapter}\r\n */\r\nexport interface IAxisRendererX3DAdapters extends IAxisRendererXAdapters, IAxisRendererX3DProperties { }\r\n\r\n\r\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\r\n\r\n/**\r\n * Renderer for horizontal 3D axis.\r\n *\r\n * @see {@link IAxisRendererX3DEvents} for a list of available events\r\n * @see {@link IAxisRendererX3DAdapters} for a list of available Adapters\r\n */\r\nexport class AxisRendererX3D extends AxisRendererX {\r\n\r\n\t/**\r\n\t * Defines available properties\r\n\t */\r\n\tpublic _properties!: IAxisRendererX3DProperties;\r\n\r\n\t/**\r\n\t * Defines available adapters\r\n\t */\r\n\tpublic _adapter!: IAxisRendererX3DAdapters;\r\n\r\n\t/**\r\n\t * Defines available events.\r\n\t */\r\n\tpublic _events!: IAxisRendererX3DEvents;\r\n\r\n\t/**\r\n\t * A related chart.\r\n\t *\r\n\t * @todo Description\r\n\t */\r\n\tprotected _chart = new MutableValueDisposer();\r\n\r\n\t/**\r\n\t * Constructor.\r\n\t *\r\n\t * @param axis Related axis\r\n\t */\r\n\tconstructor() {\r\n\t\tsuper();\r\n\t\tthis.className = \"AxisRendererX3D\";\r\n\r\n\t\tthis._disposers.push(this._chart);\r\n\r\n\t\tthis.applyTheme();\r\n\t}\r\n\r\n\t/**\r\n\t * Updates and positions a grid element.\r\n\t *\r\n\t * @ignore Exclude from docs\r\n\t * @param grid Grid element\r\n\t * @param position Starting position\r\n\t * @param endPosition End position\r\n\t */\r\n\tpublic updateGridElement(grid: Grid, position: number, endPosition: number) {\r\n\t\tposition = position + (endPosition - position) * grid.location;\r\n\t\tlet point: IPoint = this.positionToPoint(position);\r\n\r\n\t\tif (grid.element) {\r\n\r\n\t\t\tlet dx: number = this.chart.dx3D || 0;\r\n\t\t\tlet dy: number = this.chart.dy3D || 0;\r\n\r\n\t\t\tlet h: number = this.getHeight();\r\n\r\n\t\t\tgrid.path = $path.moveTo({ x: dx, y: dy }) + $path.lineTo({ x: dx, y: h + dy }) + $path.lineTo({ x: 0, y: h });\r\n\t\t}\r\n\t\tthis.positionItem(grid, point);\r\n\r\n\t\tthis.toggleVisibility(grid, position, 0, 1);\r\n\t}\r\n\r\n\t/**\r\n\t * Updates and positions the base grid element.\r\n\t *\r\n\t * @ignore Exclude from docs\r\n\t */\r\n\tpublic updateBaseGridElement() {\r\n\t\tsuper.updateBaseGridElement();\r\n\r\n\t\tlet h = this.getHeight();\r\n\t\tlet dx = this.chart.dx3D || 0;\r\n\t\tlet dy = this.chart.dy3D || 0;\r\n\t\tthis.baseGrid.path = $path.moveTo({ x: dx, y: dy }) + $path.lineTo({ x: 0, y: 0 }) + $path.lineTo({ x: 0, y: h });\r\n\t}\r\n\r\n\t/**\r\n\t * Chart, associated with the Axis.\r\n\t *\r\n\t * @ignore Exclude from docs\r\n\t * @param value Chart\r\n\t */\r\n\tpublic set chart(chart: XYChart3D) {\r\n\t\tif (chart) {\r\n\t\t\tthis._chart.set(chart, chart.events.on(\"propertychanged\", this.handle3DChanged, this, false));\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * @ignore Exclude from docs\r\n\t * @return Chart\r\n\t */\r\n\tpublic get chart(): XYChart3D {\r\n\t\treturn this._chart.get();\r\n\t}\r\n\r\n\t/**\r\n\t * Invoked when 3D-related settings change, like depth or angle.\r\n\t *\r\n\t * @param event Event\r\n\t */\r\n\tprotected handle3DChanged(event: AMEvent[\"propertychanged\"]): void {\r\n\t\tif (event.property == \"depth\" || event.property == \"angle\") {\r\n\t\t\tthis.invalidate();\r\n\t\t}\r\n\t}\r\n\r\n}\r\n\r\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\r\nregistry.registeredClasses[\"AxisRendererX3D\"] = AxisRendererX3D;\r\n\n\n\n// WEBPACK FOOTER //\n// ../../../../../src/.internal/charts/axes/AxisRendererX3D.ts","/**\r\n * Module, defining Axis Renderer for vertical 3D axes.\r\n */\r\n\r\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\r\nimport { AxisRendererY, IAxisRendererYProperties, IAxisRendererYAdapters, IAxisRendererYEvents } from \"../axes/AxisRendererY\";\r\nimport { Sprite, ISpriteEvents, AMEvent } from \"../../core/Sprite\";\r\nimport { XYChart3D } from \"../types/XYChart3D\";\r\nimport { Grid } from \"../axes/Grid\";\r\nimport { IPoint } from \"../../core/defs/IPoint\";\r\nimport { MutableValueDisposer } from \"../../core/utils/Disposer\";\r\nimport * as $path from \"../../core/rendering/Path\";\r\n\r\n\r\n/**\r\n * ============================================================================\r\n * REQUISITES\r\n * ============================================================================\r\n * @hidden\r\n */\r\n\r\n/**\r\n * Defines properties for [[AxisRendererY3D]].\r\n */\r\nexport interface IAxisRendererY3DProperties extends IAxisRendererYProperties { }\r\n\r\n/**\r\n * Defines events for [[AxisRendererY3D]].\r\n */\r\nexport interface IAxisRendererY3DEvents extends IAxisRendererYEvents { }\r\n\r\n/**\r\n * Defines adapters for [[AxisRendererY3D]].\r\n *\r\n * @see {@link Adapter}\r\n */\r\nexport interface IAxisRendererY3DAdapters extends IAxisRendererYAdapters, IAxisRendererY3DProperties { }\r\n\r\n\r\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\r\n\r\n/**\r\n * Renderer for vertical 3D axis.\r\n *\r\n * @see {@link IAxisRendererY3DEvents} for a list of available events\r\n * @see {@link IAxisRendererY3DAdapters} for a list of available Adapters\r\n */\r\nexport class AxisRendererY3D extends AxisRendererY {\r\n\r\n\t/**\r\n\t * Defines available properties.\r\n\t */\r\n\tpublic _properties!: IAxisRendererY3DProperties;\r\n\r\n\t/**\r\n\t * Defines available adapters.\r\n\t */\r\n\tpublic _adapter!: IAxisRendererY3DAdapters;\r\n\r\n\t/**\r\n\t * Defines available events.\r\n\t */\r\n\tpublic _events!: IAxisRendererY3DEvents;\r\n\r\n\t/**\r\n\t * A related chart.\r\n\t *\r\n\t * @todo Description\r\n\t */\r\n\tprotected _chart = new MutableValueDisposer();\r\n\r\n\t/**\r\n\t * Constructor.\r\n\t *\r\n\t * @param axis Related axis\r\n\t */\r\n\tconstructor() {\r\n\t\tsuper();\r\n\t\tthis.className = \"AxisRendererY3D\";\r\n\t\tthis._disposers.push(this._chart);\r\n\t\tthis.applyTheme();\r\n\t}\r\n\r\n\t/**\r\n\t * Updates and positions a grid element.\r\n\t *\r\n\t * @ignore Exclude from docs\r\n\t * @param grid Grid element\r\n\t * @param position Starting position\r\n\t * @param endPosition End position\r\n\t */\r\n\tpublic updateGridElement(grid: Grid, position: number, endPosition: number): void {\r\n\t\tposition = position + (endPosition - position) * grid.location;\r\n\r\n\t\tlet point: IPoint = this.positionToPoint(position);\r\n\t\tif (grid.element) {\r\n\r\n\t\t\tlet dx: number = this.chart.dx3D || 0;\r\n\t\t\tlet dy: number = this.chart.dy3D || 0;\r\n\r\n\t\t\tlet w: number = this.getWidth();\r\n\r\n\t\t\tgrid.path = $path.moveTo({ x: 0, y: 0 }) + $path.lineTo({ x: dx, y: dy }) + $path.lineTo({ x: w + dx, y: dy });\r\n\t\t}\r\n\t\tthis.positionItem(grid, point);\r\n\r\n\t\tthis.toggleVisibility(grid, position, 0, 1);\r\n\t}\r\n\r\n\t/**\r\n\t * Updates and positions the base grid element.\r\n\t *\r\n\t * @ignore Exclude from docs\r\n\t */\r\n\tpublic updateBaseGridElement(): void {\r\n\t\tsuper.updateBaseGridElement();\r\n\r\n\t\tlet dx: number = this.chart.dx3D || 0;\r\n\t\tlet dy: number = this.chart.dy3D || 0;\r\n\r\n\t\tlet w: number = this.getWidth();\r\n\t\tthis.baseGrid.path = $path.moveTo({ x: 0, y: 0 })\r\n\t\t\t+ $path.lineTo({ x: w, y: 0 })\r\n\t\t\t+ $path.lineTo({ x: w + dx, y: dy });\r\n\t}\r\n\r\n\t/**\r\n\t * Chart, associated with the Axis.\r\n\t *\r\n\t * @ignore Exclude from docs\r\n\t * @param value Chart\r\n\t */\r\n\tpublic set chart(chart: XYChart3D) {\r\n\t\tif (chart) {\r\n\t\t\tthis._chart.set(chart, chart.events.on(\"propertychanged\", this.handle3DChanged, this, false));\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * @ignore Exclude from docs\r\n\t * @return Chart\r\n\t */\r\n\tpublic get chart(): XYChart3D {\r\n\t\treturn this._chart.get();\r\n\t}\r\n\r\n\t/**\r\n\t * Invoked when 3D-related settings change, like depth or angle.\r\n\t *\r\n\t * @param event Event\r\n\t */\r\n\tprotected handle3DChanged(event: AMEvent[\"propertychanged\"]): void {\r\n\t\tif (event.property == \"depth\" || event.property == \"angle\") {\r\n\t\t\tthis.invalidate();\r\n\t\t}\r\n\t}\r\n\r\n}\r\n\n\n\n// WEBPACK FOOTER //\n// ../../../../../src/.internal/charts/axes/AxisRendererY3D.ts","/**\r\n * Module that defines everything related to building 3D Columns.\r\n * It is a container which has column3D element which is a Rectangle3D.\r\n */\r\n\r\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\r\nimport { Column, IColumnProperties, IColumnAdapters, IColumnEvents } from \"./Column\";\r\nimport { Rectangle3D } from \"../../core/elements/3d/Rectangle3D\";\r\nimport { registry } from \"../../core/Registry\";\r\nimport { Color } from \"../../core/utils/Color\";\r\nimport { RadialGradient } from \"../../core/rendering/fills/RadialGradient\";\r\nimport { LinearGradient } from \"../../core/rendering/fills/LinearGradient\";\r\nimport { Pattern } from \"../../core/rendering/fills/Pattern\";\r\nimport * as $type from \"../../core/utils/Type\";\r\n\r\n\r\n/**\r\n * ============================================================================\r\n * REQUISITES\r\n * ============================================================================\r\n * @hidden\r\n */\r\n\r\n/**\r\n * Defines properties for [[Column3D]].\r\n */\r\nexport interface IColumn3DProperties extends IColumnProperties { }\r\n\r\n/**\r\n * Defines events for [[Column3D]].\r\n */\r\nexport interface IColumn3DEvents extends IColumnEvents { }\r\n\r\n/**\r\n * Defines adapters for [[Column3D]].\r\n *\r\n * @see {@link Adapter}\r\n */\r\nexport interface IColumn3DAdapters extends IColumnAdapters, IColumn3DProperties { }\r\n\r\n\r\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\r\n\r\n/**\r\n * Class used to creates Column3Ds.\r\n *\r\n * @see {@link IColumn3DEvents} for a list of available events\r\n * @see {@link IColumn3DAdapters} for a list of available Adapters\r\n * @todo Usage example\r\n * @important\r\n */\r\nexport class Column3D extends Column {\r\n\r\n\t/**\r\n\t * Defines available properties.\r\n\t */\r\n\tpublic _properties!: IColumn3DProperties;\r\n\r\n\t/**\r\n\t * Defines available adapters.\r\n\t */\r\n\tpublic _adapter!: IColumn3DAdapters;\r\n\r\n\t/**\r\n\t * Defines available events.\r\n\t */\r\n\tpublic _events!: IColumn3DEvents;\r\n\r\n\r\n\t/**\r\n\t * column3D element\r\n\t */\r\n\tpublic column3D: Rectangle3D;\r\n\r\n\t/**\r\n\t * Constructor\r\n\t */\r\n\tconstructor() {\r\n\t\tsuper();\r\n\t\tthis.className = \"Column3D\";\r\n\t}\r\n\r\n\t/**\r\n\t * @ignore\r\n\t */\r\n\tprotected createAssets() {\r\n\t\tthis.column3D = this.createChild(Rectangle3D);\r\n\t\tthis.column3D.shouldClone = false;\r\n\t\tthis.column3D.strokeOpacity = 0;\r\n\r\n\t\t// some dirty hack so that if user access column, it won't get error\r\n\t\tthis.column = this.column3D;\r\n\t}\r\n\r\n\t/**\r\n\t * @ignore Exclude from docs\r\n\t */\r\n\tpublic validate() {\r\n\t\tsuper.validate();\r\n\t\tif (this.column3D) {\r\n\t\t\tthis.column3D.width = this.pixelWidth;\r\n\t\t\tthis.column3D.height = this.pixelHeight;\r\n\t\t\tif(this.column3D.invalid){\r\n\t\t\t\tthis.column3D.validate();\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Copies all parameters from another [[Column3D]].\r\n\t *\r\n\t * @param source Source Column3D\r\n\t */\r\n\tpublic copyFrom(source: this) {\r\n\t\tsuper.copyFrom(source)\r\n\t\tif (this.column3D) {\r\n\t\t\tthis.column3D.copyFrom(source.column3D);\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Sets actual `fill` property on the SVG element, including applicable color\r\n\t * modifiers.\r\n\t *\r\n\t * @ignore Exclude from docs\r\n\t * @param value Fill\r\n\t */\r\n\tprotected setFill(value: $type.Optional): void {\r\n\t\tsuper.setFill(value);\r\n\t\tthis.column.fill = value;\r\n\t}\r\n}\r\n\r\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\r\nregistry.registeredClasses[\"Column3D\"] = Column3D;\r\n\n\n\n// WEBPACK FOOTER //\n// ../../../../../src/.internal/charts/elements/Column3D.ts","/**\r\n * 3D column series module.\r\n */\r\n\r\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\r\nimport { ColumnSeries, IColumnSeriesProperties, IColumnSeriesDataFields, IColumnSeriesAdapters, IColumnSeriesEvents, ColumnSeriesDataItem } from \"../series/ColumnSeries\";\r\nimport { Container } from \"../../core/Container\";\r\nimport { XYChart3D } from \"../types/XYChart3D\";\r\nimport { Column3D } from \"../elements/Column3D\";\r\nimport { registry } from \"../../core/Registry\";\r\n\r\n\r\n/**\r\n * ============================================================================\r\n * DATA ITEM\r\n * ============================================================================\r\n * @hidden\r\n */\r\n\r\nexport class ColumnSeries3DDataItem extends ColumnSeriesDataItem {\r\n\r\n\t/**\r\n\t * A sprite used to draw the column.\r\n\t */\r\n\tpublic _column: Column3D;\r\n\r\n\t/**\r\n\t * Constructor\r\n\t */\r\n\tconstructor() {\r\n\t\tsuper();\r\n\t\tthis.className = \"ColumnSeries3DDataItem\";\r\n\t\tthis.applyTheme();\r\n\t}\r\n\r\n}\r\n\r\n\r\n/**\r\n * ============================================================================\r\n * REQUISITES\r\n * ============================================================================\r\n * @hidden\r\n */\r\n\r\n/**\r\n * Defines data fields for [[ColumnSeries3D]].\r\n */\r\nexport interface IColumnSeries3DDataFields extends IColumnSeriesDataFields { }\r\n\r\n/**\r\n * Defines properties for [[ColumnSeries3D]].\r\n */\r\nexport interface IColumnSeries3DProperties extends IColumnSeriesProperties {\r\n\r\n\t/**\r\n\t * Depth (height) of the slices in the series in pixels.\r\n\t *\r\n\t * @ignore Exclude from docs\r\n\t */\r\n\tdepth?: number;\r\n\r\n\t/**\r\n\t * Angle of view for the slices in series. (0-360)\r\n\t *\r\n\t * @ignore Exclude from docs\r\n\t */\r\n\tangle?: number;\r\n\r\n}\r\n\r\n/**\r\n * Defines events for [[ColumnSeries3D]].\r\n */\r\nexport interface IColumnSeries3DEvents extends IColumnSeriesEvents { }\r\n\r\n/**\r\n * Defines adapters for [[ColumnSeries3D]].\r\n *\r\n * @see {@link Adapter}\r\n */\r\nexport interface IColumnSeries3DAdapters extends IColumnSeriesAdapters, IColumnSeries3DProperties { }\r\n\r\n\r\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\r\n\r\n/**\r\n * Defines [[Series]] for a 3D column graph.\r\n *\r\n * @see {@link IColumnSeries3DEvents} for a list of available Events\r\n * @see {@link IColumnSeries3DAdapters} for a list of available Adapters\r\n * @todo Example\r\n * @important\r\n */\r\nexport class ColumnSeries3D extends ColumnSeries {\r\n\r\n\t/**\r\n\t * Type of data item.\r\n\t */\r\n\tpublic _dataItem: ColumnSeries3DDataItem;\r\n\r\n\t/**\r\n\t * Type of column.\r\n\t */\r\n\tpublic _column: Column3D;\r\n\r\n\t/**\r\n\t * Defines the type for data fields.\r\n\t */\r\n\tpublic _dataFields: IColumnSeries3DDataFields;\r\n\r\n\t/**\r\n\t * Defines available properties.\r\n\t */\r\n\tpublic _properties!: IColumnSeries3DProperties;\r\n\r\n\t/**\r\n\t * Defines available adapters.\r\n\t */\r\n\tpublic _adapter!: IColumnSeries3DAdapters;\r\n\r\n\t/**\r\n\t * Defines available events.\r\n\t */\r\n\tpublic _events!: IColumnSeries3DEvents;\r\n\r\n\t/**\r\n\t * Specifies how deep in 3d space columns should be drawn.\r\n\t *\r\n\t * Internal use only.\r\n\t *\r\n\t * @ignore Exclude from docs\r\n\t */\r\n\tpublic depthIndex: number;\r\n\r\n\t/**\r\n\t * A chart series belongs to.\r\n\t */\r\n\tpublic _chart: XYChart3D;\r\n\r\n\t/**\r\n\t * Constructor\r\n\t */\r\n\tconstructor() {\r\n\t\tsuper();\r\n\r\n\t\tthis.className = \"ColumnSeries3D\";\r\n\r\n\t\tthis.columns.template.column3D.applyOnClones = true;\r\n\t\tthis.columns.template.hiddenState.properties.visible = true;\r\n\r\n\t\tthis.applyTheme();\r\n\t}\r\n\r\n\t/**\r\n\t * @ignore\r\n\t */\r\n\tpublic get columnsContainer(): Container {\r\n\t\tlet chart = this.chart;\r\n\t\tif (chart && chart.columnsContainer && chart.leftAxesContainer.layout != \"vertical\" && chart.rightAxesContainer.layout != \"vertical\" && chart.bottomAxesContainer.layout != \"horizontal\" && chart.topAxesContainer.layout != \"horizontal\") {\r\n\t\t\treturn chart.columnsContainer;\r\n\t\t}\r\n\t\telse {\r\n\t\t\treturn this._columnsContainer;\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Validates data item's elements.\r\n\t *\r\n\t * @ignore Exclude from docs\r\n\t * @param dataItem Data item\r\n\t */\r\n\tpublic validateDataElementReal(dataItem: this[\"_dataItem\"]): void {\r\n\t\tsuper.validateDataElementReal(dataItem);\r\n\t\tif (dataItem.column) {\r\n\t\t\tdataItem.column.dx = this.dx;\r\n\t\t\tdataItem.column.dy = this.dy;\r\n\r\n\t\t\tdataItem.column.visible = this.visible;\r\n\t\t}\r\n\t}\r\n\r\n\r\n\t/**\r\n\t * Validates data item's elements.\r\n\t *\r\n\t * @ignore Exclude from docs\r\n\t */\r\n\tpublic validateDataElements(): void {\r\n\t\tsuper.validateDataElements();\r\n\t\tif (this.chart) {\r\n\t\t\tthis.chart.invalidateLayout();\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Returns an element to use for 3D bar.\r\n\t * @ignore\r\n\t * @return Element.\r\n\t */\r\n\tprotected createColumnTemplate(): this[\"_column\"] {\r\n\t\treturn new Column3D();\r\n\t}\r\n\r\n\r\n\r\n\t/**\r\n\t * Depth (height) of the slices in the series in pixels.\r\n\t *\r\n\t * @ignore Exclude from docs\r\n\t * @param value Depth (px)\r\n\t */\r\n\tpublic set depth(value: number) {\r\n\t\tthis.setPropertyValue(\"depth\", value, true);\r\n\t\tlet template = this.columns.template; // todo: Cone is not Rectangle3D, maybe we should do some I3DShape?\r\n\t\ttemplate.column3D.depth = value;\r\n\t}\r\n\r\n\t/**\r\n\t * @ignore Exclude from docs\r\n\t * @return Depth (px)\r\n\t */\r\n\tpublic get depth(): number {\r\n\t\treturn this.getPropertyValue(\"depth\");\r\n\t}\r\n\r\n\t/**\r\n\t * Angle of view for the slices in series. (0-360)\r\n\t *\r\n\t * @ignore Exclude from docs\r\n\t * @param value Angle (0-360)\r\n\t */\r\n\tpublic set angle(value: number) {\r\n\t\tthis.setPropertyValue(\"angle\", value);\r\n\t\tlet template = this.columns.template;\r\n\t\ttemplate.column3D.angle = value;\r\n\t}\r\n\r\n\t/**\r\n\t * @ignore Exclude from docs\r\n\t * @return Angle (0-360)\r\n\t */\r\n\tpublic get angle(): number {\r\n\t\treturn this.getPropertyValue(\"angle\");\r\n\t}\r\n}\r\n\r\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\r\nregistry.registeredClasses[\"ColumnSeries3D\"] = ColumnSeries3D;\r\nregistry.registeredClasses[\"ColumnSeries3DDataItem\"] = ColumnSeries3DDataItem;\r\n\n\n\n// WEBPACK FOOTER //\n// ../../../../../src/.internal/charts/series/ColumnSeries3D.ts","/**\r\n * Module for building 3D serial charts.\r\n */\r\n\r\n/**\r\n * ============================================================================\r\n * Imports\r\n * ============================================================================\r\n * @hidden\r\n */\r\nimport { XYChart, IXYChartProperties, IXYChartDataFields, IXYChartAdapters, IXYChartEvents, XYChartDataItem } from \"./XYChart\";\r\nimport { Container } from \"../../core/Container\";\r\nimport { Sprite } from \"../../core/Sprite\";\r\nimport { AxisRendererX3D } from \"../axes/AxisRendererX3D\";\r\nimport { AxisRendererY3D } from \"../axes/AxisRendererY3D\";\r\nimport { ColumnSeries3D } from \"../series/ColumnSeries3D\";\r\nimport { registry } from \"../../core/Registry\";\r\nimport * as $iter from \"../../core/utils/Iterator\";\r\nimport * as $math from \"../../core/utils/Math\";\r\nimport * as $type from \"../../core/utils/Type\";\r\nimport * as $path from \"../../core/rendering/Path\";\r\nimport * as $utils from \"../../core/utils/Utils\";\r\n\r\n/**\r\n * ============================================================================\r\n * DATA ITEM\r\n * ============================================================================\r\n * @hidden\r\n */\r\n\r\n/**\r\n * Defines a [[DataItem]] for [[XYChart3D]].\r\n *\r\n * @see {@link DataItem}\r\n */\r\nexport class XYChart3DDataItem extends XYChartDataItem {\r\n\r\n\tconstructor() {\r\n\t\tsuper();\r\n\t\tthis.className = \"XYChart3DDataItem\";\r\n\t\tthis.applyTheme();\r\n\t}\r\n}\r\n\r\n\r\n/**\r\n * ============================================================================\r\n * REQUISITES\r\n * ============================================================================\r\n * @hidden\r\n */\r\n\r\n/**\r\n * Defines data fields for [[XYChart3D]].\r\n */\r\nexport interface IXYChart3DDataFields extends IXYChartDataFields { }\r\n\r\n/**\r\n * Defines available properties for [[XYChart3D]].\r\n */\r\nexport interface IXYChart3DProperties extends IXYChartProperties {\r\n\r\n\t/**\r\n\t * Depths of the chart in pixels.\r\n\t */\r\n\tdepth?: number;\r\n\r\n\t/**\r\n\t * Angle the chart is viewed at.\r\n\t */\r\n\tangle?: number;\r\n\r\n}\r\n\r\n/**\r\n * Defines events for [[XYChart3D]].\r\n */\r\nexport interface IXYChart3DEvents extends IXYChartEvents { }\r\n\r\n/**\r\n * Defines adapters for [[XYChart3D]].\r\n *\r\n * @see {@link Adapter}\r\n */\r\nexport interface IXYChart3DAdapters extends IXYChartAdapters, IXYChart3DProperties { }\r\n\r\n\r\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\r\n\r\n/**\r\n * Creates a 3D XY chart.\r\n *\r\n * @see {@link IXYChart3DEvents} for a list of available Events\r\n * @see {@link IXYChart3DAdapters} for a list of available Adapters\r\n * @see {@link https://www.amcharts.com/docs/v4/chart-types/xy-chart/} for documentation\r\n * @important\r\n */\r\nexport class XYChart3D extends XYChart {\r\n\r\n\t/**\r\n\t * Available data fields.\r\n\t */\r\n\tpublic _dataFields: IXYChart3DDataFields;\r\n\r\n\t/**\r\n\t * Defines available properties.\r\n\t */\r\n\tpublic _properties!: IXYChart3DProperties;\r\n\r\n\t/**\r\n\t * Defines available adapters.\r\n\t */\r\n\tpublic _adapter!: IXYChart3DAdapters;\r\n\r\n\t/**\r\n\t * Defines available events.\r\n\t */\r\n\tpublic _events!: IXYChart3DEvents;\r\n\r\n\t/**\r\n\t * Type of the axis renderer to use for X axes.\r\n\t */\r\n\tprotected _axisRendererX: typeof AxisRendererX3D = AxisRendererX3D;\r\n\r\n\t/**\r\n\t * Type of the axis renderer to use for Y axes.\r\n\t */\r\n\tprotected _axisRendererY: typeof AxisRendererY3D = AxisRendererY3D;\r\n\r\n\t/**\r\n\t * A container to add 3D column elements to.\r\n\t *\r\n\t * @ignore Exclude from docs\r\n\t */\r\n\tpublic columnsContainer: Container;\r\n\r\n\t/**\r\n\t * Constructor\r\n\t */\r\n\tconstructor() {\r\n\r\n\t\t// Init\r\n\t\tsuper();\r\n\t\tthis.className = \"XYChart3D\";\r\n\r\n\t\t// Set defaults\r\n\t\tthis.depth = 30;\r\n\t\tthis.angle = 30;\r\n\r\n\t\t// Creeate container for columns\r\n\t\tlet columnsContainer = this.seriesContainer.createChild(Container);\r\n\t\tcolumnsContainer.shouldClone = false;\r\n\t\tcolumnsContainer.isMeasured = false;\r\n\t\tcolumnsContainer.layout = \"none\";\r\n\t\tthis.columnsContainer = columnsContainer;\r\n\r\n\t\tthis.columnsContainer.mask = this.createChild(Sprite);\r\n\r\n\t\t// Apply theme\r\n\t\tthis.applyTheme();\r\n\r\n\t}\r\n\r\n\t/**\r\n\t * This is done because for some reason IE doesn't change mask if path of a\r\n\t * mask changes.\r\n\t */\r\n\tprotected updateSeriesMasks(): void {\r\n\t\tsuper.updateSeriesMasks();\r\n\t\tif ($utils.isIE()) {\r\n\t\t\tlet columnsContainer = this.columnsContainer;\r\n\t\t\tlet mask = columnsContainer.mask;\r\n\t\t\tcolumnsContainer.mask = undefined;\r\n\t\t\tcolumnsContainer.mask = mask;\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Depth of the 3D chart / columns in pixels.\r\n\t *\r\n\t * @param value Depth (px)\r\n\t */\r\n\tpublic set depth(value: number) {\r\n\t\tthis.setPropertyValue(\"depth\", value);\r\n\t\tthis.fixLayout();\r\n\t\tthis.invalidateDataUsers();\r\n\t}\r\n\r\n\t/**\r\n\t * @return Depth (px)\r\n\t */\r\n\tpublic get depth(): number {\r\n\t\treturn this.getPropertyValue(\"depth\");\r\n\t}\r\n\r\n\t/**\r\n\t * Angle the chart is viewed at.\r\n\t *\r\n\t * @todo Description (review)\r\n\t * @param value Angle\r\n\t */\r\n\tpublic set angle(value: number) {\r\n\t\tthis.setPropertyValue(\"angle\", value);\r\n\t\tthis.fixLayout();\r\n\t\tthis.invalidateDataUsers();\r\n\t}\r\n\r\n\t/**\r\n\t * @return Angle\r\n\t */\r\n\tpublic get angle(): number {\r\n\t\treturn this.getPropertyValue(\"angle\");\r\n\t}\r\n\r\n\t/**\r\n\t * A calculated horizontal 3D offset (px).\r\n\t *\r\n\t * @readonly\r\n\t * @return Offset (px)\r\n\t */\r\n\tpublic get dx3D(): number {\r\n\t\treturn $math.cos(this.angle) * this.depth;\r\n\t}\r\n\r\n\t/**\r\n\t * A calculated vertical 3D offset (px).\r\n\t *\r\n\t * @readonly\r\n\t * @return Offset (px)\r\n\t */\r\n\tpublic get dy3D(): number {\r\n\t\treturn -$math.sin(this.angle) * this.depth;\r\n\t}\r\n\r\n\t/**\r\n\t * (Re)validates layout\r\n\t *\r\n\t * @ignore Exclude from docs\r\n\t */\r\n\tpublic validateLayout() {\r\n\t\tsuper.validateLayout();\r\n\t\tthis.fixColumns();\r\n\t}\r\n\r\n\t/**\r\n\t * Updates the layout (padding and scrollbar positions) to accommodate for\r\n\t * 3D depth and angle.\r\n\t */\r\n\tprotected fixLayout(): void {\r\n\r\n\t\tthis.chartContainer.marginTop = -this.dy3D;\r\n\t\tthis.chartContainer.paddingRight = this.dx3D;\r\n\r\n\t\tif (this.scrollbarX) {\r\n\t\t\tthis.scrollbarX.dy = this.dy3D;\r\n\t\t\tthis.scrollbarX.dx = this.dx3D;\r\n\t\t}\r\n\r\n\t\tif (this.scrollbarY) {\r\n\t\t\tthis.scrollbarY.dy = this.dy3D;\r\n\t\t\tthis.scrollbarY.dx = this.dx3D;\r\n\t\t}\r\n\r\n\t\tthis.fixColumns();\r\n\r\n\t\tsuper.fixLayout();\r\n\t}\r\n\r\n\t/**\r\n\t * Updates column positions, offset and dimensions based on chart's angle\r\n\t * and depth.\r\n\t */\r\n\tprotected fixColumns(): void {\r\n\t\tlet count: number = 1;\r\n\t\tlet i = 0;\r\n\t\t$iter.each(this.series.iterator(), (series) => {\r\n\t\t\tif (series instanceof ColumnSeries3D) {\r\n\r\n\t\t\t\tif (!series.clustered && i > 0) {\r\n\t\t\t\t\tcount++;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tseries.depthIndex = count - 1;\r\n\t\t\t\ti++;\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tlet s: number = 0;\r\n\r\n\t\t$iter.each(this.series.iterator(), (series) => {\r\n\t\t\tif (series instanceof ColumnSeries3D) {\r\n\r\n\t\t\t\tseries.depth = this.depth / (count);\r\n\t\t\t\tseries.angle = this.angle;\r\n\t\t\t\tif (series.columnsContainer == this.columnsContainer) {\r\n\t\t\t\t\tseries.dx = this.depth / (count) * $math.cos(this.angle) * (series.depthIndex);\r\n\t\t\t\t\tseries.dy = -this.depth / (count) * $math.sin(this.angle) * (series.depthIndex);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tlet inversed = false;\r\n\t\t\t\tif ((series.baseAxis == series.xAxis && series.xAxis.renderer.inversed) || (series.baseAxis == series.yAxis && series.yAxis.renderer.inversed)) {\r\n\t\t\t\t\tinversed = true;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tlet i: number = 1;\r\n\t\t\t\tseries.dataItems.each((dataItem) => {\r\n\t\t\t\t\tlet column = dataItem.column;\r\n\t\t\t\t\tif (column) {\r\n\t\t\t\t\t\tif (inversed) {\r\n\t\t\t\t\t\t\tcolumn.zIndex = 1000 * (1000 - i) + s - series.depthIndex * 100;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\tcolumn.zIndex = 1000 * i + s - series.depthIndex * 100;\r\n\t\t\t\t\t\t}\t\t\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\t\ti++;\r\n\t\t\t\t});\r\n\t\t\t\tif (inversed) {\r\n\t\t\t\t\ts--;\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\ts++;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t\tthis.maskColumns();\r\n\t}\r\n\r\n\t/**\r\n\t * Processes JSON-based config before it is applied to the object.\r\n\t *\r\n\t * @ignore Exclude from docs\r\n\t * @param config Config\r\n\t */\r\n\tpublic processConfig(config?: { [index: string]: any }): void {\r\n\r\n\t\tif (config) {\r\n\r\n\t\t\t// Set up series\r\n\t\t\tif ($type.hasValue(config.series) && $type.isArray(config.series)) {\r\n\t\t\t\tfor (let i = 0, len = config.series.length; i < len; i++) {\r\n\t\t\t\t\tconfig.series[i].type = config.series[i].type || \"ColumnSeries3D\";\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t\tsuper.processConfig(config);\r\n\r\n\t}\r\n\r\n\tprotected maskColumns() {\r\n\t\tlet w: number = this.plotContainer.pixelWidth;\r\n\t\tlet h: number = this.plotContainer.pixelHeight;\r\n\r\n\t\tlet dx: number = this.dx3D;\r\n\t\tlet dy: number = this.dy3D;\r\n\r\n\t\tlet path = $path.moveTo({ x: 0, y: 0 }) + $path.lineTo({ x: dx, y: dy }) + $path.lineTo({ x: w + dx, y: dy }) + $path.lineTo({ x: w + dx, y: h + dy }) + $path.lineTo({ x: w, y: h }) + $path.lineTo({ x: w, y: h }) + $path.lineTo({ x: 0, y: h }) + $path.closePath();\r\n\r\n\t\tlet columnsContainer = this.columnsContainer;\r\n\t\tif (columnsContainer && columnsContainer.mask) {\r\n\t\t\tcolumnsContainer.mask.path = path;\r\n\t\t}\r\n\t}\r\n}\r\n\r\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\r\nregistry.registeredClasses[\"XYChart3D\"] = XYChart3D;\r\n\n\n\n// WEBPACK FOOTER //\n// ../../../../../src/.internal/charts/types/XYChart3D.ts","/**\r\n * Module that defines everything related to building Candlesticks.\r\n */\r\n\r\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\r\nimport { Column, IColumnProperties, IColumnAdapters, IColumnEvents } from \"./Column\";\r\nimport { Line } from \"../../core/elements/Line\";\r\nimport { registry } from \"../../core/Registry\";\r\n\r\n\r\n/**\r\n * ============================================================================\r\n * REQUISITES\r\n * ============================================================================\r\n * @hidden\r\n */\r\n\r\n/**\r\n * Defines properties for [[Candlestick]].\r\n */\r\nexport interface ICandlestickProperties extends IColumnProperties { }\r\n\r\n/**\r\n * Defines events for [[Candlestick]].\r\n */\r\nexport interface ICandlestickEvents extends IColumnEvents { }\r\n\r\n/**\r\n * Defines adapters for [[Candlestick]].\r\n *\r\n * @see {@link Adapter}\r\n */\r\nexport interface ICandlestickAdapters extends IColumnAdapters, ICandlestickProperties { }\r\n\r\n\r\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\r\n\r\n/**\r\n * Class used to creates Candlesticks.\r\n *\r\n * @see {@link ICandlestickEvents} for a list of available events\r\n * @see {@link ICandlestickAdapters} for a list of available Adapters\r\n * @todo Usage example\r\n * @important\r\n */\r\nexport class Candlestick extends Column {\r\n\r\n\t/**\r\n\t * Defines available properties.\r\n\t */\r\n\tpublic _properties!: ICandlestickProperties;\r\n\r\n\t/**\r\n\t * Defines available adapters.\r\n\t */\r\n\tpublic _adapter!: ICandlestickAdapters;\r\n\r\n\t/**\r\n\t * Defines available events.\r\n\t */\r\n\tpublic _events!: ICandlestickEvents;\r\n\r\n\t/**\r\n\t * Low line element\r\n\t */\r\n\tpublic lowLine: Line;\r\n\r\n\t/**\r\n\t * High line element\r\n\t */\r\n\tpublic highLine: Line;\r\n\r\n\t/**\r\n\t * Constructor\r\n\t */\r\n\tconstructor() {\r\n\t\tsuper();\r\n\t\tthis.className = \"Candlestick\";\r\n\t\tthis.layout = \"none\";\r\n\t}\r\n\r\n\t/**\r\n\t * @ignore\r\n\t */\r\n\tprotected createAssets() {\r\n\t\tsuper.createAssets();\r\n\r\n\t\tthis.lowLine = this.createChild(Line);\r\n\t\tthis.lowLine.shouldClone = false;\r\n\r\n\t\tthis.highLine = this.createChild(Line);\r\n\t\tthis.highLine.shouldClone = false;\r\n\t}\r\n\r\n\t/**\r\n\t * Copies all parameters from another [[Candlestick]].\r\n\t *\r\n\t * @param source Source Candlestick\r\n\t */\r\n\tpublic copyFrom(source: this) {\r\n\t\tsuper.copyFrom(source)\r\n\t\tif (this.lowLine) {\r\n\t\t\tthis.lowLine.copyFrom(source.lowLine);\r\n\t\t}\r\n\t\tif (this.highLine) {\r\n\t\t\tthis.highLine.copyFrom(source.highLine);\r\n\t\t}\r\n\t}\r\n\r\n}\r\n\r\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\r\nregistry.registeredClasses[\"Candlestick\"] = Candlestick;\r\n\n\n\n// WEBPACK FOOTER //\n// ../../../../../src/.internal/charts/elements/Candlestick.ts","/**\r\n * Candlestick Series module.\r\n */\r\n\r\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\r\nimport { ColumnSeries, ColumnSeriesDataItem, IColumnSeriesDataFields, IColumnSeriesProperties, IColumnSeriesAdapters, IColumnSeriesEvents } from \"./ColumnSeries\";\r\nimport { GroupField, IXYSeriesGroupFields } from \"./XYSeries\";\r\nimport { visualProperties } from \"../../core/Sprite\";\r\nimport { Line } from \"../../core/elements/Line\";\r\nimport { Container } from \"../../core/Container\";\r\nimport { Candlestick } from \"../elements/Candlestick\";\r\nimport { registry } from \"../../core/Registry\";\r\nimport { InterfaceColorSet } from \"../../core/utils/InterfaceColorSet\";\r\nimport * as $utils from \"../../core/utils/Utils\";\r\nimport * as $object from \"../../core/utils/Object\";\r\nimport * as $iter from \"../../core/utils/Iterator\";\r\nimport * as $type from \"../../core/utils/Type\";\r\nimport { LegendDataItem } from \"../../charts/Legend\";\r\nimport { CalculatedValue } from \"../../core/Component\";\r\n\r\n/**\r\n * ============================================================================\r\n * DATA ITEM\r\n * ============================================================================\r\n * @hidden\r\n */\r\n\r\n/**\r\n * Defines a [[DataItem]] for [[CandlestickSeries]].\r\n *\r\n * @see {@link DataItem}\r\n */\r\nexport class CandlestickSeriesDataItem extends ColumnSeriesDataItem {\r\n\r\n\t/**\r\n\t * A sprite used to draw the column.\r\n\t */\r\n\tpublic _column: Candlestick;\r\n\r\n\t/**\r\n\t * Defines a type of [[Component]] this data item is used for\r\n\t * @todo Disabled to work around TS bug (see if we can re-enable it again)\r\n\t */\r\n\t//public _component!: CandlestickSeries;\r\n\r\n\t/**\r\n\t * Constructor\r\n\t */\r\n\tconstructor() {\r\n\t\tsuper();\r\n\r\n\t\tthis.values.lowValueX = {};\r\n\t\tthis.values.lowValueY = {};\r\n\t\tthis.values.highValueX = {};\r\n\t\tthis.values.highValueY = {};\r\n\r\n\t\tthis.className = \"CandlestickSeriesDataItem\";\r\n\r\n\t\tthis.applyTheme();\r\n\t}\r\n\r\n\t/**\r\n\t * Low value for horizontal axis.\r\n\t *\r\n\t * @param value Value\r\n\t */\r\n\tpublic set lowValueX(value: number) {\r\n\t\tthis.setValue(\"lowValueX\", value);\r\n\t}\r\n\r\n\t/**\r\n\t * @return Value\r\n\t */\r\n\tpublic get lowValueX(): number {\r\n\t\treturn this.values.lowValueX.value;\r\n\t}\r\n\r\n\t/**\r\n\t * Low value for vertical axis.\r\n\t *\r\n\t * @param value Value\r\n\t */\r\n\tpublic set lowValueY(value: number) {\r\n\t\tthis.setValue(\"lowValueY\", value);\r\n\t}\r\n\r\n\t/**\r\n\t * @return Value\r\n\t */\r\n\tpublic get lowValueY(): number {\r\n\t\treturn this.values.lowValueY.value;\r\n\t}\r\n\r\n\t/**\r\n\t * High value for horizontal axis.\r\n\t *\r\n\t * @param value Value\r\n\t */\r\n\tpublic set highValueX(value: number) {\r\n\t\tthis.setValue(\"highValueX\", value);\r\n\t}\r\n\r\n\t/**\r\n\t * @return Value\r\n\t */\r\n\tpublic get highValueX(): number {\r\n\t\treturn this.values.highValueX.value;\r\n\t}\r\n\r\n\t/**\r\n\t * High value for vertical axis.\r\n\t *\r\n\t * @param value Value\r\n\t */\r\n\tpublic set highValueY(value: number) {\r\n\t\tthis.setValue(\"highValueY\", value);\r\n\t}\r\n\r\n\t/**\r\n\t * @return Value\r\n\t */\r\n\tpublic get highValueY(): number {\r\n\t\treturn this.values.highValueY.value;\r\n\t}\r\n\r\n\t/**\r\n\t * Close value for horizontal axis.\r\n\t *\r\n\t * This is an alias for `valueX` added for convenience only.\r\n\t *\r\n\t * @param value Value\r\n\t */\r\n\tpublic set closeValueX(value: number) {\r\n\t\tthis.setValue(\"valueX\", value);\r\n\t}\r\n\r\n\t/**\r\n\t * @return Value\r\n\t */\r\n\tpublic get closeValueX(): number {\r\n\t\treturn this.values.valueX.value;\r\n\t}\r\n\r\n\t/**\r\n\t * Close value for vertical axis.\r\n\t *\r\n\t * This is an alias for `valueX` added for convenience only.\r\n\t *\r\n\t * @param value Value\r\n\t */\r\n\tpublic set closeValueY(value: number) {\r\n\t\tthis.setValue(\"valueY\", value);\r\n\t}\r\n\r\n\t/**\r\n\t * @return Value\r\n\t */\r\n\tpublic get closeValueY(): number {\r\n\t\treturn this.values.valueY.value;\r\n\t}\r\n}\r\n\r\n\r\n/**\r\n * ============================================================================\r\n * REQUISITES\r\n * ============================================================================\r\n * @hidden\r\n */\r\n\r\n/**\r\n * Defines data fields for [[CandlestickSeries]].\r\n */\r\nexport interface ICandlestickSeriesDataFields extends IColumnSeriesDataFields {\r\n\r\n\t/**\r\n\t * Field name in data which holds low numeric value for horizontal axis.\r\n\t */\r\n\tlowValueX?: string;\r\n\r\n\t/**\r\n\t * Field name in data which holds low numeric value for vertical axis.\r\n\t */\r\n\tlowValueY?: string;\r\n\r\n\t/**\r\n\t * Field name in data which holds high numeric value for horizontal axis.\r\n\t */\r\n\thighValueX?: string;\r\n\r\n\t/**\r\n\t * Field name in data which holds low numeric value for vertical axis.\r\n\t */\r\n\thighValueY?: string;\r\n\r\n\t/**\r\n\t * Field name in data which holds low date for horizontal axis.\r\n\t */\r\n\tlowDateX?: string;\r\n\r\n\t/**\r\n\t * Field name in data which holds low date for vertical axis.\r\n\t */\r\n\tlowDateY?: string;\r\n\r\n\t/**\r\n\t * Field name in data which holds high date for horizontal axis.\r\n\t */\r\n\thighDateX?: string;\r\n\r\n\t/**\r\n\t * Field name in data which holds high date for vertical axis.\r\n\t */\r\n\thighDateY?: string;\r\n\r\n\t/**\r\n\t * Which calculated field to use to use as a horizontal axis high value for\r\n\t * the item.\r\n\t */\r\n\thighValueXShow?: CalculatedValue;\r\n\r\n\t/**\r\n\t * Which calculated field to use to use as a horizontal axis low value for\r\n\t * the item.\r\n\t */\r\n\tlowValueXShow?: CalculatedValue;\r\n\r\n\t/**\r\n\t * Which calculated field to use to use as a vertical axis low value for\r\n\t * the item.\r\n\t */\r\n\tlowValueYShow?: CalculatedValue;\r\n\r\n\t/**\r\n\t * Which calculated field to use to use as a vertical axis high value for\r\n\t * the item.\r\n\t */\r\n\thighValueYShow?: CalculatedValue;\r\n\r\n}\r\n\r\n/**\r\n * Defines data fields that can be calculated for aggregate values.\r\n * \r\n * @since 4.7.0\r\n */\r\nexport interface ICandlestickSeriesGroupFields extends IXYSeriesGroupFields {\r\n\r\n\t/**\r\n\t * Indicates how to calculate aggregate value for `lowValueX` data field.\r\n\t *\r\n\t * @default \"low\"\r\n\t */\r\n\tlowValueX?: GroupField;\r\n\r\n\t/**\r\n\t * Indicates how to calculate aggregate value for `lowValueY` data field.\r\n\t *\r\n\t * @default \"low\"\r\n\t */\r\n\tlowValueY?: GroupField;\r\n\r\n\t/**\r\n\t * Indicates how to calculate aggregate value for `highValueX` data field.\r\n\t *\r\n\t * @default \"high\"\r\n\t */\r\n\thighValueX?: GroupField;\r\n\r\n\t/**\r\n\t * Indicates how to calculate aggregate value for `highValueY` data field.\r\n\t *\r\n\t * @default \"high\"\r\n\t */\r\n\thighValueY?: GroupField;\r\n\r\n}\r\n\r\n/**\r\n * Defines properties for [[CandlestickSeries]].\r\n */\r\nexport interface ICandlestickSeriesProperties extends IColumnSeriesProperties { }\r\n\r\n/**\r\n * Defines events for [[CandlestickSeries]].\r\n */\r\nexport interface ICandlestickSeriesEvents extends IColumnSeriesEvents { }\r\n\r\n/**\r\n * Defines adapters for [[CandlestickSeries]].\r\n *\r\n * @see {@link Adapter}\r\n */\r\nexport interface ICandlestickSeriesAdapters extends IColumnSeriesAdapters, ICandlestickSeriesProperties { }\r\n\r\n\r\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\r\n\r\n/**\r\n * Defines [[Series]] for a candlestick graph.\r\n *\r\n * @see {@link ICandlestickSeriesEvents} for a list of available Events\r\n * @see {@link ICandlestickSeriesAdapters} for a list of available Adapters\r\n * @todo Example\r\n * @important\r\n */\r\nexport class CandlestickSeries extends ColumnSeries {\r\n\r\n\t/**\r\n\t * Defines type of the group fields.\r\n\t * \r\n\t * @ignore\r\n\t * @since 4.7.0\r\n\t */\r\n\tpublic _groupFields: ICandlestickSeriesGroupFields;\r\n\r\n\t/**\r\n\t * Defines the type of data item.\r\n\t */\r\n\tpublic _dataItem: CandlestickSeriesDataItem;\r\n\r\n\t/**\r\n\t * Sets type of the column.\r\n\t */\r\n\tpublic _column: Candlestick;\r\n\r\n\t/**\r\n\t * Defines available data fields.\r\n\t */\r\n\tpublic _dataFields: ICandlestickSeriesDataFields;\r\n\r\n\t/**\r\n\t * Defines available properties.\r\n\t */\r\n\tpublic _properties!: ICandlestickSeriesProperties;\r\n\r\n\t/**\r\n\t * Defines available adapters.\r\n\t */\r\n\tpublic _adapter!: ICandlestickSeriesAdapters;\r\n\r\n\t/**\r\n\t * Defines available events.\r\n\t */\r\n\tpublic _events!: ICandlestickSeriesEvents;\r\n\r\n\t/**\r\n\t * A data field to look for \"low\" value for horizontal axis.\r\n\t */\r\n\tprotected _xLowField: $type.Keyof;\r\n\r\n\t/**\r\n\t * A data field to look for \"low\" value for vertical axis.\r\n\t */\r\n\tprotected _yLowField: $type.Keyof;\r\n\r\n\t/**\r\n\t * A data field to look for \"high\" value for horizontal axis.\r\n\t */\r\n\tprotected _xHighField: $type.Keyof;\r\n\r\n\t/**\r\n\t * A data field to look for \"high\" value for vertical axis.\r\n\t */\r\n\tprotected _yHighField: $type.Keyof;\r\n\r\n\t/**\r\n\t * Constructor\r\n\t */\r\n\tconstructor() {\r\n\t\tsuper();\r\n\t\tthis.className = \"CandlestickSeries\";\r\n\r\n\t\tthis.groupFields.lowValueX = \"low\";\r\n\t\tthis.groupFields.lowValueY = \"low\";\r\n\r\n\t\tthis.groupFields.highValueX = \"high\";\r\n\t\tthis.groupFields.highValueY = \"high\";\r\n\r\n\t\tthis.strokeOpacity = 1;\r\n\r\n\t\tlet interfaceColors = new InterfaceColorSet();\r\n\t\tlet positiveColor = interfaceColors.getFor(\"positive\");\r\n\t\tlet negativeColor = interfaceColors.getFor(\"negative\");\r\n\r\n\t\tthis.dropFromOpenState.properties.fill = negativeColor;\r\n\t\tthis.dropFromOpenState.properties.stroke = negativeColor;\r\n\r\n\t\tthis.riseFromOpenState.properties.fill = positiveColor;\r\n\t\tthis.riseFromOpenState.properties.stroke = positiveColor;\r\n\r\n\t\tthis.applyTheme();\r\n\t}\r\n\r\n\t/**\r\n\t * Sets defaults that instantiate some objects that rely on parent, so they\r\n\t * cannot be set in constructor.\r\n\t */\r\n\tprotected applyInternalDefaults(): void {\r\n\t\tsuper.applyInternalDefaults();\r\n\t\tif (!$type.hasValue(this.readerTitle)) {\r\n\t\t\tthis.readerTitle = this.language.translate(\"Candlestick Series\");\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Returns a new/empty DataItem of the type appropriate for this object.\r\n\t *\r\n\t * @see {@link DataItem}\r\n\t * @return Data Item\r\n\t */\r\n\tprotected createDataItem(): this[\"_dataItem\"] {\r\n\t\treturn new CandlestickSeriesDataItem();\r\n\t}\r\n\r\n\t/**\r\n\t * Validates data item's element, effectively redrawing it.\r\n\t *\r\n\t * @ignore Exclude from docs\r\n\t * @param dataItem Data item\r\n\t */\r\n\tpublic validateDataElementReal(dataItem: this[\"_dataItem\"]): void {\r\n\t\tsuper.validateDataElementReal(dataItem);\r\n\t\tthis.validateCandlestick(dataItem);\r\n\t}\r\n\r\n\tprotected validateCandlestick(dataItem: this[\"dataItem\"]) {\r\n\t\tlet column: Candlestick = dataItem.column;\r\n\t\tif (column) {\r\n\t\t\tlet lowLine = column.lowLine;\r\n\t\t\tlet highLine = column.highLine;\r\n\r\n\t\t\tif (this.baseAxis == this.xAxis) {\r\n\t\t\t\tlet x: number = column.pixelWidth / 2;\r\n\r\n\t\t\t\tlowLine.x = x;\r\n\t\t\t\thighLine.x = x;\r\n\r\n\t\t\t\tlet open = dataItem.getWorkingValue(this.yOpenField);\r\n\t\t\t\tlet close = dataItem.getWorkingValue(this.yField);\r\n\r\n\t\t\t\tlet yOpen = this.yAxis.getY(dataItem, this.yOpenField);\r\n\t\t\t\tlet yClose = this.yAxis.getY(dataItem, this.yField);\r\n\t\t\t\tlet yLow = this.yAxis.getY(dataItem, this.yLowField);\r\n\t\t\t\tlet yHigh = this.yAxis.getY(dataItem, this.yHighField);\r\n\r\n\t\t\t\tlet pixelY = column.pixelY;\r\n\r\n\t\t\t\tlowLine.y1 = yLow - pixelY;\r\n\t\t\t\thighLine.y1 = yHigh - pixelY;\r\n\r\n\t\t\t\tif (open < close) {\r\n\t\t\t\t\tlowLine.y2 = yOpen - pixelY;\r\n\t\t\t\t\thighLine.y2 = yClose - pixelY;\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tlowLine.y2 = yClose - pixelY;\r\n\t\t\t\t\thighLine.y2 = yOpen - pixelY;\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\t\t\tif (this.baseAxis == this.yAxis) {\r\n\t\t\t\tlet y: number = column.pixelHeight / 2;\r\n\r\n\t\t\t\tlowLine.y = y;\r\n\t\t\t\thighLine.y = y;\r\n\r\n\t\t\t\tlet open = dataItem.getWorkingValue(this.xOpenField);\r\n\t\t\t\tlet close = dataItem.getWorkingValue(this.xField);\r\n\r\n\t\t\t\tlet xOpen = this.xAxis.getX(dataItem, this.xOpenField);\r\n\t\t\t\tlet xClose = this.xAxis.getX(dataItem, this.xField);\r\n\t\t\t\tlet xLow = this.xAxis.getX(dataItem, this.xLowField);\r\n\t\t\t\tlet xHigh = this.xAxis.getX(dataItem, this.xHighField);\r\n\r\n\t\t\t\tlet pixelX = column.pixelX;\r\n\r\n\t\t\t\tlowLine.x1 = xLow - pixelX;\r\n\t\t\t\thighLine.x1 = xHigh - pixelX;\r\n\r\n\t\t\t\tif (open < close) {\r\n\t\t\t\t\tlowLine.x2 = xOpen - pixelX;\r\n\t\t\t\t\thighLine.x2 = xClose - pixelX;\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tlowLine.x2 = xClose - pixelX;\r\n\t\t\t\t\thighLine.x2 = xOpen - pixelX;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t$iter.each(this.axisRanges.iterator(), (axisRange) => {\r\n\t\t\t\t// LOW LINE\r\n\t\t\t\tlet rangeColumn = dataItem.rangesColumns.getKey(axisRange.uid);\r\n\t\t\t\tif (rangeColumn) {\r\n\t\t\t\t\tlet rangeLowLine = rangeColumn.lowLine;\r\n\t\t\t\t\trangeLowLine.x = lowLine.x;\r\n\t\t\t\t\trangeLowLine.y = lowLine.y;\r\n\t\t\t\t\trangeLowLine.x1 = lowLine.x1;\r\n\t\t\t\t\trangeLowLine.x2 = lowLine.x2;\r\n\t\t\t\t\trangeLowLine.y1 = lowLine.y1;\r\n\t\t\t\t\trangeLowLine.y2 = lowLine.y2;\r\n\r\n\t\t\t\t\t// HIGH LINE\r\n\t\t\t\t\tlet rangehighLine = rangeColumn.highLine;\r\n\t\t\t\t\trangehighLine.x = highLine.x;\r\n\t\t\t\t\trangehighLine.y = highLine.y;\r\n\t\t\t\t\trangehighLine.x1 = highLine.x1;\r\n\t\t\t\t\trangehighLine.x2 = highLine.x2;\r\n\t\t\t\t\trangehighLine.y1 = highLine.y1;\r\n\t\t\t\t\trangehighLine.y2 = highLine.y2;\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 * A data field to look for \"low\" value for horizontal axis.\r\n\t *\r\n\t * @ignore Exclude from docs\r\n\t * @return Field name\r\n\t */\r\n\tpublic get xLowField(): string {\r\n\t\treturn this._xLowField;\r\n\t}\r\n\r\n\t/**\r\n\t * A data field to look for \"low\" value for vertical axis.\r\n\t *\r\n\t * @ignore Exclude from docs\r\n\t * @return Field name\r\n\t */\r\n\tpublic get yLowField(): string {\r\n\t\treturn this._yLowField;\r\n\t}\r\n\r\n\t/**\r\n\t * A data field to look for \"high\" value for horizontal axis.\r\n\t *\r\n\t * @ignore Exclude from docs\r\n\t * @return Field name\r\n\t */\r\n\tpublic get xHighField(): string {\r\n\t\treturn this._xHighField;\r\n\t}\r\n\r\n\t/**\r\n\t * A data field to look for \"high\" value for vertical axis.\r\n\t *\r\n\t * @ignore Exclude from docs\r\n\t * @return Field name\r\n\t */\r\n\tpublic get yHighField(): string {\r\n\t\treturn this._yHighField;\r\n\t}\r\n\r\n\t/**\r\n\t * Sets up which data fields to use for data access.\r\n\t */\r\n\tprotected defineFields() {\r\n\t\tsuper.defineFields();\r\n\r\n\t\tlet xAxis = this.xAxis;\r\n\t\tlet yAxis = this.yAxis;\r\n\t\tif (xAxis && yAxis) {\r\n\t\t\tif (this.baseAxis == xAxis) {\r\n\t\t\t\tlet yAxisFieldName: string = $utils.capitalize(yAxis.axisFieldName);\r\n\t\t\t\tthis._yLowField = <$type.Keyof>(\"low\" + yAxisFieldName + \"Y\");\r\n\t\t\t\tthis._yHighField = <$type.Keyof>(\"high\" + yAxisFieldName + \"Y\");\r\n\t\t\t}\r\n\r\n\t\t\tif (this.baseAxis == yAxis) {\r\n\t\t\t\tlet xAxisFieldName: string = $utils.capitalize(xAxis.axisFieldName);\r\n\t\t\t\tthis._xLowField = <$type.Keyof>(\"low\" + xAxisFieldName + \"X\");\r\n\t\t\t\tthis._xHighField = <$type.Keyof>(\"high\" + xAxisFieldName + \"X\");\r\n\t\t\t}\r\n\r\n\t\t\tthis.addValueField(xAxis, this._xValueFields, this._xLowField);\r\n\t\t\tthis.addValueField(xAxis, this._xValueFields, this._xHighField);\r\n\r\n\t\t\tthis.addValueField(yAxis, this._yValueFields, this._yLowField);\r\n\t\t\tthis.addValueField(yAxis, this._yValueFields, this._yHighField);\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Creates elements in related legend container, that mimics the look of this\r\n\t * Series.\r\n\t *\r\n\t * @ignore Exclude from docs\r\n\t * @param marker Legend item container\r\n\t */\r\n\tpublic createLegendMarker(marker: Container): void {\r\n\r\n\t\tlet w: number = marker.pixelWidth;\r\n\t\tlet h: number = marker.pixelHeight;\r\n\r\n\t\tmarker.removeChildren();\r\n\r\n\t\tlet column: Candlestick = marker.createChild(Candlestick);\r\n\t\tcolumn.shouldClone = false;\r\n\t\tcolumn.copyFrom(this.columns.template);\r\n\r\n\t\tlet cw: number;\r\n\t\tlet ch: number;\r\n\r\n\t\tlet highLine: Line = column.lowLine;\r\n\t\tlet lowLine: Line = column.highLine;\r\n\r\n\t\tif (this.baseAxis == this.yAxis) {\r\n\t\t\tcw = w / 3;\r\n\t\t\tch = h;\r\n\r\n\t\t\thighLine.y = h / 2;\r\n\t\t\tlowLine.y = h / 2;\r\n\r\n\t\t\thighLine.x2 = w / 3;\r\n\t\t\tlowLine.x2 = w / 3;\r\n\t\t\tlowLine.x = w / 3 * 2;\r\n\t\t\tcolumn.column.x = w / 3;\r\n\t\t}\r\n\t\telse {\r\n\t\t\tcw = w;\r\n\t\t\tch = h / 3;\r\n\t\t\thighLine.x = w / 2;\r\n\t\t\tlowLine.x = w / 2;\r\n\r\n\t\t\thighLine.y2 = h / 3;\r\n\t\t\tlowLine.y2 = h / 3;\r\n\t\t\tlowLine.y = h / 3 * 2;\r\n\t\t\tcolumn.column.y = h / 3;\r\n\t\t}\r\n\t\tcolumn.width = cw;\r\n\t\tcolumn.height = ch;\r\n\r\n\t\t$object.copyProperties(this, marker, visualProperties);\r\n\t\t$object.copyProperties(this.columns.template, column, visualProperties);\r\n\r\n\t\tcolumn.stroke = this.riseFromOpenState.properties.stroke;\r\n\t\tcolumn.fill = column.stroke;\r\n\r\n\t\tlet legendDataItem = marker.dataItem;\r\n\t\tlegendDataItem.color = column.fill;\r\n\t\tlegendDataItem.colorOrig = column.fill;\r\n\t}\r\n\r\n\t/**\r\n\t * Returns an element to use for Candlestick\r\n\t * @ignore\r\n\t * @return Element.\r\n\t */\r\n\tprotected createColumnTemplate(): this[\"_column\"] {\r\n\t\treturn new Candlestick();\r\n\t}\r\n\r\n}\r\n\r\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\r\nregistry.registeredClasses[\"CandlestickSeries\"] = CandlestickSeries;\r\nregistry.registeredClasses[\"CandlestickSeriesDataItem\"] = CandlestickSeriesDataItem;\r\n\n\n\n// WEBPACK FOOTER //\n// ../../../../../src/.internal/charts/series/CandlestickSeries.ts","/**\r\n * Module that defines everything related to building OHLCs.\r\n */\r\n\r\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\r\nimport { Candlestick, ICandlestickProperties, ICandlestickAdapters, ICandlestickEvents } from \"./Candlestick\";\r\nimport { Line } from \"../../core/elements/Line\";\r\nimport { registry } from \"../../core/Registry\";\r\n\r\n\r\n/**\r\n * ============================================================================\r\n * REQUISITES\r\n * ============================================================================\r\n * @hidden\r\n */\r\n\r\n/**\r\n * Defines properties for [[OHLC]].\r\n */\r\nexport interface IOHLCProperties extends ICandlestickProperties { }\r\n\r\n/**\r\n * Defines events for [[OHLC]].\r\n */\r\nexport interface IOHLCEvents extends ICandlestickEvents { }\r\n\r\n/**\r\n * Defines adapters for [[OHLC]].\r\n *\r\n * @see {@link Adapter}\r\n */\r\nexport interface IOHLCAdapters extends ICandlestickAdapters, IOHLCProperties { }\r\n\r\n\r\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\r\n\r\n/**\r\n * Class used to creates OHLCs.\r\n *\r\n * @see {@link IOHLCEvents} for a list of available events\r\n * @see {@link IOHLCAdapters} for a list of available Adapters\r\n * @todo Usage example\r\n * @important\r\n */\r\nexport class OHLC extends Candlestick {\r\n\r\n\t/**\r\n\t * Defines available properties.\r\n\t */\r\n\tpublic _properties!: IOHLCProperties;\r\n\r\n\t/**\r\n\t * Defines available adapters.\r\n\t */\r\n\tpublic _adapter!: IOHLCAdapters;\r\n\r\n\t/**\r\n\t * Defines available events.\r\n\t */\r\n\tpublic _events!: IOHLCEvents;\r\n\r\n\r\n\t/**\r\n\t * Open line element\r\n\t */\r\n\tpublic openLine: Line;\r\n\r\n\t/**\r\n\t * Close line element\r\n\t */\r\n\tpublic closeLine: Line;\r\n\r\n\t/**\r\n\t * High-low line element\r\n\t */\r\n\tpublic highLowLine: Line;\r\n\r\n\t/**\r\n\t * Constructor\r\n\t */\r\n\tconstructor() {\r\n\t\tsuper();\r\n\t\tthis.className = \"OHLC\";\r\n\t\tthis.layout = \"none\";\r\n\t}\r\n\t/**\r\n\t * @ignore\r\n\t */\r\n\tprotected createAssets() {\r\n\t\t//super.createAssets();\r\n\r\n\t\tthis.openLine = this.createChild(Line);\r\n\t\tthis.openLine.shouldClone = false;\r\n\r\n\t\tthis.highLowLine = this.createChild(Line);\r\n\t\tthis.highLowLine.shouldClone = false;\r\n\r\n\t\tthis.closeLine = this.createChild(Line);\r\n\t\tthis.closeLine.shouldClone = false;\r\n\t}\r\n\r\n\t/**\r\n\t * Copies all parameters from another [[OHLC]].\r\n\t *\r\n\t * @param source Source OHLC\r\n\t */\r\n\tpublic copyFrom(source: this) {\r\n\t\tsuper.copyFrom(source)\r\n\t\tif (this.openLine) {\r\n\t\t\tthis.openLine.copyFrom(source.openLine);\r\n\t\t}\r\n\t\tif (this.highLowLine) {\r\n\t\t\tthis.highLowLine.copyFrom(source.highLowLine);\r\n\t\t}\r\n\t\tif (this.closeLine) {\r\n\t\t\tthis.closeLine.copyFrom(source.closeLine);\r\n\t\t}\r\n\t}\r\n\r\n}\r\n\r\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\r\nregistry.registeredClasses[\"OHLC\"] = OHLC;\r\n\n\n\n// WEBPACK FOOTER //\n// ../../../../../src/.internal/charts/elements/OHLC.ts","/**\r\n * Candlestick Series module.\r\n */\r\n\r\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\r\nimport { CandlestickSeries, CandlestickSeriesDataItem, ICandlestickSeriesDataFields, ICandlestickSeriesProperties, ICandlestickSeriesAdapters, ICandlestickSeriesEvents } from \"./CandlestickSeries\";\r\nimport { visualProperties } from \"../../core/Sprite\";\r\nimport { Line } from \"../../core/elements/Line\";\r\nimport { Container } from \"../../core/Container\";\r\nimport { OHLC } from \"../elements/OHLC\";\r\nimport { registry } from \"../../core/Registry\";\r\nimport * as $object from \"../../core/utils/Object\";\r\nimport * as $iter from \"../../core/utils/Iterator\";\r\nimport * as $type from \"../../core/utils/Type\";\r\nimport { LegendDataItem } from \"../../charts/Legend\";\r\n\r\n/**\r\n * ============================================================================\r\n * DATA ITEM\r\n * ============================================================================\r\n * @hidden\r\n */\r\n\r\n/**\r\n * Defines a [[DataItem]] for [[OHLCSeries]].\r\n *\r\n * @see {@link DataItem}\r\n */\r\nexport class OHLCSeriesDataItem extends CandlestickSeriesDataItem {\r\n\r\n\t/**\r\n\t * A sprite used to draw the OHLC elements.\r\n\t */\r\n\tpublic _column: OHLC;\r\n\r\n\t/**\r\n\t * Defines a type of [[Component]] this data item is used for\r\n\t * @todo Disabled to work around TS bug (see if we can re-enable it again)\r\n\t */\r\n\t//public _component!: OHLCSeries;\r\n\r\n\t/**\r\n\t * Constructor\r\n\t */\r\n\tconstructor() {\r\n\t\tsuper();\r\n\r\n\t\tthis.className = \"OHLCSeriesDataItem\";\r\n\r\n\t\tthis.applyTheme();\r\n\t}\r\n}\r\n\r\n\r\n/**\r\n * ============================================================================\r\n * REQUISITES\r\n * ============================================================================\r\n * @hidden\r\n */\r\n\r\n/**\r\n * Defines data fields for [[OHLCSeries]].\r\n */\r\nexport interface IOHLCSeriesDataFields extends ICandlestickSeriesDataFields { }\r\n\r\n/**\r\n * Defines properties for [[OHLCSeries]].\r\n */\r\nexport interface IOHLCSeriesProperties extends ICandlestickSeriesProperties { }\r\n\r\n/**\r\n * Defines events for [[OHLCSeries]].\r\n */\r\nexport interface IOHLCSeriesEvents extends ICandlestickSeriesEvents { }\r\n\r\n/**\r\n * Defines adapters for [[OHLCSeries]].\r\n *\r\n * @see {@link Adapter}\r\n */\r\nexport interface IOHLCSeriesAdapters extends ICandlestickSeriesAdapters, IOHLCSeriesProperties { }\r\n\r\n\r\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\r\n\r\n/**\r\n * Defines [[Series]] for a candlestick graph.\r\n *\r\n * @see {@link IOHLCSeriesEvents} for a list of available Events\r\n * @see {@link IOHLCSeriesAdapters} for a list of available Adapters\r\n * @todo Example\r\n * @important\r\n */\r\nexport class OHLCSeries extends CandlestickSeries {\r\n\r\n\t/**\r\n\t * Defines the type of data item.\r\n\t */\r\n\tpublic _dataItem: OHLCSeriesDataItem;\r\n\r\n\t/**\r\n\t * Type of column.\r\n\t */\r\n\tpublic _column: OHLC;\r\n\r\n\t/**\r\n\t * Defines available data fields.\r\n\t */\r\n\tpublic _dataFields: IOHLCSeriesDataFields;\r\n\r\n\t/**\r\n\t * Defines available properties.\r\n\t */\r\n\tpublic _properties!: IOHLCSeriesProperties;\r\n\r\n\t/**\r\n\t * Defines available adapters.\r\n\t */\r\n\tpublic _adapter!: IOHLCSeriesAdapters;\r\n\r\n\t/**\r\n\t * Defines available events.\r\n\t */\r\n\tpublic _events!: IOHLCSeriesEvents;\r\n\r\n\t/**\r\n\t * Constructor\r\n\t */\r\n\tconstructor() {\r\n\t\tsuper();\r\n\t\tthis.className = \"OHLCSeries\";\r\n\r\n\t\tthis.applyTheme();\r\n\t}\r\n\r\n\t/**\r\n\t * Sets defaults that instantiate some objects that rely on parent, so they\r\n\t * cannot be set in constructor.\r\n\t */\r\n\tprotected applyInternalDefaults(): void {\r\n\t\tsuper.applyInternalDefaults();\r\n\t\tif (!$type.hasValue(this.readerTitle)) {\r\n\t\t\tthis.readerTitle = this.language.translate(\"OHLC Series\");\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Returns a new/empty DataItem of the type appropriate for this object.\r\n\t *\r\n\t * @see {@link DataItem}\r\n\t * @return Data Item\r\n\t */\r\n\tprotected createDataItem(): this[\"_dataItem\"] {\r\n\t\treturn new OHLCSeriesDataItem();\r\n\t}\r\n\r\n\r\n\tprotected validateCandlestick(dataItem: this[\"_dataItem\"]) {\r\n\t\tlet column: OHLC = dataItem.column;\r\n\t\tif (column) {\r\n\t\t\tlet openLine = column.openLine;\r\n\t\t\tlet highLowLine = column.highLowLine;\r\n\t\t\tlet closeLine = column.closeLine;\r\n\r\n\t\t\tif (this.baseAxis == this.xAxis) {\r\n\t\t\t\tlet x: number = column.pixelWidth / 2;\r\n\t\t\t\thighLowLine.x = x;\r\n\r\n\t\t\t\t// TODO can these be removed ?\r\n\t\t\t\tdataItem.getWorkingValue(this.yOpenField);\r\n\t\t\t\tdataItem.getWorkingValue(this.yField);\r\n\r\n\t\t\t\tlet yOpen = this.yAxis.getY(dataItem, this.yOpenField);\r\n\t\t\t\tlet yClose = this.yAxis.getY(dataItem, this.yField);\r\n\t\t\t\tlet yLow = this.yAxis.getY(dataItem, this.yLowField);\r\n\t\t\t\tlet yHigh = this.yAxis.getY(dataItem, this.yHighField);\r\n\r\n\t\t\t\tlet pixelY = column.pixelY;\r\n\r\n\t\t\t\topenLine.y1 = yOpen - pixelY;\r\n\t\t\t\topenLine.y2 = yOpen - pixelY;\r\n\t\t\t\topenLine.x1 = 0;\r\n\t\t\t\topenLine.x2 = x;\r\n\r\n\t\t\t\tcloseLine.y1 = yClose - pixelY;\r\n\t\t\t\tcloseLine.y2 = yClose - pixelY;\r\n\t\t\t\tcloseLine.x1 = x;\r\n\t\t\t\tcloseLine.x2 = 2 * x;\r\n\r\n\t\t\t\thighLowLine.y1 = yHigh - pixelY;\r\n\t\t\t\thighLowLine.y2 = yLow - pixelY;\r\n\r\n\t\t\t}\r\n\t\t\tif (this.baseAxis == this.yAxis) {\r\n\t\t\t\tlet y: number = column.pixelHeight / 2;\r\n\r\n\t\t\t\thighLowLine.y = y;\r\n\r\n\t\t\t\t// TODO can these be removed ?\r\n\t\t\t\tdataItem.getWorkingValue(this.xOpenField);\r\n\t\t\t\tdataItem.getWorkingValue(this.xField);\r\n\r\n\t\t\t\tlet xOpen = this.xAxis.getX(dataItem, this.xOpenField);\r\n\t\t\t\tlet xClose = this.xAxis.getX(dataItem, this.xField);\r\n\t\t\t\tlet xLow = this.xAxis.getX(dataItem, this.xLowField);\r\n\t\t\t\tlet xHigh = this.xAxis.getX(dataItem, this.xHighField);\r\n\r\n\t\t\t\tlet pixelX = column.pixelX;\r\n\r\n\t\t\t\topenLine.x1 = xOpen - pixelX;\r\n\t\t\t\topenLine.x2 = xOpen - pixelX;\r\n\t\t\t\topenLine.y1 = y;\r\n\t\t\t\topenLine.y2 = 2 * y;\r\n\r\n\t\t\t\tcloseLine.x1 = xClose - pixelX;\r\n\t\t\t\tcloseLine.x2 = xClose - pixelX;\r\n\t\t\t\tcloseLine.y1 = 0;\r\n\t\t\t\tcloseLine.y2 = y;\r\n\r\n\t\t\t\thighLowLine.x1 = xHigh - pixelX;\r\n\t\t\t\thighLowLine.x2 = xLow - pixelX;\r\n\t\t\t}\r\n\r\n\t\t\t$iter.each(this.axisRanges.iterator(), (axisRange) => {\r\n\r\n\t\t\t\tlet rangeColumn = dataItem.rangesColumns.getKey(axisRange.uid);\r\n\t\t\t\tif (rangeColumn) {\r\n\t\t\t\t\tlet rangeOpenLine = rangeColumn.openLine;\r\n\t\t\t\t\trangeOpenLine.x = openLine.x;\r\n\t\t\t\t\trangeOpenLine.y = openLine.y;\r\n\t\t\t\t\trangeOpenLine.x1 = openLine.x1;\r\n\t\t\t\t\trangeOpenLine.x2 = openLine.x2;\r\n\t\t\t\t\trangeOpenLine.y1 = openLine.y1;\r\n\t\t\t\t\trangeOpenLine.y2 = openLine.y2;\r\n\r\n\t\t\t\t\tlet rangeCloseLine = rangeColumn.closeLine;\r\n\t\t\t\t\trangeCloseLine.x = closeLine.x;\r\n\t\t\t\t\trangeCloseLine.y = closeLine.y;\r\n\t\t\t\t\trangeCloseLine.x1 = closeLine.x1;\r\n\t\t\t\t\trangeCloseLine.x2 = closeLine.x2;\r\n\t\t\t\t\trangeCloseLine.y1 = closeLine.y1;\r\n\t\t\t\t\trangeCloseLine.y2 = closeLine.y2;\r\n\r\n\t\t\t\t\tlet rangeHighLowLine = rangeColumn.highLowLine;\r\n\t\t\t\t\trangeHighLowLine.x = highLowLine.x;\r\n\t\t\t\t\trangeHighLowLine.y = highLowLine.y;\r\n\t\t\t\t\trangeHighLowLine.x1 = highLowLine.x1;\r\n\t\t\t\t\trangeHighLowLine.x2 = highLowLine.x2;\r\n\t\t\t\t\trangeHighLowLine.y1 = highLowLine.y1;\r\n\t\t\t\t\trangeHighLowLine.y2 = highLowLine.y2;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n\r\n\r\n\t/**\r\n\t * Creates elements in related legend container, that mimics the look of this\r\n\t * Series.\r\n\t *\r\n\t * @ignore Exclude from docs\r\n\t * @param marker Legend item container\r\n\t */\r\n\tpublic createLegendMarker(marker: Container): void {\r\n\r\n\t\tlet w: number = marker.pixelWidth;\r\n\t\tlet h: number = marker.pixelHeight;\r\n\r\n\t\tmarker.removeChildren();\r\n\r\n\t\tlet column: OHLC = marker.createChild(OHLC);\r\n\t\tcolumn.shouldClone = false;\r\n\t\tcolumn.copyFrom(this.columns.template);\r\n\r\n\t\tlet cw: number;\r\n\t\tlet ch: number;\r\n\r\n\t\tlet openLine: Line = column.openLine;\r\n\t\tlet closeLine: Line = column.closeLine;\r\n\t\tlet highLowLine: Line = column.highLowLine;\r\n\r\n\t\tif (this.baseAxis == this.yAxis) {\r\n\t\t\tcw = w / 3;\r\n\t\t\tch = h;\r\n\r\n\t\t\thighLowLine.y = h / 2;\r\n\t\t\thighLowLine.x2 = w;\r\n\r\n\t\t\topenLine.x = w / 3 * 2;\r\n\t\t\topenLine.y2 = h / 2;\r\n\r\n\t\t\tcloseLine.x = w / 3;\r\n\t\t\tcloseLine.y2 = h;\r\n\t\t\tcloseLine.y1 = h / 2;\r\n\t\t}\r\n\t\telse {\r\n\t\t\tcw = w;\r\n\t\t\tch = h / 3;\r\n\r\n\t\t\thighLowLine.x = w / 2;\r\n\t\t\thighLowLine.y2 = h;\r\n\r\n\t\t\topenLine.y = h / 3 * 2;\r\n\t\t\topenLine.x2 = w / 2;\r\n\r\n\t\t\tcloseLine.y = h / 3;\r\n\t\t\tcloseLine.x2 = w;\r\n\t\t\tcloseLine.x1 = w / 2;\r\n\t\t}\r\n\t\tcolumn.width = cw;\r\n\t\tcolumn.height = ch;\r\n\r\n\t\t$object.copyProperties(this, marker, visualProperties);\r\n\t\t$object.copyProperties(this.columns.template, column, visualProperties);\r\n\r\n\t\tcolumn.stroke = this.riseFromOpenState.properties.stroke;\r\n\r\n\t\tlet legendDataItem = marker.dataItem;\r\n\t\tlegendDataItem.color = column.stroke;\r\n\t\tlegendDataItem.colorOrig = column.stroke;\r\n\t}\r\n\r\n\t/**\r\n\t * Returns an element to use for Candlestick\r\n\t * @ignore\r\n\t * @return Element.\r\n\t */\r\n\tprotected createColumnTemplate(): this[\"_column\"] {\r\n\t\treturn new OHLC();\r\n\t}\r\n\r\n}\r\n\r\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\r\nregistry.registeredClasses[\"OHLCSeries\"] = OHLCSeries;\r\nregistry.registeredClasses[\"OHLCSeriesDataItem\"] = OHLCSeriesDataItem;\r\n\n\n\n// WEBPACK FOOTER //\n// ../../../../../src/.internal/charts/series/OHLCSeries.ts","/**\r\n * Line series segment module.\r\n * @todo Add description about what this is\r\n */\r\n\r\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\r\nimport { ILineSeriesSegmentAdapters, ILineSeriesSegmentEvents, ILineSeriesSegmentProperties, LineSeriesSegment } from \"./LineSeriesSegment\";\r\nimport { IPoint } from \"../../core/defs/IPoint\";\r\nimport { registry } from \"../../core/Registry\";\r\nimport * as $path from \"../../core/rendering/Path\";\r\n\r\n\r\n/**\r\n * ============================================================================\r\n * REQUISITES\r\n * ============================================================================\r\n * @hidden\r\n */\r\n\r\n/**\r\n * Defines properties for [[StepLineSeriesSegment]].\r\n */\r\nexport interface IStepLineSeriesSegmentProperties extends ILineSeriesSegmentProperties { }\r\n\r\n/**\r\n * Defines events for [[StepLineSeriesSegment]].\r\n */\r\nexport interface IStepLineSeriesSegmentEvents extends ILineSeriesSegmentEvents { }\r\n\r\n/**\r\n * Defines adapters for [[StepLineSeriesSegment]].\r\n *\r\n * @see {@link Adapter}\r\n */\r\nexport interface IStepLineSeriesSegmentAdapters extends ILineSeriesSegmentAdapters, IStepLineSeriesSegmentProperties { }\r\n\r\n\r\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\r\n\r\n/**\r\n * Represents a line series segment.\r\n *\r\n * A line segment can be used to apply different properties to a part of the\r\n * line series, between two data points.\r\n *\r\n * @see {@link IStepLineSeriesSegmentEvents} for a list of available events\r\n * @see {@link IStepLineSeriesSegmentAdapters} for a list of available Adapters\r\n * @todo Example\r\n */\r\nexport class StepLineSeriesSegment extends LineSeriesSegment {\r\n\r\n\t/**\r\n\t * Defines available properties.\r\n\t */\r\n\tpublic _properties!: IStepLineSeriesSegmentProperties;\r\n\r\n\t/**\r\n\t * Defines available adapters.\r\n\t */\r\n\tpublic _adapter!: IStepLineSeriesSegmentAdapters;\r\n\r\n\t/**\r\n\t * Defines available events.\r\n\t */\r\n\tpublic _events!: IStepLineSeriesSegmentEvents;\r\n\r\n\t/**\r\n\t * Constructor\r\n\t */\r\n\tconstructor() {\r\n\r\n\t\t// Init\r\n\t\tsuper();\r\n\t\tthis.className = \"StepLineSeriesSegment\";\r\n\t}\r\n\r\n\t/**\r\n\t * Draws the series segment.\r\n\t *\r\n\t * @ignore Exclude from docs\r\n\t * @param points Points to connect\r\n\t * @param closePoints ?\r\n\t * @param smoothnessX Horizontal bezier setting (?)\r\n\t * @param smoothnessY Vertical bezier setting (?)\r\n\t */\r\n\tpublic drawSegment(points: IPoint[], closePoints: IPoint[], smoothnessX: number, smoothnessY: number, noRisers?: boolean, vertical?: boolean): void {\r\n\t\tif (points.length > 0 && closePoints.length > 0) {\r\n\r\n\t\t\tif (noRisers) {\r\n\t\t\t\tlet path: string = $path.moveTo(points[0]);\r\n\t\t\t\tif (points.length > 0) {\r\n\t\t\t\t\tfor (let i = 1; i < points.length; i++) {\r\n\t\t\t\t\t\tlet point = points[i];\r\n\t\t\t\t\t\tif (i / 2 == Math.round(i / 2)) {\r\n\t\t\t\t\t\t\tpath += $path.moveTo(point);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\tpath += $path.lineTo(point);\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\tthis.strokeSprite.path = path;\r\n\r\n\t\t\t\tif (this.fillOpacity > 0 || this.fillSprite.fillOpacity > 0) { // helps to avoid drawing fill object if fill is not visible\r\n\t\t\t\t\tpath = $path.moveTo(points[0]) + $path.polyline(points);\r\n\t\t\t\t\tpath += $path.lineTo(closePoints[0]) + $path.polyline(closePoints);\r\n\t\t\t\t\tpath += $path.lineTo(points[0]);\r\n\t\t\t\t\tpath += $path.closePath();\r\n\r\n\t\t\t\t\tthis.fillSprite.path = path;\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tlet path: string = $path.moveTo(points[0]) + $path.polyline(points);\r\n\r\n\t\t\t\tthis.strokeSprite.path = path;\r\n\r\n\t\t\t\tif (this.fillOpacity > 0 || this.fillSprite.fillOpacity > 0) { // helps to avoid drawing fill object if fill is not visible\r\n\t\t\t\t\tpath += $path.lineTo(closePoints[0]) + $path.polyline(closePoints);\r\n\t\t\t\t\tpath += $path.lineTo(points[0]);\r\n\t\t\t\t\tpath += $path.closePath();\r\n\r\n\t\t\t\t\tthis.fillSprite.path = path;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\telse{\r\n\t\t\tthis.strokeSprite.path = \"\";\r\n\t\t\tthis.fillSprite.path = \"\";\r\n\t\t}\r\n\t}\r\n}\r\n\r\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\r\nregistry.registeredClasses[\"StepLineSeriesSegment\"] = StepLineSeriesSegment;\r\n\n\n\n// WEBPACK FOOTER //\n// ../../../../../src/.internal/charts/series/StepLineSeriesSegment.ts","/**\r\n * Step line series module.\r\n */\r\n\r\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\r\nimport { LineSeries, LineSeriesDataItem, ILineSeriesDataFields, ILineSeriesProperties, ILineSeriesAdapters, ILineSeriesEvents } from \"./LineSeries\";\r\nimport { StepLineSeriesSegment } from \"./StepLineSeriesSegment\";\r\nimport { IPoint } from \"../../core/defs/IPoint\";\r\nimport { registry } from \"../../core/Registry\";\r\nimport * as $math from \"../../core/utils/Math\";\r\n\r\n\r\n/**\r\n * ============================================================================\r\n * DATA ITEM\r\n * ============================================================================\r\n * @hidden\r\n */\r\n\r\n/**\r\n * Defines a [[DataItem]] for [[StepLineSeries]].\r\n *\r\n * @see {@link DataItem}\r\n */\r\nexport class StepLineSeriesDataItem extends LineSeriesDataItem {\r\n\r\n\t/**\r\n\t * Defines a type of [[Component]] this data item is used for.\r\n\t */\r\n\tpublic _component!: StepLineSeries;\r\n\r\n\t/**\r\n\t * Constructor\r\n\t */\r\n\tconstructor() {\r\n\t\tsuper();\r\n\t\tthis.className = \"StepLineSeriesDataItem\";\r\n\t\tthis.applyTheme();\r\n\t}\r\n\r\n}\r\n\r\n\r\n/**\r\n * ============================================================================\r\n * REQUISITES\r\n * ============================================================================\r\n * @hidden\r\n */\r\n\r\n/**\r\n * Defines data fields for [[StepLineSeries]].\r\n */\r\nexport interface IStepLineSeriesDataFields extends ILineSeriesDataFields { }\r\n\r\n/**\r\n * Defines properties for [[StepLineSeries]].\r\n */\r\nexport interface IStepLineSeriesProperties extends ILineSeriesProperties {\r\n\tnoRisers?: boolean;\r\n\r\n\tstartLocation?: number;\r\n\r\n\tendLocation?: number;\r\n}\r\n\r\n/**\r\n * Defines events for [[StepLineSeries]].\r\n */\r\nexport interface IStepLineSeriesEvents extends ILineSeriesEvents { }\r\n\r\n/**\r\n * Defines adapters for [[StepLineSeries]].\r\n *\r\n * @see {@link Adapter}\r\n */\r\nexport interface IStepLineSeriesAdapters extends ILineSeriesAdapters, IStepLineSeriesProperties { }\r\n\r\n\r\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\r\n\r\n/**\r\n * Defines [[Series]] for a step line graph.\r\n *\r\n * @see {@link IStepLineSeriesEvents} for a list of available Events\r\n * @see {@link IStepLineSeriesAdapters} for a list of available Adapters\r\n * @todo Example\r\n * @important\r\n */\r\nexport class StepLineSeries extends LineSeries {\r\n\r\n\t/**\r\n\t * Defines the type of data fields used for the series.\r\n\t */\r\n\tpublic _dataFields: IStepLineSeriesDataFields;\r\n\r\n\t/**\r\n\t * Defines available properties.\r\n\t */\r\n\tpublic _properties!: IStepLineSeriesProperties;\r\n\r\n\t/**\r\n\t * Defines available adapters.\r\n\t */\r\n\tpublic _adapter!: IStepLineSeriesAdapters;\r\n\r\n\t/**\r\n\t * Defines available events.\r\n\t */\r\n\tpublic _events!: IStepLineSeriesEvents;\r\n\r\n\t/**\r\n\t * Defines the type of data item.\r\n\t */\r\n\tpublic _dataItem: StepLineSeriesDataItem;\r\n\r\n\t/**\r\n\t * Defines type for segement.\r\n\t */\r\n\tpublic _segment: StepLineSeriesSegment;\r\n\r\n\t/**\r\n\t * Constructor\r\n\t */\r\n\tconstructor() {\r\n\t\tsuper();\r\n\t\tthis.className = \"StepLineSeries\";\r\n\t\tthis.applyTheme();\r\n\t\tthis.startLocation = 0;\r\n\t\tthis.endLocation = 1;\r\n\t}\r\n\r\n\t/**\r\n\t * Returns a new/empty DataItem of the type appropriate for this object.\r\n\t *\r\n\t * @see {@link DataItem}\r\n\t * @return Data Item\r\n\t */\r\n\tprotected createDataItem(): this[\"_dataItem\"] {\r\n\t\treturn new StepLineSeriesDataItem();\r\n\t}\r\n\r\n\t/**\r\n\t * [addPoints description]\r\n\t *\r\n\t * @todo Description\r\n\t * @param points [description]\r\n\t * @param dataItem [description]\r\n\t * @param xField [description]\r\n\t * @param yField [description]\r\n\t * @param backwards [description]\r\n\t */\r\n\tprotected addPoints(points: IPoint[], dataItem: this[\"_dataItem\"], xField: string, yField: string, backwards?: boolean): void {\r\n\r\n\t\tlet startLocationX:number;\r\n\t\tlet endLocationX:number;\r\n\r\n\t\tlet startLocationY:number;\r\n\t\tlet endLocationY:number;\t\t\r\n\r\n\t\tif(this.baseAxis == this.xAxis){\r\n\t\t\tstartLocationX = this.startLocation;\r\n\t\t\tendLocationX = this.endLocation;\r\n\r\n\t\t\tstartLocationY = this.getAdjustedXLocation(dataItem, this.yOpenField);\r\n\t\t\tendLocationY = this.getAdjustedXLocation(dataItem, this.yField);\r\n\t\t}\r\n\r\n\t\tif(this.baseAxis == this.yAxis){\r\n\t\t\tstartLocationY = this.startLocation;\r\n\t\t\tendLocationY = this.endLocation;\r\n\r\n\t\t\tstartLocationX = this.getAdjustedXLocation(dataItem, this.xOpenField);\r\n\t\t\tendLocationX = this.getAdjustedXLocation(dataItem, this.xField);\t\t\t\r\n\t\t}\r\n\r\n\r\n\t\tlet x0: number = this.xAxis.getX(dataItem, xField, startLocationX);\r\n\t\tlet y0: number = this.yAxis.getY(dataItem, yField, startLocationY);\r\n\r\n\t\tlet x1: number = this.xAxis.getX(dataItem, xField, endLocationX);\r\n\t\tlet y1: number = this.yAxis.getY(dataItem, yField, endLocationY);\r\n\r\n\t\tx0 = $math.fitToRange(x0, -100000, 100000); // from geometric point of view this is not right, but practically it's ok. this is done to avoid too big objects.\r\n\t\ty0 = $math.fitToRange(y0, -100000, 100000); // from geometric point of view this is not right, but practically it's ok. this is done to avoid too big objects.\r\n\r\n\t\tx1 = $math.fitToRange(x1, -100000, 100000); // from geometric point of view this is not right, but practically it's ok. this is done to avoid too big objects.\r\n\t\ty1 = $math.fitToRange(y1, -100000, 100000); // from geometric point of view this is not right, but practically it's ok. this is done to avoid too big objects.\r\n\r\n\t\t// this might make an impression that points are duplicated, and they indeed are, but this is needed to handle gaps in data\r\n\t\tif (!this.noRisers) {\r\n\t\t\tif (points.length > 1) {\r\n\t\t\t\tlet prevPoint: IPoint = points[points.length - 1];\r\n\t\t\t\tif (this.baseAxis == this.xAxis) {\r\n\t\t\t\t\tif (backwards) {\r\n\t\t\t\t\t\tpoints.push({ x: prevPoint.x, y: y1 });\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse {\r\n\t\t\t\t\t\tpoints.push({ x: x0, y: prevPoint.y });\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tif (this.baseAxis == this.yAxis) {\r\n\t\t\t\t\tif (backwards) {\r\n\t\t\t\t\t\tpoints.push({ x: x1, y: prevPoint.y });\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse {\r\n\t\t\t\t\t\tpoints.push({ x: prevPoint.x, y: y0 });\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tlet point0: IPoint = { x: x0, y: y0 };\r\n\t\tlet point1: IPoint = { x: x1, y: y1 };\r\n\r\n\t\tif (backwards) {\r\n\t\t\tpoints.push(point1, point0);\r\n\t\t}\r\n\t\telse {\r\n\t\t\tpoints.push(point0, point1);\r\n\t\t}\r\n\t}\r\n\r\n\r\n\t/**\r\n\t * Draws the line segment.\r\n\t *\r\n\t * @param segment Segment\r\n\t * @param points Segment points\r\n\t * @param closePoints Segment close points\r\n\t */\r\n\tprotected drawSegment(segment: StepLineSeriesSegment, points: IPoint[], closePoints: IPoint[]): void {\r\n\t\tlet vertical = false;\r\n\t\tif (this.yAxis == this.baseAxis) {\r\n\t\t\tvertical = true;\r\n\t\t}\r\n\t\tsegment.drawSegment(points, closePoints, this.tensionX, this.tensionY, this.noRisers, vertical);\r\n\t}\r\n\r\n\r\n\r\n\t/**\r\n\t * @ignore\r\n\t */\r\n\tprotected createSegment(): this[\"_segment\"] {\r\n\t\treturn new StepLineSeriesSegment();\r\n\t}\r\n\r\n\t/**\r\n\t * Specifies if step line series should draw only horizontal (or only\r\n\t * vertical, depending on base axis) lines, instead of connecting them with\r\n\t * vertical (or horizontal) lines.\r\n\t *\r\n\t * @default false\r\n\t * @param value No risers\r\n\t */\r\n\tpublic set noRisers(value: boolean) {\r\n\t\tthis.setPropertyValue(\"noRisers\", value, true);\r\n\t}\r\n\r\n\t/**\r\n\t * @return No risers\r\n\t */\r\n\tpublic get noRisers(): boolean {\r\n\t\treturn this.getPropertyValue(\"noRisers\");\r\n\t}\r\n\r\n\r\n\t/**\r\n\t * start location of the step\r\n\t *\r\n\t * @param value Location (0-1)\r\n\t * @default 0\r\n\t */\r\n\tpublic set startLocation(value: number) {\r\n\t\tthis.setPropertyValue(\"startLocation\", value, true);\r\n\t}\r\n\r\n\t/**\r\n\t * @return Location (0-1)\r\n\t */\r\n\tpublic get startLocation(): number {\r\n\t\treturn this.getPropertyValue(\"startLocation\");\r\n\t}\r\n\r\n\t/**\r\n\t * Step end location.\r\n\t *\r\n\t * @param value Location (0-1)\r\n\t * #default 1\r\n\t */\r\n\tpublic set endLocation(value: number) {\r\n\t\tthis.setPropertyValue(\"endLocation\", value, true);\r\n\t}\r\n\r\n\t/**\r\n\t * @return Location (0-1)\r\n\t */\r\n\tpublic get endLocation(): number {\r\n\t\treturn this.getPropertyValue(\"endLocation\");\r\n\t}\r\n\r\n}\r\n\r\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\r\nregistry.registeredClasses[\"StepLineSeries\"] = StepLineSeries;\r\nregistry.registeredClasses[\"StepLineSeriesDataItem\"] = StepLineSeriesDataItem;\r\n\n\n\n// WEBPACK FOOTER //\n// ../../../../../src/.internal/charts/series/StepLineSeries.ts","/**\r\n * Module that defines everything related to building RadarColumns.\r\n * It is a container which has radarColumn element which is a Slice.\r\n */\r\n\r\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\r\nimport { Column, IColumnProperties, IColumnAdapters, IColumnEvents } from \"./Column\";\r\nimport { Slice } from \"../../core/elements/Slice\";\r\nimport { registry } from \"../../core/Registry\";\r\nimport * as $type from \"../../core/utils/Type\";\r\n\r\n/**\r\n * ============================================================================\r\n * REQUISITES\r\n * ============================================================================\r\n * @hidden\r\n */\r\n\r\n/**\r\n * Defines properties for [[RadarColumn]].\r\n */\r\nexport interface IRadarColumnProperties extends IColumnProperties { }\r\n\r\n/**\r\n * Defines events for [[RadarColumn]].\r\n */\r\nexport interface IRadarColumnEvents extends IColumnEvents { }\r\n\r\n/**\r\n * Defines adapters for [[RadarColumn]].\r\n *\r\n * @see {@link Adapter}\r\n */\r\nexport interface IRadarColumnAdapters extends IColumnAdapters, IRadarColumnProperties { }\r\n\r\n\r\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\r\n\r\n/**\r\n * Class used to creates RadarColumns.\r\n *\r\n * @see {@link IRadarColumnEvents} for a list of available events\r\n * @see {@link IRadarColumnAdapters} for a list of available Adapters\r\n * @todo Usage example\r\n * @important\r\n */\r\nexport class RadarColumn extends Column {\r\n\r\n\t/**\r\n\t * Defines available properties.\r\n\t */\r\n\tpublic _properties!: IRadarColumnProperties;\r\n\r\n\t/**\r\n\t * Defines available adapters.\r\n\t */\r\n\tpublic _adapter!: IRadarColumnAdapters;\r\n\r\n\t/**\r\n\t * Defines available events.\r\n\t */\r\n\tpublic _events!: IRadarColumnEvents;\r\n\r\n\r\n\t/**\r\n\t * Radar column element\r\n\t */\r\n\tpublic radarColumn: Slice;\r\n\r\n\t/**\r\n\t * Constructor\r\n\t */\r\n\tconstructor() {\r\n\t\tsuper();\r\n\t\tthis.className = \"RadarColumn\";\r\n\t}\r\n\r\n\t/**\r\n\t * @ignore\r\n\t */\r\n\tprotected createAssets() {\r\n\t\tthis.radarColumn = this.createChild(Slice);\r\n\t\tthis.radarColumn.shouldClone = false;\r\n\t\tthis.radarColumn.strokeOpacity = undefined;\r\n\t\t// some dirty hack so that if user access column, it won't get error\r\n\t\tthis.column = this.radarColumn;\r\n\t}\r\n\r\n\t/**\r\n\t * Copies all parameters from another [[RadarColumn]].\r\n\t *\r\n\t * @param source Source RadarColumn\r\n\t */\r\n\tpublic copyFrom(source: this) {\r\n\t\tsuper.copyFrom(source)\r\n\t\tif (this.radarColumn) {\r\n\t\t\tthis.radarColumn.copyFrom(source.radarColumn);\r\n\t\t}\r\n\t}\r\n\r\n\r\n\t/**\r\n\t * X coordinate for the slice tooltip.\r\n\t *\r\n\t * @return X\r\n\t * @ignore\r\n\t */\r\n\tpublic getTooltipX(): number {\r\n\t\tlet value = this.getPropertyValue(\"tooltipX\");\r\n\t\tif (!$type.isNumber(value)) {\r\n\t\t\treturn this.radarColumn.getTooltipX();\r\n\t\t}\r\n\t\treturn value;\r\n\t}\r\n\r\n\t/**\r\n\t * Y coordinate for the slice tooltip.\r\n\t *\r\n\t * @return Y\r\n\t * @ignore\r\n\t */\r\n\tpublic getTooltipY(): number {\r\n\t\tlet value = this.getPropertyValue(\"tooltipX\");\r\n\t\tif (!$type.isNumber(value)) {\r\n\t\t\treturn this.radarColumn.getTooltipY();\r\n\t\t}\r\n\t\treturn value;\r\n\t}\r\n\r\n}\r\n\r\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\r\nregistry.registeredClasses[\"RadarColumn\"] = RadarColumn;\r\n\n\n\n// WEBPACK FOOTER //\n// ../../../../../src/.internal/charts/elements/RadarColumn.ts","/**\r\n * Radar column series module.\r\n */\r\n\r\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\r\nimport { ColumnSeries, IColumnSeriesProperties, IColumnSeriesDataFields, IColumnSeriesAdapters, IColumnSeriesEvents, ColumnSeriesDataItem } from \"../series/ColumnSeries\";\r\nimport { Sprite, visualProperties } from \"../../core/Sprite\";\r\nimport { RadarChart } from \"../types/RadarChart\";\r\nimport { AxisRendererRadial } from \"../axes/AxisRendererRadial\";\r\nimport { Axis } from \"../axes/Axis\";\r\nimport { CategoryAxis } from \"../axes/CategoryAxis\";\r\nimport { AxisRendererCircular } from \"../axes/AxisRendererCircular\";\r\nimport { RadarColumn } from \"../elements/RadarColumn\";\r\nimport { registry } from \"../../core/Registry\";\r\nimport * as $path from \"../../core/rendering/Path\";\r\nimport * as $math from \"../../core/utils/Math\";\r\nimport * as $object from \"../../core/utils/Object\";\r\nimport { Percent } from \"../../core/utils/Percent\";\r\nimport * as $iter from \"../../core/utils/Iterator\";\r\nimport * as $array from \"../../core/utils/Array\";\r\nimport * as $type from \"../../core/utils/Type\";\r\n\r\n/**\r\n * ============================================================================\r\n * DATA ITEM\r\n * ============================================================================\r\n * @hidden\r\n */\r\n\r\n/**\r\n * Defines a [[DataItem]] for [[RadarColumnSeries]].\r\n *\r\n * @see {@link DataItem}\r\n */\r\nexport class RadarColumnSeriesDataItem extends ColumnSeriesDataItem {\r\n\r\n\t/**\r\n\t * A sprite used to draw the column.\r\n\t */\r\n\tpublic _column: RadarColumn;\r\n\r\n\t/**\r\n\t * Defines a type of [[Component]] this data item is used for.\r\n\t */\r\n\tpublic _component!: RadarColumnSeries;\r\n\r\n\t/**\r\n\t * Constructor\r\n\t */\r\n\tconstructor() {\r\n\t\tsuper();\r\n\t\tthis.className = \"ColumnSeriesDataItem\";\r\n\t\tthis.applyTheme();\r\n\t}\r\n}\r\n\r\n\r\n/**\r\n * ============================================================================\r\n * REQUISITES\r\n * ============================================================================\r\n * @hidden\r\n */\r\n\r\n/**\r\n * Defines data fields for [[RadarColumnSeries]].\r\n */\r\nexport interface IRadarColumnSeriesDataFields extends IColumnSeriesDataFields { }\r\n\r\n/**\r\n * Defines properties for [[RadarColumnSeries]].\r\n */\r\nexport interface IRadarColumnSeriesProperties extends IColumnSeriesProperties { }\r\n\r\n/**\r\n * Defines events for [[RadarColumnSeries]].\r\n */\r\nexport interface IRadarColumnSeriesEvents extends IColumnSeriesEvents { }\r\n\r\n/**\r\n * Defines adapters for [[RadarColumnSeries]].\r\n *\r\n * @see {@link Adapter}\r\n */\r\nexport interface IRadarColumnSeriesAdapters extends IColumnSeriesAdapters, IRadarColumnSeriesProperties { }\r\n\r\n\r\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\r\n\r\n/**\r\n * Defines [[Series]] for a 3D column graph.\r\n *\r\n * @see {@link IRadarColumnSeriesEvents} for a list of available Events\r\n * @see {@link IRadarColumnSeriesAdapters} for a list of available Adapters\r\n * @todo Example\r\n * @important\r\n */\r\nexport class RadarColumnSeries extends ColumnSeries {\r\n\r\n\t/**\r\n\t * Type of data item.\r\n\t */\r\n\tpublic _dataItem: RadarColumnSeriesDataItem;\r\n\r\n\t/**\r\n\t * Type of column.\r\n\t */\r\n\tpublic _column: RadarColumn;\r\n\r\n\t/**\r\n\t * Defines the type of data fields used for the series.\r\n\t */\r\n\tpublic _dataFields: IRadarColumnSeriesDataFields;\r\n\r\n\t/**\r\n\t * Defines available properties.\r\n\t */\r\n\tpublic _properties!: IRadarColumnSeriesProperties;\r\n\r\n\t/**\r\n\t * Defines available adapters.\r\n\t */\r\n\tpublic _adapter!: IRadarColumnSeriesAdapters;\r\n\r\n\t/**\r\n\t * Defines available events.\r\n\t */\r\n\tpublic _events!: IRadarColumnSeriesEvents;\r\n\r\n\t/**\r\n\t * A chart series belongs to.\r\n\t */\r\n\tpublic _chart: RadarChart;\r\n\r\n\t/**\r\n\t * Constructor\r\n\t */\r\n\tconstructor() {\r\n\t\tsuper();\r\n\t\tthis.className = \"RadarColumnSeries\";\r\n\t\tthis.applyTheme();\r\n\t}\r\n\r\n\t/**\r\n\t * Creates and returns a RadarColumn element to use as column in radar chart.\r\n\t *\r\n\t * @return RadarColumn.\r\n\t */\r\n\tprotected createColumnTemplate(): this[\"_column\"] {\r\n\t\treturn new RadarColumn();\r\n\t}\r\n\r\n\t/**\r\n\t * (Re)validates the whole series, effectively causing it to redraw.\r\n\t *\r\n\t * @ignore Exclude from docs\r\n\t */\r\n\tpublic validate(): void {\r\n\r\n\t\t// so that radius would be updated\r\n\t\tif (this.chart.invalid) {\r\n\t\t\tthis.chart.validate();\r\n\t\t}\r\n\r\n\t\tsuper.validate();\r\n\t}\r\n\r\n\t/**\r\n\t * @ignore\r\n\t */\r\n\tprotected disableUnusedColumns(dataItem: ColumnSeriesDataItem) {\r\n\t\tif (dataItem) {\r\n\t\t\tif (dataItem.column) {\r\n\t\t\t\tdataItem.column.__disabled = true;\r\n\t\t\t}\r\n\r\n\t\t\t$iter.each(this.axisRanges.iterator(), (axisRange) => {\r\n\t\t\t\tlet rangeColumn: Sprite = dataItem.rangesColumns.getKey(axisRange.uid);\r\n\t\t\t\tif (rangeColumn) {\r\n\t\t\t\t\trangeColumn.__disabled = true;\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 * Validates data item's element, effectively redrawing it.\r\n\t *\r\n\t * @ignore Exclude from docs\r\n\t * @param dataItem Data item\r\n\t */\r\n\tpublic validateDataElementReal(dataItem: this[\"_dataItem\"]): void {\r\n\t\tlet startAngle = this.chart.startAngle;\r\n\t\tlet endAngle = this.chart.endAngle;\r\n\r\n\t\tlet yField: string = this.yField;\r\n\t\tlet yOpenField: string = this.yOpenField;\r\n\t\tlet xField: string = this.xField;\r\n\t\tlet xOpenField: string = this.xOpenField;\r\n\r\n\t\tlet lAngle: number;\r\n\t\tlet rAngle: number;\r\n\r\n\t\tlet tRadius: number;\r\n\t\tlet bRadius: number;\r\n\r\n\t\tlet startLocation = this.getStartLocation(dataItem);\r\n\t\tlet endLocation = this.getEndLocation(dataItem);\r\n\r\n\t\tlet cellAngle = (endAngle - startAngle) / (this.dataItems.length * (this.end - this.start));\r\n\r\n\t\tlet radarColumn = dataItem.column;\r\n\t\tif (!radarColumn) {\r\n\t\t\tradarColumn = this.columns.create();\r\n\t\t\tdataItem.column = radarColumn;\r\n\t\t\t$object.copyProperties(this, radarColumn, visualProperties); // need this \r\n\t\t\t$object.copyProperties(this.columns.template, radarColumn, visualProperties); // second time, no force, so that columns.template would override series properties\t\t\t\r\n\t\t\tdataItem.addSprite(radarColumn);\r\n\t\t\tradarColumn.paper = this.paper; // sometimes pattern is not drawn if is set with adapter without this.\r\n\t\t\tthis.setColumnStates(radarColumn);\r\n\t\t}\r\n\r\n\t\tlet width = radarColumn.width;\r\n\t\tlet percentWidth = 100;\r\n\r\n\t\tif (width instanceof Percent) {\r\n\t\t\tpercentWidth = width.percent;\r\n\t\t}\r\n\r\n\t\tlet offset: number = $math.round((endLocation - startLocation) * (1 - percentWidth / 100) / 2, 5);\r\n\t\tstartLocation += offset;\r\n\t\tendLocation -= offset;\r\n\t\t// two category axes\r\n\t\tif ((this.xAxis instanceof CategoryAxis) && (this.yAxis instanceof CategoryAxis)) {\r\n\t\t\ttRadius = $math.getDistance({ x: this.yAxis.getX(dataItem, yField, 0, \"valueY\"), y: this.yAxis.getY(dataItem, yField, 0, \"valueY\") });\r\n\t\t\tbRadius = $math.getDistance({ x: this.yAxis.getX(dataItem, yOpenField, 1, \"valueY\"), y: this.yAxis.getY(dataItem, yOpenField, 1, \"valueY\") });\r\n\r\n\t\t\tlAngle = this.xAxis.getAngle(dataItem, xOpenField, 0, \"valueX\");\r\n\t\t\trAngle = this.xAxis.getAngle(dataItem, xField, 1, \"valueX\");\r\n\r\n\t\t\tstartAngle = startAngle + startLocation * cellAngle;\r\n\t\t\tendAngle = endAngle - (1 - endLocation) * cellAngle;\r\n\t\t}\r\n\t\telse if (this.baseAxis == this.xAxis) {\r\n\t\t\ttRadius = $math.getDistance({ x: this.yAxis.getX(dataItem, yField, dataItem.locations[yField], \"valueY\"), y: this.yAxis.getY(dataItem, yField, dataItem.locations[yField], \"valueY\") });\r\n\t\t\tbRadius = $math.getDistance({ x: this.yAxis.getX(dataItem, yOpenField, dataItem.locations[yOpenField], \"valueY\"), y: this.yAxis.getY(dataItem, yOpenField, dataItem.locations[yOpenField], \"valueY\") });\r\n\r\n\t\t\tlAngle = this.xAxis.getAngle(dataItem, xOpenField, startLocation, \"valueX\");\r\n\t\t\trAngle = this.xAxis.getAngle(dataItem, xField, endLocation, \"valueX\");\r\n\r\n\t\t\tstartAngle = startAngle + startLocation * cellAngle;\r\n\t\t\tendAngle = endAngle - (1 - endLocation) * cellAngle;\r\n\t\t}\r\n\t\telse {\r\n\t\t\ttRadius = $math.getDistance({ x: this.yAxis.getX(dataItem, yField, startLocation, \"valueY\"), y: this.yAxis.getY(dataItem, yField, startLocation, \"valueY\") });\r\n\t\t\tbRadius = $math.getDistance({ x: this.yAxis.getX(dataItem, yOpenField, endLocation, \"valueY\"), y: this.yAxis.getY(dataItem, yOpenField, endLocation, \"valueY\") });\r\n\r\n\t\t\tif ($type.isNumber(width)) {\t\t\t\t\r\n\t\t\t\tlet abs = Math.abs(tRadius - bRadius);\r\n\t\t\t\tif (abs > width) {\r\n\t\t\t\t\tlet d = (abs - width) / 2;\r\n\t\t\t\t\ttRadius += d;\r\n\t\t\t\t\tbRadius -= d;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tlAngle = this.xAxis.getAngle(dataItem, xField, dataItem.locations[xField], \"valueX\");\r\n\r\n\t\t\trAngle = this.xAxis.getAngle(dataItem, xOpenField, dataItem.locations[xOpenField], \"valueX\");\r\n\t\t}\r\n\r\n\t\tif (rAngle < lAngle) {\r\n\t\t\tlet temp = rAngle;\r\n\t\t\trAngle = lAngle;\r\n\t\t\tlAngle = temp;\r\n\t\t}\r\n\r\n\t\tlAngle = $math.fitToRange(lAngle, startAngle, endAngle);\r\n\t\trAngle = $math.fitToRange(rAngle, startAngle, endAngle);\r\n\r\n\t\tlet slice = radarColumn.radarColumn;\r\n\r\n\t\tslice.startAngle = lAngle;\r\n\r\n\t\tlet arc = rAngle - lAngle;\r\n\r\n\t\tif (arc > 0) {\r\n\t\t\tslice.arc = arc;\r\n\t\t\tslice.radius = tRadius;\r\n\t\t\tslice.innerRadius = bRadius;\r\n\t\t\tradarColumn.__disabled = false;\r\n\r\n\t\t\tradarColumn.parent = this.columnsContainer;\r\n\r\n\t\t\t$iter.each(this.axisRanges.iterator(), (axisRange) => {\r\n\t\t\t\tlet rangeColumn = dataItem.rangesColumns.getKey(axisRange.uid);\r\n\t\t\t\tif (!rangeColumn) {\r\n\t\t\t\t\trangeColumn = this.columns.create();\r\n\r\n\t\t\t\t\t$object.forceCopyProperties(this.columns.template, rangeColumn, visualProperties);\r\n\t\t\t\t\t$object.copyProperties(axisRange.contents, rangeColumn, visualProperties); // need this because 3d columns are not in the same container\r\n\r\n\t\t\t\t\tif (rangeColumn.dataItem) {\r\n\t\t\t\t\t\t$array.remove(rangeColumn.dataItem.sprites, rangeColumn);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tdataItem.addSprite(rangeColumn);\r\n\t\t\t\t\trangeColumn.paper = this.paper; // sometimes pattern is not drawn if is set with adapter without this.\t\t\t\t\t\r\n\t\t\t\t\tthis.setColumnStates(rangeColumn);\r\n\t\t\t\t\tdataItem.rangesColumns.setKey(axisRange.uid, rangeColumn);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tlet slice = rangeColumn.radarColumn;\r\n\t\t\t\tslice.startAngle = lAngle;\r\n\t\t\t\tslice.arc = arc;\r\n\t\t\t\tslice.radius = tRadius;\r\n\t\t\t\tslice.innerRadius = bRadius;\r\n\r\n\t\t\t\tif (slice.invalid) {\r\n\t\t\t\t\tslice.paper = this.paper;\r\n\t\t\t\t\tslice.validate(); // validate as if it was used previously, it will flicker with previous dimensions\r\n\t\t\t\t}\r\n\r\n\t\t\t\trangeColumn.__disabled = false;\r\n\t\t\t\trangeColumn.parent = axisRange.contents;\r\n\t\t\t});\r\n\t\t}\r\n\t\telse {\r\n\t\t\tthis.disableUnusedColumns(dataItem);\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Returns an [[IPoint]] coordinates of the specific Serie's data point.\r\n\t *\r\n\t * @param dataItem Data item\r\n\t * @param xKey Name of X data field\r\n\t * @param yKey Name of Y data field\r\n\t * @param locationX X location\r\n\t * @param locationY Y location\r\n\t * @param stackKeyX ?\r\n\t * @param stackKeyY ?\r\n\t * @returns Coordinates\r\n\t */\r\n\tpublic getPoint(dataItem: RadarColumnSeriesDataItem, xKey: string, yKey: string, locationX?: number, locationY?: number, stackKeyX?: string, stackKeyY?: string) {\r\n\r\n\t\tif (!stackKeyX) {\r\n\t\t\tstackKeyX = \"valueX\";\r\n\t\t}\r\n\t\tif (!stackKeyY) {\r\n\t\t\tstackKeyY = \"valueY\";\r\n\t\t}\r\n\r\n\t\tlet x: number = this.yAxis.getX(dataItem, yKey, locationY, stackKeyY);\r\n\t\tlet y: number = this.yAxis.getY(dataItem, yKey, locationY, stackKeyY);\r\n\r\n\t\tlet radius: number = $math.getDistance({ x: x, y: y });\r\n\t\t// hack to be able to determine angle later\r\n\t\tif (radius == 0) {\r\n\t\t\tradius = 0.00001;\r\n\t\t}\r\n\r\n\t\tlet angle: number = this.xAxis.getAngle(dataItem, xKey, locationX, stackKeyX);\r\n\r\n\t\treturn { x: radius * $math.cos(angle), y: radius * $math.sin(angle) };\r\n\t}\r\n\r\n\r\n\t/**\r\n\t * Returns an SVG path to be used as a mask for the series.\r\n\t *\r\n\t * @return SVG path\r\n\t */\r\n\tprotected getMaskPath(): string {\r\n\t\tlet renderer: AxisRendererRadial = this.yAxis.renderer;\r\n\t\treturn $path.arc(renderer.startAngle, renderer.endAngle - renderer.startAngle, renderer.pixelRadius, renderer.pixelInnerRadius);\r\n\t}\r\n\r\n\tprotected positionBulletReal(bullet: Sprite, positionX: number, positionY: number) {\r\n\t\tlet xAxis = this.xAxis;\r\n\t\tlet yAxis = this.yAxis;\r\n\r\n\t\tif (positionX < xAxis.start || positionX > xAxis.end || positionY < yAxis.start || positionY > yAxis.end) {\r\n\t\t\tbullet.visible = false;\r\n\t\t}\r\n\r\n\t\tbullet.moveTo(this.xAxis.renderer.positionToPoint(positionX, positionY));\r\n\t}\r\n\r\n\tprotected setXAxis(axis: Axis) {\r\n\t\tsuper.setXAxis(axis);\r\n\t\tthis.updateRendererRefs();\r\n\t}\r\n\r\n\tprotected setYAxis(axis: Axis) {\r\n\t\tsuper.setYAxis(axis);\r\n\t\tthis.updateRendererRefs();\r\n\t}\r\n\r\n\tprotected updateRendererRefs() {\r\n\t\tlet rendererX = this.xAxis.renderer;\r\n\t\tlet rendererY = this.yAxis.renderer;\r\n\r\n\t\trendererX.axisRendererY = rendererY;\r\n\t}\r\n}\r\n\r\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\r\nregistry.registeredClasses[\"RadarColumnSeries\"] = RadarColumnSeries;\r\nregistry.registeredClasses[\"RadarColumnSeriesDataItem\"] = RadarColumnSeriesDataItem;\r\n\n\n\n// WEBPACK FOOTER //\n// ../../../../../src/.internal/charts/series/RadarColumnSeries.ts","/**\r\n * Module that defines everything related to building Funnel slices.\r\n */\r\n\r\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\r\nimport { Container, IContainerProperties, IContainerAdapters, IContainerEvents } from \"../../core/Container\";\r\nimport { Sprite } from \"../../core/Sprite\";\r\nimport { registry } from \"../../core/Registry\";\r\nimport { percent, Percent } from \"../../core/utils/Percent\";\r\nimport * as $utils from \"../../core/utils/Utils\";\r\nimport { Orientation } from \"../../core/defs/Orientation\";\r\nimport { IPoint } from \"../../core/defs/IPoint\";\r\nimport * as $path from \"../../core/rendering/Path\";\r\n\r\n\r\n/**\r\n * ============================================================================\r\n * REQUISITES\r\n * ============================================================================\r\n * @hidden\r\n */\r\n\r\n/**\r\n * Defines properties for [[FunnelSlice]].\r\n */\r\nexport interface IFunnelSliceProperties extends IContainerProperties {\r\n\r\n\t/**\r\n\t * Width of the top edge of the slice.\r\n\t */\r\n\ttopWidth?: number | Percent;\r\n\r\n\t/**\r\n\t * Width of the bottom edge of the slice.\r\n\t */\r\n\tbottomWidth?: number | Percent;\r\n\r\n\t/**\r\n\t * A relative distance slice's sides should be bent to.\r\n\t *\r\n\t * @default 0\r\n\t */\r\n\texpandDistance?: number;\r\n\r\n\t/**\r\n\t * Orientation of the slice.\r\n\t */\r\n\torientation?: Orientation;\r\n}\r\n\r\n/**\r\n * Defines events for [[FunnelSlice]].\r\n */\r\nexport interface IFunnelSliceEvents extends IContainerEvents { }\r\n\r\n/**\r\n * Defines adapters for [[FunnelSlice]].\r\n *\r\n * @see {@link Adapter}\r\n */\r\nexport interface IFunnelSliceAdapters extends IContainerAdapters, IFunnelSliceProperties { }\r\n\r\n\r\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\r\n\r\n/**\r\n * Class used to create [[FunnelSlice]] elements.\r\n *\r\n * @see {@link IFunnelSliceEvents} for a list of available events\r\n * @see {@link IFunnelSliceAdapters} for a list of available adapters\r\n * @see {@link https://www.amcharts.com/docs/v4/chart-types/sliced-chart/} for documentation\r\n * @important\r\n */\r\nexport class FunnelSlice extends Container {\r\n\r\n\t/**\r\n\t * Defines available properties.\r\n\t */\r\n\tpublic _properties!: IFunnelSliceProperties;\r\n\r\n\t/**\r\n\t * Defines available adapters.\r\n\t */\r\n\tpublic _adapter!: IFunnelSliceAdapters;\r\n\r\n\t/**\r\n\t * Defines available events.\r\n\t */\r\n\tpublic _events!: IFunnelSliceEvents;\r\n\r\n\t/**\r\n\t * Main slice element.\r\n\t */\r\n\tpublic slice: Sprite;\r\n\r\n\t/**\r\n\t * Am anchor point the slice tick line is pointing to.\r\n\t *\r\n\t * @ignore Exclude from docs\r\n\t * @readonly\r\n\t */\r\n\tpublic tickPoint: IPoint;\r\n\r\n\t/**\r\n\t * Constructor\r\n\t */\r\n\tconstructor() {\r\n\t\tsuper();\r\n\r\n\t\tthis.slice = this.createChild(Sprite);\r\n\t\tthis.slice.shouldClone = false;\r\n\t\tthis.slice.setElement(this.paper.add(\"path\"));\r\n\t\tthis.slice.isMeasured = false;\r\n\r\n\t\tthis.orientation = \"vertical\";\r\n\t\tthis.bottomWidth = percent(100);\r\n\t\tthis.topWidth = percent(100);\r\n\t\tthis.isMeasured = false;\r\n\r\n\t\tthis.width = 10;\r\n\t\tthis.height = 10;\r\n\r\n\t\tthis.expandDistance = 0;\r\n\r\n\t\tthis.className = \"FunnelSlice\";\r\n\r\n\t\tthis.applyTheme();\r\n\t}\r\n\r\n\t/**\r\n\t * Draws the element.\r\n\t */\r\n\tprotected draw(): void {\r\n\t\tsuper.draw();\r\n\r\n\t\tlet pt = this.pixelPaddingTop;\r\n\t\tlet pb = this.pixelPaddingBottom;\r\n\t\tlet pr = this.pixelPaddingRight;\r\n\t\tlet pl = this.pixelPaddingLeft;\r\n\r\n\t\tlet w = this.pixelWidth - pr - pl;\r\n\t\tlet h = this.pixelHeight - pt - pb;\r\n\r\n\t\tlet ed = this.expandDistance;\r\n\r\n\t\tlet path = \"\";\r\n\r\n\r\n\t\tif (this.orientation == \"vertical\") {\r\n\t\t\tlet tw = $utils.relativeToValue(this.topWidth, w);\r\n\t\t\tlet bw = $utils.relativeToValue(this.bottomWidth, w);\r\n\r\n\t\t\tlet tl = { x: (w - tw) / 2 + pl, y: pt };\r\n\t\t\tlet tr = { x: (w + tw) / 2 + pl, y: pt };\r\n\r\n\t\t\tlet br = { x: (w + bw) / 2 + pl, y: pt + h };\r\n\t\t\tlet bl = { x: (w - bw) / 2 + pl, y: pt + h };\r\n\r\n\t\t\tlet cpr = { x: tr.x + (br.x - tr.x) / 2 + ed * h, y: tr.y + 0.5 * h };\r\n\t\t\tlet cpl = { x: tl.x + (bl.x - tl.x) / 2 - ed * h, y: tl.y + 0.5 * h };\r\n\r\n\t\t\tlet qp1 = $path.lineTo(br);\r\n\t\t\tlet qp2 = $path.lineTo(tl);\r\n\r\n\t\t\tif(ed != 0){\r\n\t\t\t\tqp1 = $path.quadraticCurveTo(br, cpr);\r\n\t\t\t\tqp2 = $path.quadraticCurveTo(tl, cpl);\r\n\t\t\t}\r\n\r\n\t\t\tpath = $path.moveTo(tl) + $path.lineTo(tr) + qp1 + $path.lineTo(bl) + qp2;\r\n\r\n\t\t\tthis.tickPoint = { x: tr.x + (br.x - tr.x) / 2, y: tr.y + (br.y - tr.y) / 2 };\r\n\t\t}\r\n\t\telse {\r\n\t\t\tlet tw = $utils.relativeToValue(this.topWidth, h);\r\n\t\t\tlet bw = $utils.relativeToValue(this.bottomWidth, h);\r\n\r\n\t\t\tlet tt = { x: pl, y: (h - tw) / 2 + pt };\r\n\t\t\tlet tb = { x: pl, y: (h + tw) / 2 + pt };\r\n\r\n\t\t\tlet bt = { x: pl + w, y: (h - bw) / 2 + pt };\r\n\t\t\tlet bb = { x: pl + w, y: (h + bw) / 2 + pt };\r\n\r\n\t\t\tlet cpr = { y: tt.y + (bt.y - tt.y) / 2 - ed * w, x: tt.x + 0.5 * w };\r\n\t\t\tlet cpl = { y: tb.y + (bb.y - tb.y) / 2 + ed * w, x: tb.x + 0.5 * w };\r\n\r\n\t\t\tlet qp1 = $path.lineTo(bt);\r\n\t\t\tlet qp2 = $path.lineTo(tb);\r\n\t\t\tif(ed != 0){\r\n\t\t\t\tqp1 = $path.quadraticCurveTo(bt, cpr);\r\n\t\t\t\tqp2 = $path.quadraticCurveTo(tb, cpl);\r\n\t\t\t}\r\n\r\n\t\t\tpath = $path.moveTo(tb) + $path.lineTo(tt) + qp1 + $path.lineTo(bb) + qp2;\r\n\r\n\t\t\tthis.tickPoint = { y: tb.y + (bb.y - tb.y) / 2, x: tb.x + (bb.x - tb.x) / 2 };\r\n\t\t}\r\n\r\n\t\tthis.slice.path = path;\r\n\t\tthis.invalidateLayout();\r\n\t}\r\n\r\n\r\n\tgetPoint(locationX:number, locationY:number):IPoint{\r\n\r\n\t\tlet pt = this.pixelPaddingTop;\r\n\t\tlet pb = this.pixelPaddingBottom;\r\n\t\tlet pr = this.pixelPaddingRight;\r\n\t\tlet pl = this.pixelPaddingLeft;\r\n\r\n\t\tlet w = this.pixelWidth - pr - pl;\r\n\t\tlet h = this.pixelHeight - pt - pb;\r\n\r\n\t\tif (this.orientation == \"vertical\") {\r\n\t\t\tlet tw = $utils.relativeToValue(this.topWidth, w);\r\n\t\t\tlet bw = $utils.relativeToValue(this.bottomWidth, w);\r\n\r\n\t\t\tlet tl = { x: (w - tw) / 2 + pl, y: pt };\r\n\t\t\tlet tr = { x: (w + tw) / 2 + pl, y: pt };\r\n\r\n\t\t\tlet br = { x: (w + bw) / 2 + pl, y: pt + h };\r\n\t\t\tlet bl = { x: (w - bw) / 2 + pl, y: pt + h };\r\n\r\n\t\t\tlet mlx = tl.x + (bl.x - tl.x) * locationY;\r\n\t\t\tlet mrx = tr.x + (br.x - tr.x) * locationY;\r\n\r\n\t\t\treturn { x: mlx + (mrx - mlx) * locationX, y: tr.y + (br.y - tr.y) * locationY };\r\n\t\t}\r\n\t\telse {\r\n\t\t\tlet tw = $utils.relativeToValue(this.topWidth, h);\r\n\t\t\tlet bw = $utils.relativeToValue(this.bottomWidth, h);\r\n\r\n\t\t\tlet tt = { x: pl, y: (h - tw) / 2 + pt };\r\n\t\t\tlet tb = { x: pl, y: (h + tw) / 2 + pt };\r\n\r\n\t\t\tlet bt = { x: pl + w, y: (h - bw) / 2 + pt };\r\n\t\t\tlet bb = { x: pl + w, y: (h + bw) / 2 + pt };\r\n\r\n\t\t\tlet mty = tt.y + (bt.y - tt.y) * locationX;\r\n\t\t\tlet mby = tb.y + (bb.y - tb.y) * locationX;\r\n\r\n\t\t\treturn { y: mty + (mby - mty) * locationY, x: tt.x + (bt.x - tt.x) * locationX };\r\n\t\t}\r\n\r\n\t}\r\n\r\n\r\n\t/**\r\n\t * Bottom width in pixels or percent.\r\n\t *\r\n\t * IMPORTANT: this setting might be used to set dimensions if you use slice\r\n\t * as a standalone element. If it's a part of [[FunnelSeries]] this setting\r\n\t * becomes read-only as it will be automatically reset by series.\r\n\t *\r\n\t * @param value Bottom width\r\n\t */\r\n\tpublic set bottomWidth(value: number | Percent) {\r\n\t\tthis.setPercentProperty(\"bottomWidth\", value, true, false, 10, false);\r\n\t}\r\n\r\n\t/**\r\n\t * @return bottom width\r\n\t */\r\n\tpublic get bottomWidth(): number | Percent {\r\n\t\treturn this.getPropertyValue(\"bottomWidth\");\r\n\t}\r\n\r\n\t/**\r\n\t * Top width in pixels or percent.\r\n\t *\r\n\t * IMPORTANT: this setting might be used to set dimensions if you use slice\r\n\t * as a standalone element. If it's a part of [[FunnelSeries]] this setting\r\n\t * becomes read-only as it will be automatically reset by series.\r\n\t *\r\n\t * @param value Top width\r\n\t */\r\n\tpublic set topWidth(value: number | Percent) {\r\n\t\tthis.setPercentProperty(\"topWidth\", value, true, false, 10, false);\r\n\t}\r\n\r\n\t/**\r\n\t * @return Top width\r\n\t */\r\n\tpublic get topWidth(): number | Percent {\r\n\t\treturn this.getPropertyValue(\"topWidth\");\r\n\t}\r\n\r\n\t/**\r\n\t * Orientation of the funnel slice: \"horizontal\" or \"vertical\".\r\n\t *\r\n\t * IMPORTANT: this setting might be used to set orintation if you use slice\r\n\t * as a standalone element. If it's a part of [[FunnelSeries]] this setting\r\n\t * becomes read-only as it will be automatically reset by series.\r\n\t *\r\n\t * @param value Orientation\r\n\t */\r\n\tpublic set orientation(value: Orientation) {\r\n\t\tthis.setPropertyValue(\"orientation\", value, true);\r\n\t}\r\n\r\n\t/**\r\n\t * @return Orientation\r\n\t */\r\n\tpublic get orientation(): Orientation {\r\n\t\treturn this.getPropertyValue(\"orientation\");\r\n\t}\r\n\r\n\t/**\r\n\t * A relative distance slice's sides should be bent to. It's relative to the\r\n\t * height of the slice.\r\n\t *\r\n\t * Zero (default) will mean the sides will be perfectly straight.\r\n\t *\r\n\t * Positive value will make them bend outwards, resulting in \"puffed\" slices.\r\n\t *\r\n\t * Negative values will make them bend inwards.\r\n\t *\r\n\t * @default 0\r\n\t * @param {number}\r\n\t */\r\n\tpublic set expandDistance(value: number) {\r\n\t\tthis.setPropertyValue(\"expandDistance\", value, true);\r\n\t}\r\n\r\n\t/**\r\n\t * @return expandDistance\r\n\t */\r\n\tpublic get expandDistance(): number {\r\n\t\treturn this.getPropertyValue(\"expandDistance\");\r\n\t}\r\n\r\n\t/**\r\n\t * Copies all parameters from another [[Sprite]].\r\n\t *\r\n\t * @param source Source Sprite\r\n\t */\r\n\tpublic copyFrom(source :this) {\r\n\t\tsuper.copyFrom(source);\r\n\t\tif (this.slice) {\r\n\t\t\tthis.slice.copyFrom(source.slice);\r\n\t\t}\r\n\t}\r\n}\r\n\r\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\r\nregistry.registeredClasses[\"FunnelSlice\"] = FunnelSlice;\r\n\n\n\n// WEBPACK FOOTER //\n// ../../../../../src/.internal/charts/elements/FunnelSlice.ts","/**\r\n * Funnel tick module.\r\n */\r\n\r\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\r\nimport { Tick, ITickProperties, ITickAdapters, ITickEvents } from \"../elements/Tick\";\r\nimport { Label } from \"../../core/elements/Label\";\r\nimport { FunnelSlice } from \"./FunnelSlice\";\r\nimport { MutableValueDisposer, MultiDisposer } from \"../../core/utils/Disposer\";\r\nimport { FunnelSeries } from \"../series/FunnelSeries\";\r\nimport { registry } from \"../../core/Registry\";\r\nimport * as $utils from \"../../core/utils/Utils\";\r\nimport { IPoint } from \"../../core/defs/IPoint\";\r\nimport * as $path from \"../../core/rendering/Path\";\r\n\r\n\r\n/**\r\n * ============================================================================\r\n * REQUISITES\r\n * ============================================================================\r\n * @hidden\r\n */\r\n\r\n/**\r\n * Defines properties for [[FunnelTick]].\r\n */\r\nexport interface IFunnelTickProperties extends ITickProperties {\r\n\tlocationX?: number;\r\n\r\n\tlocationY?: number;\r\n}\r\n\r\n/**\r\n * Defines events for [[FunnelTick]].\r\n */\r\nexport interface IFunnelTickEvents extends ITickEvents { }\r\n\r\n/**\r\n * Defines adapters for [[FunnelTick]].\r\n *\r\n * @see {@link Adapter}\r\n */\r\nexport interface IFunnelTickAdapters extends ITickAdapters, IFunnelTickProperties { }\r\n\r\n\r\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\r\n\r\n/**\r\n * Draws an tick line for a funnel slice connecting it to a related label.\r\n *\r\n * @see {@link IFunnelTickEvents} for a list of available events\r\n * @see {@link IFunnelTickAdapters} for a list of available Adapters\r\n */\r\nexport class FunnelTick extends Tick {\r\n\r\n\t/**\r\n\t * Defines available properties.\r\n\t */\r\n\tpublic _properties!: IFunnelTickProperties;\r\n\r\n\t/**\r\n\t * Defines available adapters.\r\n\t */\r\n\tpublic _adapter!: IFunnelTickAdapters;\r\n\r\n\t/**\r\n\t * Defines available events.\r\n\t */\r\n\tpublic _events!: IFunnelTickEvents;\r\n\r\n\t/**\r\n\t * A label element this tick is attached to.\r\n\t */\r\n\tprotected _label = new MutableValueDisposer