All Downloads are FREE. Search and download functionalities are using the official Maven repository.

gwt.material.design.amcharts.client.resources.js.charts.js.map Maven / Gradle / Ivy

There is a newer version: 2.8.3
Show newest version
{"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","position","position2","coordinate","positionToCoordinate","axisLength","realRadius","Infinity","positionToAngle","arc","inversed","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","get","set","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","AxisRendererY","RadarChart_RadarChartDataItem","RadarChartDataItem","XYChart","RadarChart_RadarChart","RadarChart","_axisRendererX","_axisRendererY","innerRadiusModifyer","radarContainer","plotContainer","createChild","Container","shouldClone","align","seriesContainer","parent","bulletsContainer","axisBulletsContainer","_cursorContainer","_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","innerWidth","hr","innerHeight","mr","min","max","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","events","on","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","incomingDataItems","fromNode","isDisposed","link","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","chartContainer","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","isTemplate","y0","y1","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","_levelCount","level","getNodeLevel","levels","apply","calculateValueHeight","_levelSum","_levelNodesCount","maxSum","availableHeight","maxSumLevel","minHeight","realValue","levelNodeCount","_maxSumLevel","maxSumLevelNodeCount","finalHeight","_heightAnimation","animationOptions","err","interpolationDuration","states","transitionDuration","Animation","from","interpolationEasing","container","nextCoordinate","delta","levelCoordinate","nodeCount","showReal","preventShow","container_1","i_1","delay","sequencedInterpolationDelay","isFinished","nodeHeight","_valueHeight","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","hasChildren","getDuration","childValue","workingValue","_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","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","linkHeight","getLastLabel","lastLabel","lastY","lastX","_sliceLinks","startIndex","endIndex","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","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,EAAA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AAKY,MAAM6M,sBAGrD/F,EAAA,sBAA6B3B,EAAa/F,KAAKwmC,kBAAoB,mCASjED,EAAA7lC,UAAAmoC,SAAV,SAAmBrmC,GAElB,OAAOA,GAET+jC,EA9dA,CAAiCuC,GAAA,GAsejC/jC,EAAA,EAASC,kBAA+B,YAAIshC,GCtjB5CyC,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 { 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\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\treturn this.getPropertyValue(\"innerRadius\");\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\treturn { x: realRadius * $math.cos(angle), y: realRadius * $math.sin(angle) };\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 * 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 = endAngle - startAngle;\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\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.pixelRadius, true);\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 * 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\treturn this.getPropertyValue(\"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\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: RadarChart) {\r\n\t\tthis._chart.set(chart, 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}\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\r\n\t\tif ($type.isNumber(radius) && grid.element) {\r\n\t\t\tlet chart = this.chart;\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;\t\t\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\t\t\r\n\t\tlet point: IPoint = this.positionToPoint(position);\r\n\t\t\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\t\t\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\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 * 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._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\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\t\t\tinnerRadius = percent(value * 100);\r\n\t\t}\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\taxis.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\taxis.renderer.innerRadius = innerRadius;\r\n\t\t});\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 * 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}\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}\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})\r\n\r\n\t\tthis.incomingDataItems.each(function(dataItem) {\r\n\t\t\tdataItem.setWorkingValue(\"value\", 0, duration);\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 } 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\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\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 (!$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\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\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\t//@todo solve circular so\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\tlevels.push(this.getNodeLevel(link.fromNode, level + 1));\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\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 (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 (!$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\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\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\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\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}\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\tdataItem.column.__disabled = false;\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 = {};\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\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\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 wont' 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\tpartition(0, n, parent.value, parent.x0, parent.y0, parent.x1, parent.y1);\r\n\r\n\t\tfunction partition(i: number, j: number, value: number, x0: number, y0: number, x1: number, y1: number) {\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 ((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\treturn this.getLegendLevel(dataItem.children.getIndex(0));\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\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\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\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 { Sprite } from \"../../core/Sprite\";\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 * Segment's line element.\r\n\t *\r\n\t * @ignore Exclude from docs\r\n\t */\r\n\tpublic strokeSprite: Sprite;\r\n\r\n\t/**\r\n\t * Segment's fill element.\r\n\t *\r\n\t * @ignore Exclude from docs\r\n\t */\r\n\tpublic fillSprite: Sprite;\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}\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 { 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\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}\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.forceCopyProperties(this.columns.template, radarColumn, visualProperties);\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\r\n\t\tif (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\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));\t\t\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}\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 = \"\";\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 = \"\"\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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy