{"version":3,"sources":["webpack:///../../../../../src/.internal/plugins/forceDirected/ForceDirectedLink.ts","webpack:///../../../../../src/.internal/plugins/forceDirected/ForceDirectedNode.ts","webpack:///../../../../../src/.internal/plugins/forceDirected/ForceDirectedSeries.ts","webpack:///../../../../../src/.internal/plugins/forceDirected/ForceDirectedTree.ts","webpack:///./plugins/forceDirected.js"],"names":["ForceDirectedLink_ForceDirectedLink","_super","ForceDirectedLink","_this","call","this","className","interfaceColors","InterfaceColorSet","fillOpacity","strokeOpacity","stroke","getFor","isMeasured","nonScalingStroke","interactionsEnabled","distance","strength","applyTheme","Object","tslib_es6","prototype","validate","source","target","path","Path","x","pixelX","y","pixelY","isHidden","isHiding","hide","show","defineProperty","_source","value","_disposers","push","events","on","invalidate","_target","_adapterO","isEnabled","apply","properties","setPropertyValue","getTooltipX","getPropertyValue","Percent","x1","getTooltipY","y1","Sprite","Registry","registeredClasses","ForceDirectedNode_ForceDirectedNode","ForceDirectedNode","applyOnClones","togglable","draggable","setStateOnChildren","isActive","expandAll","paddingRadius","linksWith","Dictionary","dataItem","component","nodeDragStarted","updateSimulation","outerCircle","createChild","Circle","shouldClone","strokeWidth","bgColor","fill","states","create","scale","outerActiveState","visible","circle","hiddenState","radius","addDisposer","updateLabelSize","label","Label","horizontalCenter","verticalCenter","textAlign","textValign","nonScaling","adapter","add","pixelRadius","text","dsRadius","defaultState","Type","parent","width","height","copyFrom","setActive","children","dataItemsInvalid","childrenInited","initNode","updateNodeList","each","child","node","parentLink","dispatchVisibility","restartSimulation","linkWith","link","getKey","uid","links","zIndex","nodeIndex","nodes","indexOf","childIndex","childLinks","setKey","forceLinks","unlinkWith","removeKey","Container","ForceDirectedSeries_ForceDirectedSeriesDataItem","ForceDirectedSeriesDataItem","hasChildren","List","duration","delay","fields","_visible","event_1","type","dispatchImmediately","toValue","event_2","values","setValue","_node","component_1","node_1","Disposer","removeValue","addSprite","itemsFocusable","role","focusable","once","ev","readerTitle","populateString","itemReaderText","undefined","hoverable","level","color","colors","getIndex","step","index","setProperty","hiddenInLegend","collapsed","fixed","handleFixed","createLegendMarker","marker","_legendDataItem","valueLabel","Series","ForceDirectedSeries_ForceDirectedSeries","ForceDirectedSeries","_tick","d3forceSimulation","src","maxRadius","minRadius","ColorSet","manyBodyStrength","centerStrength","showOnTick","baseValue","updateRadiuses","dataItems","updateLinksAndNodes","w","utils_Math","innerWidth","h","innerHeight","force","alpha","restart","getMaxValue","max","cmax","getMinValue","min","cmin","validateDataItems","chart","__disabled","_dataDisposers","_maxValue","_minValue","reset","Math","length","angle","xField","propertyFields","yField","dataContext","dataFields","processLinkWith","i","alphaDecay","pow","feedLegend","fx","Utils","fy","dragFixedNodes","di","_linkForce","_collisionForce","opacity","linkDatum","getDistance","getStrength","disabled","nodeDragEnded","alphaTarget","updateRadius","minSide","cursorOverStyle","Mouse","pointer","default","maxLevels","index_1","next","diColor","utils_Array","id","dataItemToConnect","getDataItemById","linkWithStrength","createDataItem","_nodes","createNode","_links","createLink","velocityDecay","RoundedRectangle","cornerRadius","legendDataItem","colorOrig","property","ForceDirectedTree_ForceDirectedTreeDataItem","ForceDirectedTreeDataItem","SerialChart","ForceDirectedTree_ForceDirectedTree","ForceDirectedTree","zoomDuration","zoomEasing","Ease","minZoomLevel","maxZoomLevel","seriesContainer","layout","mouseWheelBehavior","zoomStep","background","Color","zoomOutButton","ZoomOutButton","valign","Number","MAX_SAFE_INTEGER","marginTop","marginRight","dx","interaction","Interaction","body","event","zoomable","svgPoint","point","htmlContainer","svgContainer","dragStart","dragStop","createSeries","legend","legendData_1","series","legendSettings","labelText","labels","template","itemLabelText","valueText","valueLabels","itemValueText","data","name","applyInternalDefaults","language","translate","getExporting","exporting","info","format","handleWheel","zoomLevel","shift","zoomToPoint","center","container","maxWidth","maxHeight","animate","to","zoomToDataItem","zoomOut","pixelWidth","pixelHeight","resizable","dragWhileResize","_backgroundZoomoutDisposer","dispose","_mouseWheelDisposer","chartContainer","wheelable","_zoomOutButton","button","window","am4plugins_for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,SAAyBC,GAAzB,IAAA3V,EAAAE,KACCA,KAAKwV,eAAiBC,EAClBA,GACHA,EAAOtT,OAAOC,GAAG,MAAO,WACvBtC,EAAKgV,gBACH9K,GAAW,oCAUjB+G,EAjcA,CAAuCF,EAAA,GAycvC1N,EAAA,EAASC,kBAAqC,kBAAI0N,EAClD3N,EAAA,EAASC,kBAA6C,0BAAIuN,EClkB1D+E,OAAAC,yBAAkCC","file":"./plugins/forceDirected.js","sourcesContent":["/**\r\n * ForceDirectedLink module.\r\n */\r\n\r\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\r\nimport { Sprite, ISpriteProperties, ISpriteAdapters, ISpriteEvents } from \"../../core/Sprite\";\r\nimport { registry } from \"../../core/Registry\";\r\nimport { InterfaceColorSet } from \"../../core/utils/InterfaceColorSet\";\r\nimport { ForceDirectedNode } from \"./ForceDirectedNode\";\r\nimport * as $path from \"../../core/rendering/Path\";\r\nimport { percent, 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 [[ForceDirectedLink]].\r\n */\r\nexport interface IForceDirectedLinkProperties extends ISpriteProperties {\r\n\r\n\t/**\r\n\t * Distance between centers of source and target nodes.\r\n\t */\r\n\tdistance?: number;\r\n\r\n\t/**\r\n\t * Strength of the \"traction\" between source and target nodes.\r\n\t */\r\n\tstrength?: number;\r\n\r\n}\r\n\r\n/**\r\n * Defines events for [[ForceDirectedLink]].\r\n */\r\nexport interface IForceDirectedLinkEvents extends ISpriteEvents { }\r\n\r\n/**\r\n * Defines adapters for [[ForceDirectedLink]].\r\n *\r\n * @see {@link Adapter}\r\n */\r\nexport interface IForceDirectedLinkAdapters extends ISpriteAdapters, IForceDirectedLinkProperties { }\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 class that builds links between [[ForceDirectedNode]] elements.\r\n *\r\n * @see {@link IForceDirectedLinkEvents} for a list of available events\r\n * @see {@link IForceDirectedLinkAdapters} for a list of available Adapters\r\n * @since 4.3.8\r\n * @important\r\n */\r\nexport class ForceDirectedLink extends Sprite {\r\n\r\n\t/**\r\n\t * Defines available properties.\r\n\t */\r\n\tpublic _properties!: IForceDirectedLinkProperties;\r\n\r\n\t/**\r\n\t * Defines available adapters.\r\n\t */\r\n\tpublic _adapter!: IForceDirectedLinkAdapters;\r\n\r\n\t/**\r\n\t * Defines available events.\r\n\t */\r\n\tpublic _events!: IForceDirectedLinkEvents;\r\n\r\n\t/**\r\n\t * Link source node\r\n\t */\r\n\tprotected _source: ForceDirectedNode;\r\n\r\n\t/**\r\n\t * Link parent node\r\n\t */\r\n\tprotected _target: ForceDirectedNode;\r\n\r\n\t/**\r\n\t * Constructor\r\n\t */\r\n\tconstructor() {\r\n\t\tsuper();\r\n\t\tthis.className = \"ForceDirectedLink\";\r\n\r\n\t\tlet interfaceColors = new InterfaceColorSet();\r\n\r\n\t\tthis.fillOpacity = 0;\r\n\t\tthis.strokeOpacity = 0.5;\r\n\t\tthis.stroke = interfaceColors.getFor(\"grid\");\r\n\t\tthis.isMeasured = false;\r\n\t\tthis.nonScalingStroke = true;\r\n\r\n\t\tthis.interactionsEnabled = false;\r\n\r\n\t\tthis.distance = 1.5;\r\n\t\tthis.strength = 1;\r\n\r\n\t\tthis.applyTheme();\r\n\t}\r\n\r\n\t/**\r\n\t * Validates element:\r\n\t * * Triggers events\r\n\t * * Redraws the element\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 source = this.source;\r\n\t\tlet target = this.target;\r\n\t\tif (source && target) {\r\n\t\t\tthis.path = $path.moveTo({ x: source.pixelX, y: source.pixelY }) + $path.lineTo({ x: target.pixelX, y: target.pixelY });\r\n\r\n\t\t\tif (source.isHidden || target.isHidden || source.isHiding || target.isHiding) {\r\n\t\t\t\tthis.hide();\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tthis.show();\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t}\r\n\r\n\t/**\r\n\t * Source node - a node link starts from.\r\n\t * \r\n\t * @param value Source node\r\n\t */\r\n\tpublic set source(value: ForceDirectedNode) {\r\n\t\tif (value) {\r\n\t\t\tthis._source = value;\r\n\t\t\tthis._disposers.push(value.events.on(\"positionchanged\", this.invalidate, this, false));\r\n\t\t\tthis._disposers.push(value.events.on(\"validated\", this.invalidate, this, false));\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * @return Source node\r\n\t */\r\n\tpublic get source(): ForceDirectedNode {\r\n\t\treturn this._source;\r\n\t}\r\n\r\n\t/**\r\n\t * Target node - a node link ends at.\r\n\t * \r\n\t * @param value Target node\r\n\t */\r\n\tpublic set target(value: ForceDirectedNode) {\r\n\t\tif (value) {\r\n\t\t\tthis._target = value;\r\n\t\t\tthis._disposers.push(value.events.on(\"positionchanged\", this.invalidate, this, false));\r\n\t\t\tthis._disposers.push(value.events.on(\"validated\", this.invalidate, this, false));\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * @return Target node\r\n\t */\r\n\tpublic get target(): ForceDirectedNode {\r\n\t\treturn this._target;\r\n\t}\r\n\r\n\t/**\r\n\t * Distance between centers of source and target nodes.\r\n\t *\r\n\t * This is relative to the radii to sum of both source and target nodes.\r\n\t *\r\n\t * E.g. if this would be set to `1` both nodes would be touching each other.\r\n\t *\r\n\t * @default 1.5\r\n\t * @param value Distance\r\n\t */\r\n\tpublic set distance(value: number) {\r\n\t\tthis.setPropertyValue(\"distance\", value);\r\n\t}\r\n\r\n\t/**\r\n\t * @return Distance\r\n\t */\r\n\tpublic get distance(): number {\r\n\t\tif (this._adapterO) {\r\n\t\t\tif (this._adapterO.isEnabled(\"distance\")) {\r\n\t\t\t\treturn this._adapterO.apply(\"distance\", this.properties.distance);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn this.properties.distance;\r\n\t}\r\n\r\n\t/**\r\n\t * Relative \"strength\" of the traction between linked nodes.\r\n\t *\r\n\t * Available values: 0 to XX.\r\n\t *\r\n\t * The bigger the number, the more rigid the link and the less it will\r\n\t * stretch when node is dragged.\r\n\t *\r\n\t * Carefully with very big numbers: nodes and links might start behaving\r\n\t * quite \"nerviously\".\r\n\t *\r\n\t * @default 1\r\n\t * @param value Strength\r\n\t */\r\n\tpublic set strength(value: number) {\r\n\t\tthis.setPropertyValue(\"strength\", value);\r\n\t}\r\n\r\n\t/**\r\n\t * @return Strength\r\n\t */\r\n\tpublic get strength(): number {\r\n\t\tif (this._adapterO) {\r\n\t\t\tif (this._adapterO.isEnabled(\"strength\")) {\r\n\t\t\t\treturn this._adapterO.apply(\"strength\", this.properties.strength);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn this.properties.strength;\r\n\t}\r\n\r\n\t/**\r\n\t * X coordinate for the slice tooltip.\r\n\t *\r\n\t * @ignore\r\n\t * @return X\r\n\t */\r\n\tpublic getTooltipX(): number {\r\n\t\tlet x = this.getPropertyValue(\"tooltipX\");\r\n\t\tif (!(x instanceof Percent)) {\r\n\t\t\tx = percent(50);\r\n\t\t}\r\n\t\tif (x instanceof Percent) {\r\n\t\t\tlet source = this.source;\r\n\t\t\tlet target = this.target;\r\n\t\t\tif (source && target) {\r\n\t\t\t\tlet x1 = source.pixelX;\r\n\t\t\t\tlet x2 = target.pixelX;\r\n\t\t\t\treturn x1 + (x2 - x1) * x.value;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn 0;\r\n\t}\r\n\r\n\t/**\r\n\t * Y coordinate for the slice tooltip.\r\n\t *\r\n\t * @ignore\r\n\t * @return Y\r\n\t */\r\n\tpublic getTooltipY(): number {\r\n\t\tlet y = this.getPropertyValue(\"tooltipY\");\r\n\t\tif (!(y instanceof Percent)) {\r\n\t\t\ty = percent(50);\r\n\t\t}\r\n\t\tif (y instanceof Percent) {\r\n\t\t\tlet source = this.source;\r\n\t\t\tlet target = this.target;\r\n\t\t\tif (source && target) {\r\n\t\t\t\tlet y1 = source.pixelY;\r\n\t\t\t\tlet y2 = target.pixelY;\r\n\t\t\t\treturn y1 + (y2 - y1) * y.value;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn 0;\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[\"ForceDirectedLink\"] = ForceDirectedLink;\r\n\n\n\n// WEBPACK FOOTER //\n// ../../../../../src/.internal/plugins/forceDirected/ForceDirectedLink.ts","/**\r\n * Module that defines everything related to building ForceDirectedNodes.\r\n * \r\n * It is a container which has ForceDirectedNode element which is a RoundedRectangle.\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 { registry } from \"../../core/Registry\";\r\nimport { Circle } from \"../../core/elements/Circle\";\r\nimport { Label } from \"../../core/elements/Label\";\r\nimport { ForceDirectedSeriesDataItem } from \"./ForceDirectedSeries\";\r\nimport { ForceDirectedLink } from \"./ForceDirectedLink\";\r\nimport { InterfaceColorSet } from \"../../core/utils/InterfaceColorSet\";\r\nimport * as $type from \"../../core/utils/Type\";\r\nimport { Dictionary, DictionaryDisposer } from \"../../core/utils/Dictionary\";\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 [[ForceDirectedNode]].\r\n */\r\nexport interface IForceDirectedNodeProperties extends IContainerProperties {\r\n\r\n\t/**\r\n\t * If set to `true` (default) toggling a node on will automatically expand\r\n\t * all nodes across the whole tree (all levels) of its descendants.\r\n\t *\r\n\t * Setting to `false` will only expand immediate children (one level).\r\n\t */\r\n\texpandAll?: boolean;\r\n\r\n\t/**\r\n\t * Padding of the nodes, in pixels.\r\n\t */\r\n\tpaddingRadius?: number;\r\n}\r\n\r\n/**\r\n * Defines events for [[ForceDirectedNode]].\r\n */\r\nexport interface IForceDirectedNodeEvents extends IContainerEvents { }\r\n\r\n/**\r\n * Defines adapters for [[ForceDirectedNode]].\r\n *\r\n * @see {@link Adapter}\r\n */\r\nexport interface IForceDirectedNodeAdapters extends IContainerAdapters, IForceDirectedNodeProperties { }\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 [[ForceDirectedNode]] elements (circles).\r\n *\r\n * @see {@link IForceDirectedNodeEvents} for a list of available events\r\n * @see {@link IForceDirectedNodeAdapters} for a list of available Adapters\r\n * @since 4.3.8\r\n * @important\r\n */\r\nexport class ForceDirectedNode extends Container {\r\n\r\n\t/**\r\n\t * Defines available properties.\r\n\t */\r\n\tpublic _properties!: IForceDirectedNodeProperties;\r\n\r\n\t/**\r\n\t * Defines available adapters.\r\n\t */\r\n\tpublic _adapter!: IForceDirectedNodeAdapters;\r\n\r\n\t/**\r\n\t * Defines available events.\r\n\t */\r\n\tpublic _events!: IForceDirectedNodeEvents;\r\n\r\n\t/**\r\n\t * A node's [[Circle]] element.\r\n\t */\r\n\tpublic circle: Circle;\r\n\r\n\t/**\r\n\t * A [[Circle]] element for node's outline. This outline is used on nodes\r\n\t * that have children.\r\n\t */\r\n\tpublic outerCircle: Circle;\r\n\r\n\t/**\r\n\t * Related data item.\r\n\t */\r\n\tpublic _dataItem: ForceDirectedSeriesDataItem;\r\n\r\n\t/**\r\n\t * Node's [[Label]] element.\r\n\t */\r\n\tpublic label: Label;\r\n\r\n\t/**\r\n\t * A list of other [[ForceDirectedNode]] elements this node is linked with\r\n\t * using `linkWith`.\r\n\t *\r\n\t * @since 4.4.8\r\n\t */\r\n\tpublic linksWith: Dictionary;\r\n\r\n\t/**\r\n\t * Constructor\r\n\t */\r\n\tconstructor() {\r\n\t\tsuper();\r\n\t\tthis.className = \"ForceDirectedNode\";\r\n\r\n\t\t//this.isMeasured = true; // for correct position of the tooltip\r\n\t\tthis.applyOnClones = true;\r\n\t\tthis.togglable = true;\r\n\t\tthis.draggable = true;\r\n\t\tthis.setStateOnChildren = true;\r\n\r\n\t\tthis.isActive = false;\r\n\t\tthis.expandAll = true;\r\n\t\tthis.paddingRadius = 0;\r\n\r\n\t\tthis.linksWith = new Dictionary()\r\n\t\tthis._disposers.push(new DictionaryDisposer(this.linksWith));\r\n\r\n\t\tthis.events.on(\"dragstart\", () => {\r\n\t\t\tif (this.dataItem.component) {\r\n\t\t\t\tthis.dataItem.component.nodeDragStarted();\r\n\t\t\t}\r\n\t\t}, this, false);\r\n\r\n\t\tthis.events.on(\"drag\", () => {\r\n\t\t\tthis.updateSimulation();\r\n\t\t}, this, false);\r\n\r\n\t\tlet outerCircle = this.createChild(Circle);\r\n\t\touterCircle.shouldClone = false;\r\n\t\touterCircle.strokeWidth = 2;\r\n\t\touterCircle.nonScalingStroke = true;\r\n\r\n\t\tlet bgColor = new InterfaceColorSet().getFor(\"background\");\r\n\t\touterCircle.fill = bgColor;\r\n\t\tthis.outerCircle = outerCircle;\r\n\r\n\t\tlet hoverState = outerCircle.states.create(\"hover\");\r\n\t\thoverState.properties.scale = 1.1;\r\n\r\n\t\tlet outerActiveState = outerCircle.states.create(\"active\");\r\n\t\touterActiveState.properties.scale = 1.1;\r\n\t\touterActiveState.properties.visible = true;\r\n\r\n\t\tlet activeHoverState = outerCircle.states.create(\"hoverActive\");\r\n\t\tactiveHoverState.properties.scale = 1;\r\n\r\n\t\tlet circle = this.createChild(Circle);\r\n\r\n\t\tlet activeState = circle.states.create(\"active\");\r\n\t\tactiveState.properties.visible = true;\r\n\r\n\t\tcircle.shouldClone = false;\r\n\t\tcircle.interactionsEnabled = false;\r\n\t\tcircle.hiddenState.properties.radius = 0.01;\r\n\t\tcircle.events.on(\"validated\", this.updateSimulation, this, false)\r\n\t\tcircle.hiddenState.properties.visible = true;\r\n\r\n\r\n\t\tthis.circle = circle;\r\n\r\n\t\tthis.addDisposer(circle.events.on(\"validated\", this.updateLabelSize, this, false));\r\n\r\n\t\tthis._disposers.push(this.circle);\r\n\r\n\t\tlet label = this.createChild(Label);\r\n\t\tlabel.shouldClone = false;\r\n\t\tlabel.horizontalCenter = \"middle\";\r\n\t\tlabel.verticalCenter = \"middle\";\r\n\t\tlabel.fill = bgColor;\r\n\t\tlabel.strokeOpacity = 0;\r\n\t\tlabel.interactionsEnabled = false;\r\n\t\tlabel.textAlign = \"middle\";\r\n\t\tlabel.textValign = \"middle\";\r\n\t\tlabel.nonScaling = true;\r\n\t\tthis.label = label;\r\n\r\n\t\tthis.adapter.add(\"tooltipY\", (y, target) => {\r\n\t\t\treturn -target.circle.pixelRadius;\r\n\t\t})\r\n\t}\r\n\r\n\t/**\r\n\t * @ignore\r\n\t */\r\n\tpublic updateLabelSize() {\r\n\t\tif (this.label.text) {\r\n\t\t\tlet circle = this.circle;\r\n\t\t\tlet radius = circle.pixelRadius;\r\n\r\n\t\t\tlet ds = circle.defaultState;\r\n\t\t\tlet dsRadius = ds.properties.radius\r\n\t\t\tif ($type.isNumber(dsRadius)) {\r\n\t\t\t\tradius = dsRadius;\r\n\t\t\t}\r\n\r\n\t\t\tlet scale = 1;\r\n\r\n\t\t\tif (this.parent && this.parent.parent) {\r\n\t\t\t\tscale = this.parent.parent.scale;\r\n\t\t\t}\r\n\r\n\t\t\tthis.label.width = 2 * radius * scale;\r\n\t\t\tthis.label.height = 2 * radius * scale;\r\n\t\t}\r\n\t}\r\n\r\n\r\n\t/**\r\n\t * Copies all parameters from another [[ForceDirectedNode]].\r\n\t *\r\n\t * @param source Source ForceDirectedNode\r\n\t */\r\n\tpublic copyFrom(source: this) {\r\n\t\tsuper.copyFrom(source);\r\n\t\tif (this.circle) {\r\n\t\t\tthis.circle.copyFrom(source.circle);\r\n\t\t}\r\n\t\tif (this.label) {\r\n\t\t\tthis.label.copyFrom(source.label);\r\n\t\t}\r\n\t\tif (this.outerCircle) {\r\n\t\t\tthis.outerCircle.copyFrom(source.outerCircle);\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Sets node as \"active\" (expanded).\r\n\t * \r\n\t * @ignore\r\n\t * @param value Active or not?\r\n\t */\r\n\tpublic setActive(value: boolean) {\r\n\t\tsuper.setActive(value);\r\n\r\n\t\tlet dataItem = this.dataItem;\r\n\r\n\t\tif (dataItem) {\r\n\r\n\r\n\t\t\tlet children = dataItem.children;\r\n\t\t\tlet component = dataItem.component;\r\n\t\t\tif (!component.dataItemsInvalid) {\r\n\t\t\t\tif (value && children && !dataItem.childrenInited) {\r\n\t\t\t\t\tcomponent.initNode(dataItem);\r\n\t\t\t\t\tcomponent.updateNodeList();\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (value) {\r\n\t\t\t\t\tthis.show();\r\n\t\t\t\t\tif (children) {\r\n\t\t\t\t\t\tchildren.each((child) => {\r\n\t\t\t\t\t\t\tchild.node.show();\r\n\t\t\t\t\t\t\tchild.node.interactionsEnabled = true;\r\n\t\t\t\t\t\t\tif (child.parentLink) {\r\n\t\t\t\t\t\t\t\tchild.parentLink.show();\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tif (this.expandAll) {\r\n\t\t\t\t\t\t\t\tchild.node.isActive = true;\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\tchild.node.isActive = false;\r\n\t\t\t\t\t\t\t\t//child.node.hide(0)\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\tdataItem.dispatchVisibility(true);\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tif (children) {\r\n\t\t\t\t\t\tchildren.each((child) => {\r\n\t\t\t\t\t\t\tif (child.parentLink) {\r\n\t\t\t\t\t\t\t\tchild.parentLink.hide();\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tchild.node.isActive = false;\r\n\t\t\t\t\t\t\tchild.node.interactionsEnabled = false;\r\n\r\n\t\t\t\t\t\t\tchild.node.hide();\r\n\t\t\t\t\t\t})\r\n\t\t\t\t\t}\r\n\t\t\t\t\tdataItem.dispatchVisibility(false);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tthis.updateSimulation();\r\n\t}\r\n\r\n\t/**\r\n\t * @ignore\r\n\t * @todo description\r\n\t */\r\n\tprotected updateSimulation() {\r\n\t\tlet dataItem = this.dataItem;\r\n\t\tif (dataItem && dataItem.component) {\r\n\t\t\tdataItem.component.restartSimulation();\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * If set to `true` (default) toggling a node on will automatically expand\r\n\t * all nodes across the whole tree (all levels) of its descendants.\r\n\t *\r\n\t * Setting to `false` will only expand immediate children (one level).\r\n\t * \r\n\t * @default true\r\n\t * @since 4.4.8\r\n\t * @param value Expand all?\r\n\t */\r\n\tpublic set expandAll(value: boolean) {\r\n\t\tthis.setPropertyValue(\"expandAll\", value);\r\n\t}\r\n\r\n\t/**\r\n\t * @return Expand all?\r\n\t */\r\n\tpublic get expandAll(): boolean {\r\n\t\treturn this.getPropertyValue(\"expandAll\");\r\n\t}\r\n\r\n\t/**\r\n\t * Creates a new link between two nodes.\r\n\t *\r\n\t * Use this method to dynamically add links without requiring to revalidate\r\n\t * whole of the data.\r\n\t * \r\n\t * @since 4.4.8\r\n\t * @param node Target node\r\n\t * @param strength Link strength\r\n\t * @return New link\r\n\t */\r\n\tpublic linkWith(node: ForceDirectedNode, strength?: number): ForceDirectedLink {\r\n\t\tlet link = this.linksWith.getKey(node.uid);\r\n\t\tif (!link) {\r\n\t\t\tlink = node.linksWith.getKey(this.uid);\r\n\t\t}\r\n\r\n\t\tif (!link) {\r\n\t\t\tlet dataItem = this.dataItem;\r\n\t\t\tlet component = dataItem.component;\r\n\t\t\tlink = component.links.create();\r\n\t\t\tlink.parent = component;\r\n\t\t\tlink.zIndex = -1;\r\n\t\t\tlink.source = this;\r\n\t\t\tlink.target = node;\r\n\t\t\tlink.stroke = dataItem.node.fill;\r\n\r\n\t\t\tlink.dataItem = node.dataItem;\r\n\r\n\t\t\tif ($type.isNumber(strength)) {\r\n\t\t\t\tlink.strength = strength;\r\n\t\t\t}\r\n\r\n\t\t\tlet nodeIndex = component.nodes.indexOf(dataItem.node);\r\n\t\t\tlet childIndex = component.nodes.indexOf(node);\r\n\r\n\t\t\tnode.dataItem.childLinks.push(link);\r\n\t\t\tnode.linksWith.setKey(this.uid, link);\t\r\n\r\n\t\t\tcomponent.forceLinks.push({ source: nodeIndex, target: childIndex });\r\n\t\t\tcomponent.updateNodeList();\r\n\r\n\t\t\tdataItem.childLinks.push(link);\r\n\r\n\t\t\tthis.linksWith.setKey(node.uid, link);\t\t\t\r\n\t\t}\r\n\t\treturn link;\r\n\t}\r\n\r\n\t/**\r\n\t * Removes a link between two nodes.\r\n\t * \r\n\t * @since 4.4.8\r\n\t * @param node Target node\r\n\t */\r\n\tpublic unlinkWith(node: ForceDirectedNode) {\r\n\t\tthis.linksWith.removeKey(node.uid);\r\n\t}\r\n\r\n\t/**\r\n\t * Padding of the nodes, in pixels.\r\n\t * \r\n\t * @since 4.6.7\r\n\t * @default 0\r\n\t * @param value padding radius\r\n\t */\r\n\tpublic set paddingRadius(value: number) {\r\n\t\tthis.setPropertyValue(\"paddingRadius\", value);\r\n\t}\r\n\r\n\t/** \r\n\t * @return Padding radius\r\n\t */\r\n\tpublic get paddingRadius(): number {\r\n\t\treturn this.getPropertyValue(\"paddingRadius\");\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[\"ForceDirectedNode\"] = ForceDirectedNode;\n\n\n// WEBPACK FOOTER //\n// ../../../../../src/.internal/plugins/forceDirected/ForceDirectedNode.ts","/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\r\n\r\nimport { Series, SeriesDataItem, ISeriesDataFields, ISeriesProperties, ISeriesAdapters, ISeriesEvents } from \"../../charts/series/Series\";\r\nimport { ForceDirectedTree, ForceDirectedTreeDataItem } from \"./ForceDirectedTree\";\r\nimport { registry } from \"../../core/Registry\";\r\nimport { ListTemplate, ListDisposer, List } from \"../../core/utils/List\";\r\nimport { ForceDirectedNode } from \"./ForceDirectedNode\";\r\nimport { Disposer } from \"../../core/utils/Disposer\";\r\nimport { ForceDirectedLink } from \"./ForceDirectedLink\";\r\nimport { ColorSet } from \"../../core/utils/ColorSet\";\r\nimport * as d3force from \"d3-force\";\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 * as $array from \"../../core/utils/Array\";\r\nimport { Percent, percent } from \"../../core/utils/Percent\";\r\nimport { Color } from \"../../core/utils/Color\";\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 { MouseCursorStyle } from \"../../core/interaction/Mouse\";\r\nimport { OrderedListTemplate } from \"../../core/utils/SortedList\";\r\nimport { Container } from \"../../core/Container\";\r\nimport { LegendDataItem } from \"../../charts/Legend\";\r\nimport { RoundedRectangle } from \"../../core/elements/RoundedRectangle\";\r\nimport { Animation } from \"../../core/utils/Animation\";\r\nimport { AMEvent } from \"../../core/utils/EventDispatcher\";\r\nimport { IDataItemEvents } from \"../../core/DataItem\";\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 [[ForceDirectedSeries]].\r\n *\r\n * @see {@link DataItem}\r\n * @since 4.3.8\r\n */\r\nexport class ForceDirectedSeriesDataItem extends SeriesDataItem {\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!: ForceDirectedSeries;\r\n\r\n\t/**\r\n\t * A reference to a component of a data item.\r\n\t */\r\n\tpublic component: ForceDirectedSeries;\r\n\r\n\t/**\r\n\t * A type of node used for this series.\r\n\t */\r\n\tpublic _node: ForceDirectedNode;\r\n\r\n\t/**\r\n\t * A list of [[ForceDirectedLink]] elements of links to node's children.\r\n\t *\r\n\t * This list does not include a link to node's parent, which is available\r\n\t * through `parentLink`.\r\n\t */\r\n\tpublic childLinks: List;\r\n\r\n\t/**\r\n\t * A [[ForceDirectedLink]] to node's parent.\r\n\t */\r\n\tpublic parentLink: ForceDirectedLink;\r\n\r\n\t/**\r\n\t * A Legend's data item.\r\n\t */\r\n\tprotected _legendDataItem: LegendDataItem;\r\n\r\n\t/**\r\n\t * Have all children already been initialized?\r\n\t */\r\n\tpublic childrenInited: boolean = false;\r\n\r\n\t/**\r\n\t * Constructor\r\n\t */\r\n\tconstructor() {\r\n\t\tsuper();\r\n\t\tthis.className = \"ForceDirectedSeriesDataItem\";\r\n\r\n\t\tthis.hasChildren.children = true;\r\n\r\n\t\tthis.childLinks = new List();\r\n\r\n\t\tthis.applyTheme();\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._visible = true;\r\n\r\n\t\tif (this.node) {\r\n\t\t\tthis.node.isActive = true;\r\n\t\t}\r\n\t\treturn;\r\n\t}\r\n\r\n\t/**\r\n\t * @ignore\r\n\t */\r\n\tpublic dispatchVisibility(visible: boolean) {\r\n\t\tif (this.events.isEnabled(\"visibilitychanged\")) {\r\n\t\t\tconst event: AMEvent[\"visibilitychanged\"] = {\r\n\t\t\t\ttype: \"visibilitychanged\",\r\n\t\t\t\ttarget: this,\r\n\t\t\t\tvisible: visible\r\n\t\t\t};\r\n\r\n\t\t\tthis.events.dispatchImmediately(\"visibilitychanged\", event);\r\n\t\t}\r\n\t}\r\n\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._visible = false;\r\n\r\n\t\tif (this.events.isEnabled(\"visibilitychanged\")) {\r\n\t\t\tconst event: AMEvent[\"visibilitychanged\"] = {\r\n\t\t\t\ttype: \"visibilitychanged\",\r\n\t\t\t\ttarget: this,\r\n\t\t\t\tvisible: false\r\n\t\t\t};\r\n\r\n\t\t\tthis.events.dispatchImmediately(\"visibilitychanged\", event);\r\n\t\t}\r\n\r\n\t\tif (this.node) {\r\n\t\t\tthis.node.isActive = false;\r\n\t\t}\r\n\t\treturn;\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 = this.values.value.value;\r\n\r\n\t\tif (!$type.isNumber(value)) {\r\n\t\t\tif (this.children) {\r\n\t\t\t\tvalue = 0;\r\n\t\t\t\tthis.children.each((child) => {\r\n\t\t\t\t\tvalue += child.value;\r\n\t\t\t\t})\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn value;\r\n\t}\r\n\r\n\t/**\r\n\t * An element, related to this data item. (node)\r\n\t *\r\n\t * @readonly\r\n\t * @return node element\r\n\t */\r\n\tpublic get node(): ForceDirectedNode {\r\n\t\tif (!this._node) {\r\n\r\n\t\t\tlet component = this.component;\r\n\r\n\t\t\tlet node = component.nodes.create();\r\n\t\t\tnode.draggable = true;\r\n\t\t\tthis._node = node;\r\n\r\n\t\t\tthis._disposers.push(node);\r\n\r\n\t\t\tthis._disposers.push(new Disposer(() => {\r\n\t\t\t\tcomponent.nodes.removeValue(node);\r\n\t\t\t}));\r\n\r\n\t\t\tthis.addSprite(node);\r\n\t\t\tnode.visible = this.visible;\r\n\t\t\tnode.hiddenState.properties.visible = true;\r\n\r\n\t\t\t// Apply accessibility\r\n\t\t\tif (component.itemsFocusable()) {\r\n\t\t\t\tthis.component.role = \"menu\";\r\n\t\t\t\tnode.role = \"menuitem\";\r\n\t\t\t\tnode.focusable = true;\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tthis.component.role = \"list\";\r\n\t\t\t\tnode.role = \"listitem\";\r\n\t\t\t\tnode.focusable = false;\r\n\t\t\t}\r\n\r\n\t\t\t// Apply screen reader label\r\n\t\t\tif (node.focusable) {\r\n\t\t\t\tnode.events.once(\"focus\", (ev) => {\r\n\t\t\t\t\tnode.readerTitle = component.populateString(component.itemReaderText, this);\r\n\t\t\t\t}, undefined, false);\r\n\t\t\t\tnode.events.once(\"blur\", (ev) => {\r\n\t\t\t\t\tnode.readerTitle = \"\";\r\n\t\t\t\t}, undefined, false);\r\n\t\t\t}\r\n\t\t\tif (node.hoverable) {\r\n\t\t\t\tnode.events.once(\"over\", (ev) => {\r\n\t\t\t\t\tnode.readerTitle = component.populateString(component.itemReaderText, this);\r\n\t\t\t\t}, undefined, false);\r\n\t\t\t\tnode.events.once(\"out\", (ev) => {\r\n\t\t\t\t\tnode.readerTitle = \"\";\r\n\t\t\t\t}, undefined, false);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn this._node;\r\n\t}\r\n\r\n\t/**\r\n\t * Depth level in the series 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 * Percent value of a node.\r\n\t *\r\n\t * @since 4.9.0\r\n\t * @return Percent\r\n\t */\r\n\tpublic get percent(): number {\r\n\t\tif (this.parent) {\r\n\t\t\treturn this.value / this.parent.value * 100;\r\n\t\t}\r\n\t\treturn 100;\r\n\t}\r\n\r\n\t/**\r\n\t * Item's 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 | LinearGradient | RadialGradient | Pattern\r\n\t */\r\n\tpublic set color(value: Color | LinearGradient | RadialGradient | Pattern) {\r\n\t\tthis.setProperty(\"color\", value);\r\n\t}\r\n\r\n\t/**\r\n\t * @return Color\r\n\t */\r\n\tpublic get color(): Color | LinearGradient | RadialGradient | Pattern {\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 * An array of id's of other nodes outside of the child/parent tree to link\r\n\t * with.\r\n\t *\r\n\t * @param value Link list\r\n\t */\r\n\tpublic set linkWith(value: string[]) {\r\n\t\tthis.setProperty(\"linkWith\", value);\r\n\t}\r\n\r\n\t/**\r\n\t * @return Link list\r\n\t */\r\n\tpublic get linkWith(): string[] {\r\n\t\treturn this.properties.linkWith;\r\n\t}\r\n\r\n\t/**\r\n\t * Should dataItem (node) be hidden in legend?\r\n\t *\r\n\t * @param value Visible in legend?\r\n\t */\r\n\tpublic set hiddenInLegend(value: boolean) {\r\n\t\tthis.setProperty(\"hiddenInLegend\", value);\r\n\t}\r\n\r\n\t/**\r\n\t * @return Hidden in legend?\r\n\t */\r\n\tpublic get hiddenInLegend(): boolean {\r\n\t\treturn this.properties.hiddenInLegend;\r\n\t}\r\n\r\n\t/**\r\n\t * Indicates whether node should start off as collapsed.\r\n\t *\r\n\t * This can be used to specify whether node should start off as collapsed\r\n\t * via data.\r\n\t *\r\n\t * To toggle actual node, use its `isActive` property instead.\r\n\t *\r\n\t * @param value Collapsed?\r\n\t */\r\n\tpublic set collapsed(value: boolean) {\r\n\t\tthis.setProperty(\"collapsed\", value);\r\n\t\tthis.node.isActive = !value;\r\n\t}\r\n\r\n\t/**\r\n\t * @return Collapsed?\r\n\t */\r\n\tpublic get collapsed(): boolean {\r\n\t\treturn this.properties.collapsed;\r\n\t}\r\n\r\n\t/**\r\n\t * Is this node fixed (immovable)?\r\n\t *\r\n\t * @since 4.6.2\r\n\t * @param value Fixed?\r\n\t */\r\n\tpublic set fixed(value: boolean) {\r\n\t\tthis.setProperty(\"fixed\", value);\r\n\t\tif (this.component) {\r\n\t\t\tthis.component.handleFixed(this);\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * @return Fixed?\r\n\t */\r\n\tpublic get fixed(): boolean {\r\n\t\treturn this.properties.fixed;\r\n\t}\r\n\r\n\t/**\r\n\t * A list of item's sub-children.\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 * Creates a marker used in the legend for this slice.\r\n\t *\r\n\t * @ignore Exclude from docs\r\n\t * @param marker Marker container\r\n\t */\r\n\tpublic createLegendMarker(marker: Container) {\r\n\t\tthis.component.createLegendMarker(marker, this);\r\n\t\tif (!this.node.isActive) {\r\n\t\t\tthis.hide();\r\n\t\t}\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\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 [[ForceDirectedSeries]].\r\n *\r\n * @since 4.3.8\r\n */\r\nexport interface IForceDirectedSeriesDataFields extends ISeriesDataFields {\r\n\r\n\t/**\r\n\t * Name of the field in data that holds category.\r\n\t */\r\n\tcategory?: 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 tha holds an array of ids that node should link with\r\n\t * besides of it's own children or parent.\r\n\t */\r\n\tlinkWith?: 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\t/**\r\n\t * Name of the field in data that holds boolean flag if item should be\r\n\t * hidden in legend.\r\n\t */\r\n\thiddenInLegend?: string;\r\n\r\n\t/**\r\n\t * A name of the field that holds boolean flag whether node should start\r\n\t * as collapsed. (nodes start as fully expanded by default)\r\n\t */\r\n\tcollapsed?: string;\r\n\r\n\t/**\r\n\t * name of the field that holds boolean flag indicating whether this node\r\n\t * is \"fixed\" (immobavle).\r\n\t *\r\n\t * @since 4.6.2\r\n\t */\r\n\tfixed?: string;\r\n}\r\n\r\n/**\r\n * Defines properties for [[ForceDirectedSeries]].\r\n *\r\n * @since 4.3.8\r\n */\r\nexport interface IForceDirectedSeriesProperties extends ISeriesProperties {\r\n\r\n\t/**\r\n\t * Smallest possible radius in pixels of the node circle.\r\n\t *\r\n\t * @default 5\r\n\t */\r\n\tminRadius?: number | Percent;\r\n\r\n\t/**\r\n\t * Biggest possible radius in pixels of the node circle.\r\n\t *\r\n\t * @default 70\r\n\t */\r\n\tmaxRadius?: number | Percent;\r\n\r\n\t/**\r\n\t * A color set to be used for coloring nodes.\r\n\t *\r\n\t * Each new top level will be assigned a new color from this list.\r\n\t */\r\n\tcolors?: ColorSet;\r\n\r\n\t/**\r\n\t * Number of levels to display initially.\r\n\t */\r\n\tmaxLevels?: number;\r\n\r\n\t/**\r\n\t * A relative strength with which nodes push or attract each other.\r\n\t */\r\n\tmanyBodyStrength?: number;\r\n\r\n\t/**\r\n\t * A relative strength with which nodes are pushed away or attracted to\r\n\t * center of the chart.\r\n\t */\r\n\tcenterStrength?: number;\r\n\r\n\t/**\r\n\t * Relative attraction strength between the nodes connected with `linkWith`.\r\n\t *\r\n\t * @since 4.4.8\r\n\t */\r\n\tlinkWithStrength?: number;\r\n\r\n\t/**\r\n\t * Specifies if user can drag fixed nodes\r\n\t *\r\n\t * @since 4.9.0\r\n\t */\r\n\tdragFixedNodes?: boolean;\r\n\r\n\t/**\r\n\t * The bigger the number the more slowly the nodes will move. Think of it as\r\n\t * friction.\r\n\t * \r\n\t * @default 0.4\r\n\t * @since 4.9.2\r\n\t */\r\n\tvelocityDecay?: number;\r\n\r\n\t/**\r\n\t * Renders series hidden until Xth tick.\r\n\t *\r\n\t * @default 10\r\n\t * @since 4.10.17\r\n\t */\r\n\tshowOnTick?: number;\r\n\r\n\t/**\r\n\t * Base value, used when calculating node radius.\r\n\t *\r\n\t * Set it to a value, or `undefined` if you want to calculate from the\r\n\t * lowest value in series.\r\n\t *\r\n\t * @default 0\r\n\t */\r\n\tbaseValue?: number;\r\n}\r\n\r\n/**\r\n * Defines events for [[ForceDirectedSeries]].\r\n *\r\n * @since 4.3.8\r\n */\r\nexport interface IForceDirectedSeriesEvents extends ISeriesEvents { }\r\n\r\n/**\r\n * Defines adapters for [[ForceDirectedSeries]].\r\n *\r\n * @see {@link Adapter}\r\n * @since 4.3.8\r\n */\r\nexport interface IForceDirectedSeriesAdapters extends ISeriesAdapters, IForceDirectedSeriesProperties { }\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 [[ForceDirectedTree]] chart.\r\n *\r\n * @see {@link IForceDirectedSeriesEvents} for a list of available Events\r\n * @see {@link IForceDirectedSeriesAdapters} for a list of available Adapters\r\n * @see {@link https://www.amcharts.com/docs/v4/chart-types/ForceDirectedTree/} For more information\r\n * @todo Example\r\n * @since 4.3.8\r\n * @important\r\n */\r\nexport class ForceDirectedSeries extends Series {\r\n\r\n\t/**\r\n\t * @ignore\r\n\t */\r\n\tpublic _node: ForceDirectedNode;\r\n\r\n\t/**\r\n\t * @ignore\r\n\t */\r\n\tprotected _nodes: ListTemplate;\r\n\r\n\t/**\r\n\t * @ignore\r\n\t */\r\n\tpublic _link: ForceDirectedLink;\r\n\r\n\t/**\r\n\t * @ignore\r\n\t */\r\n\tprotected _links: ListTemplate;\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: IForceDirectedSeriesDataFields;\r\n\r\n\t/**\r\n\t * Defines available properties.\r\n\t */\r\n\tpublic _properties!: IForceDirectedSeriesProperties;\r\n\r\n\t/**\r\n\t * Defines available adapters.\r\n\t */\r\n\tpublic _adapter!: IForceDirectedSeriesAdapters;\r\n\r\n\t/**\r\n\t * Defines available events.\r\n\t */\r\n\tpublic _events!: IForceDirectedSeriesEvents;\r\n\r\n\t/**\r\n\t * Defines the type of data item.\r\n\t */\r\n\tpublic _dataItem: ForceDirectedSeriesDataItem;\r\n\r\n\t/**\r\n\t * A chart series belongs to.\r\n\t */\r\n\tpublic _chart: ForceDirectedTree;\r\n\r\n\t/**\r\n\t * Parent data item of a series.\r\n\t */\r\n\tpublic parentDataItem: ForceDirectedTreeDataItem;\r\n\r\n\t/**\r\n\t * A reference to the `d3.Simulation` instance for fine-grained configuration\r\n\t * of node gravitational dynamics.\r\n\t *\r\n\t * @see {@link https://github.com/d3/d3-force#simulation} For more info\r\n\t */\r\n\tpublic d3forceSimulation: d3force.Simulation<{}, d3force.SimulationLinkDatum>;\r\n\r\n\t/**\r\n\t * @ignore\r\n\t */\r\n\tprotected _maxValue: number;\r\n\r\n\t/**\r\n\t * @ignore\r\n\t */\r\n\tprotected _minValue: number;\r\n\r\n\t/**\r\n\t * @ignore\r\n\t */\r\n\tpublic forceLinks: d3force.SimulationLinkDatum[];\r\n\r\n\t/**\r\n\t * @ignore\r\n\t */\r\n\tprotected _linkForce: d3force.ForceLink>;\r\n\r\n\t/**\r\n\t * @ignore\r\n\t */\r\n\tprotected _collisionForce: d3force.ForceCollide;\r\n\r\n\r\n\tprotected _tick = 0;\r\n\r\n\t/**\r\n\t * Constructor\r\n\t */\r\n\tconstructor() {\r\n\t\tsuper();\r\n\t\tthis.className = \"ForceDirectedSeries\";\r\n\r\n\t\tthis.d3forceSimulation = d3force.forceSimulation();\r\n\r\n\t\tthis.maxRadius = percent(8);\r\n\t\tthis.minRadius = percent(1);\r\n\r\n\t\tthis.width = percent(100);\r\n\t\tthis.height = percent(100);\r\n\r\n\t\tthis.colors = new ColorSet();\r\n\t\tthis.colors.step = 2;\r\n\r\n\t\tthis.width = percent(100);\r\n\t\tthis.height = percent(100);\r\n\r\n\t\tthis.manyBodyStrength = -15;\r\n\t\tthis.centerStrength = 0.8;\r\n\r\n\t\tthis.showOnTick = 10;\r\n\t\tthis.baseValue = 0;\r\n\r\n\t\tthis.setPropertyValue(\"dragFixedNodes\", false);\r\n\t\tthis.setPropertyValue(\"velocityDecay\", 0.4);\r\n\r\n\t\tthis.events.on(\"maxsizechanged\", () => {\r\n\t\t\tthis.updateRadiuses(this.dataItems);\r\n\t\t\tthis.updateLinksAndNodes();\r\n\r\n\t\t\tthis.dataItems.each((dataItem) => {\r\n\t\t\t\tthis.handleFixed(dataItem);\r\n\t\t\t})\r\n\r\n\t\t\tlet d3forceSimulation = this.d3forceSimulation;\r\n\r\n\t\t\tlet w = $math.max($math.max(50, this.innerWidth), this.innerWidth);\r\n\t\t\tlet h = $math.max($math.max(50, this.innerHeight), this.innerHeight);\r\n\r\n\t\t\tif (d3forceSimulation) {\r\n\t\t\t\td3forceSimulation.force(\"x\", d3force.forceX().x(w / 2).strength(this.centerStrength * 100 / w));\r\n\t\t\t\td3forceSimulation.force(\"y\", d3force.forceY().y(h / 2).strength(this.centerStrength * 100 / h));\r\n\t\t\t\tif (d3forceSimulation.alpha() < 0.4) {\r\n\t\t\t\t\td3forceSimulation.alpha(0.4);\r\n\t\t\t\t\td3forceSimulation.restart();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t})\r\n\r\n\t\tthis.applyTheme();\r\n\t}\r\n\r\n\t/**\r\n\t * Returns maximum value from all supplied data items.\r\n\t *\r\n\t * @ignore\r\n\t * @param dataItems List of data items\r\n\t * @param max Default max\r\n\t * @return Max\r\n\t */\r\n\tprotected getMaxValue(dataItems: OrderedListTemplate, max: number): number {\r\n\t\tdataItems.each((dataItem) => {\r\n\t\t\tif (dataItem.value > max) {\r\n\t\t\t\tmax = dataItem.value;\r\n\t\t\t}\r\n\r\n\t\t\tif (dataItem.children) {\r\n\t\t\t\tlet cmax = this.getMaxValue(dataItem.children, max);\r\n\t\t\t\tif (cmax > max) {\r\n\t\t\t\t\tmax = cmax;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t})\r\n\t\treturn max;\r\n\t}\r\n\r\n\t/**\r\n\t * Returns maximum value from all supplied data items.\r\n\t *\r\n\t * @ignore\r\n\t * @param dataItems List of data items\r\n\t * @param max Default max\r\n\t * @return Max\r\n\t */\r\n\tprotected getMinValue(dataItems: OrderedListTemplate, min: number): number {\r\n\t\tdataItems.each((dataItem) => {\r\n\t\t\tif (dataItem.value < min) {\r\n\t\t\t\tmin = dataItem.value;\r\n\t\t\t}\r\n\r\n\t\t\tif (dataItem.children) {\r\n\t\t\t\tlet cmin = this.getMaxValue(dataItem.children, min);\r\n\t\t\t\tif (cmin < min) {\r\n\t\t\t\t\tmin = cmin;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t})\r\n\t\treturn min;\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(): void {\r\n\r\n\t\tif (this.chart.__disabled) {\r\n\t\t\tsuper.validateDataItems();\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tthis._dataDisposers.push(new ListDisposer(this.links));\r\n\r\n\t\tthis._maxValue = this.getMaxValue(this.dataItems, 0);\r\n\t\tthis._minValue = this.getMinValue(this.dataItems, this._maxValue);\r\n\r\n\t\tthis.forceLinks = [];\r\n\r\n\t\tthis.colors.reset();\r\n\r\n\t\tlet index = 0;\r\n\r\n\t\tlet radius = Math.min(this.innerHeight / 3, this.innerWidth / 3);\r\n\r\n\t\tif (this.dataItems.length <= 1) {\r\n\t\t\tradius = 0;\r\n\t\t}\r\n\r\n\t\tthis.dataItems.each((dataItem) => {\r\n\r\n\t\t\tlet angle = index / this.dataItems.length * 360;\r\n\r\n\t\t\tlet node = dataItem.node;\r\n\r\n\t\t\tlet xField = node.propertyFields.x;\r\n\t\t\tlet yField = node.propertyFields.y;\r\n\r\n\t\t\tif (xField && $type.hasValue((dataItem.dataContext)[xField])) {\r\n\t\t\t\tnode.x = (dataItem.dataContext)[xField];\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tnode.x = this.innerWidth / 2 + radius * $math.cos(angle);\r\n\t\t\t}\r\n\t\t\tif (yField && $type.hasValue((dataItem.dataContext)[yField])) {\r\n\t\t\t\tnode.y = (dataItem.dataContext)[yField];\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tnode.y = this.innerHeight / 2 + radius * $math.sin(angle);\r\n\t\t\t}\r\n\r\n\t\t\tdataItem.node.fill = dataItem.color;\r\n\t\t\tdataItem.node.stroke = dataItem.color;\r\n\r\n\t\t\tindex++;\r\n\r\n\t\t\tthis.initNode(dataItem);\r\n\t\t})\r\n\r\n\t\tif (this.dataFields.linkWith) {\r\n\t\t\tthis.dataItems.each((dataItem) => {\r\n\t\t\t\tthis.processLinkWith(dataItem);\r\n\t\t\t})\r\n\t\t}\r\n\r\n\t\tlet d3forceSimulation = this.d3forceSimulation;\r\n\r\n\t\td3forceSimulation.on(\"tick\", () => {\r\n\t\t\tthis.updateLinksAndNodes();\r\n\t\t});\r\n\r\n\t\t// helps to avoid initial scatter\r\n\t\tfor (let i = 0; i < 10; i++) {\r\n\t\t\t//d3forceSimulation.tick();\r\n\t\t}\r\n\t\td3forceSimulation.alphaDecay(1 - Math.pow(0.001, 1 / 600));\r\n\r\n\t\tthis.chart.feedLegend();\r\n\r\n\t\tsuper.validateDataItems();\r\n\t}\r\n\r\n\t/**\r\n\t * @ignore\r\n\t */\r\n\tpublic handleFixed(dataItem: this[\"_dataItem\"]) {\r\n\t\tlet node = dataItem.node;\r\n\r\n\t\tlet xField = node.propertyFields.x;\r\n\t\tlet yField = node.propertyFields.y;\r\n\r\n\t\tif (xField && $type.hasValue((dataItem.dataContext)[xField])) {\r\n\t\t\tnode.x = (dataItem.dataContext)[xField];\r\n\t\t}\r\n\r\n\t\tif (yField && $type.hasValue((dataItem.dataContext)[yField])) {\r\n\t\t\tnode.y = (dataItem.dataContext)[yField];\r\n\t\t}\r\n\r\n\t\tif (dataItem.fixed) {\r\n\r\n\t\t\tif (node.x instanceof Percent) {\r\n\t\t\t\t(node).fx = $utils.relativeToValue(node.x, this.innerWidth);\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\t(node).fx = node.x;\r\n\t\t\t}\r\n\r\n\t\t\tif (node.y instanceof Percent) {\r\n\t\t\t\t(node).fy = $utils.relativeToValue(node.y, this.innerHeight);\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\t(node).fy = node.y;\r\n\t\t\t}\r\n\r\n\t\t\tnode.draggable = this.dragFixedNodes;\r\n\r\n\t\t\tnode.validate(); // for links to redraw\r\n\t\t}\r\n\t\telse {\r\n\t\t\t(node).fx = undefined;\r\n\t\t\t(node).fy = undefined;\r\n\t\t\tnode.draggable = true;\r\n\t\t}\r\n\r\n\t\tif (dataItem && dataItem.children) {\r\n\t\t\tdataItem.children.each((di) => {\r\n\t\t\t\tthis.handleFixed(di)\r\n\t\t\t})\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * @ignore\r\n\t * @todo description\r\n\t */\r\n\tpublic updateNodeList() {\r\n\t\tlet d3forceSimulation = this.d3forceSimulation;\r\n\t\td3forceSimulation.nodes(this.nodes.values);\r\n\t\tthis._linkForce = d3force.forceLink(this.forceLinks);\r\n\t\td3forceSimulation.force(\"link\", this._linkForce);\r\n\t\tthis._collisionForce = d3force.forceCollide();\r\n\t\td3forceSimulation.force(\"collision\", this._collisionForce);\r\n\r\n\t\tlet w = $math.max(50, this.innerWidth);\r\n\t\tlet h = $math.max(50, this.innerHeight);\r\n\r\n\t\td3forceSimulation.force(\"x\", d3force.forceX().x(w / 2).strength(this.centerStrength * 100 / w));\r\n\t\td3forceSimulation.force(\"y\", d3force.forceY().y(h / 2).strength(this.centerStrength * 100 / h));\r\n\t}\r\n\r\n\t/**\r\n\t * @ignore\r\n\t * @todo description\r\n\t */\r\n\tpublic updateLinksAndNodes() {\r\n\t\tif (this._tick < this.showOnTick) {\r\n\t\t\tthis._tick++;\r\n\t\t\tthis.opacity = 0;\r\n\t\t}\r\n\t\telse if (this._tick == this.showOnTick) {\r\n\t\t\tthis.opacity = 1;\r\n\t\t\tthis._tick++;\r\n\t\t}\r\n\r\n\t\tif (this._linkForce) {\r\n\t\t\tthis._linkForce.distance((linkDatum) => {\r\n\t\t\t\treturn this.getDistance(linkDatum)\r\n\t\t\t});\r\n\t\t\tthis._linkForce.strength((linkDatum) => {\r\n\t\t\t\treturn this.getStrength(linkDatum)\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\tif (this._collisionForce) {\r\n\t\t\tthis._collisionForce.radius(function(node) {\r\n\t\t\t\tif (node instanceof ForceDirectedNode) {\r\n\t\t\t\t\tlet radius = node.circle.pixelRadius;\r\n\t\t\t\t\tif (!node.outerCircle.__disabled && !node.outerCircle.disabled && node.outerCircle.visible) {\r\n\t\t\t\t\t\tradius = (radius + 3) * node.outerCircle.scale;\r\n\t\t\t\t\t}\r\n\t\t\t\t\treturn radius + node.paddingRadius;\r\n\t\t\t\t}\r\n\t\t\t\treturn 1;\r\n\t\t\t})\r\n\t\t}\r\n\r\n\t\tthis.d3forceSimulation.force(\"manybody\", d3force.forceManyBody().strength((node) => {\r\n\t\t\tif (node instanceof ForceDirectedNode) {\r\n\t\t\t\treturn node.circle.pixelRadius * this.manyBodyStrength;\r\n\t\t\t}\r\n\t\t\treturn this.manyBodyStrength;\r\n\t\t}));\r\n\t}\r\n\r\n\t/**\r\n\t * @ignore\r\n\t * @todo description\r\n\t */\r\n\tprotected getDistance(linkDatum: d3force.SimulationLinkDatum) {\r\n\t\tlet source: ForceDirectedNode = linkDatum.source;\r\n\t\tlet target: ForceDirectedNode = linkDatum.target;\r\n\r\n\t\tlet distance = 0;\r\n\t\tif (target.dataItem && source.dataItem) {\r\n\r\n\r\n\t\t\tlet link = source.linksWith.getKey(target.uid);\r\n\r\n\t\t\tif (link) {\r\n\t\t\t\tdistance = link.distance;\r\n\t\t\t}\r\n\r\n\t\t\tif (!source.isActive) {\r\n\t\t\t\tdistance = 1;\r\n\t\t\t}\r\n\r\n\t\t\tif (target.isHidden) {\r\n\t\t\t\treturn 0;\r\n\t\t\t}\r\n\r\n\t\t\treturn (distance * (source.circle.pixelRadius + target.circle.pixelRadius));\r\n\t\t}\r\n\r\n\t\treturn distance;\r\n\t}\r\n\r\n\t/**\r\n\t * @ignore\r\n\t * @todo description\r\n\t */\r\n\tprotected getStrength(linkDatum: d3force.SimulationLinkDatum) {\r\n\t\tlet source: ForceDirectedNode = linkDatum.source;\r\n\t\tlet target: ForceDirectedNode = linkDatum.target;\r\n\r\n\t\tlet strength = 0;\r\n\r\n\t\tlet link = source.linksWith.getKey(target.uid);\r\n\t\tif (link) {\r\n\t\t\tstrength = link.strength;\r\n\t\t}\r\n\r\n\t\tif (target.isHidden) {\r\n\t\t\treturn 0;\r\n\t\t}\r\n\r\n\t\treturn strength;\r\n\t}\r\n\r\n\t/**\r\n\t * Handler for drag end event.\r\n\t *\r\n\t * @ignore\r\n\t */\r\n\tpublic nodeDragEnded(): void {\r\n\t\tthis.d3forceSimulation.alphaTarget(0);\r\n\t}\r\n\t/**\r\n\t * Handler for drag start event.\r\n\t *\r\n\t * @ignore\r\n\t */\r\n\tpublic nodeDragStarted(): void {\r\n\t\tthis.d3forceSimulation.alpha(0.1);\r\n\t\tthis.d3forceSimulation.restart();\r\n\t}\r\n\r\n\t/**\r\n\t * Resets positions of whole tree.\r\n\t *\r\n\t * @ignore\r\n\t */\r\n\tpublic restartSimulation(): void {\r\n\t\tif (this.d3forceSimulation.alpha() <= 0.3) {\r\n\t\t\tthis.d3forceSimulation.alpha(0.3);\r\n\t\t\tthis.d3forceSimulation.restart();\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * @ignore\r\n\t */\r\n\tprotected updateRadiuses(dataItems: OrderedListTemplate) {\r\n\t\tdataItems.each((dataItem) => {\r\n\t\t\tthis.updateRadius(dataItem);\r\n\t\t\tif (dataItem.childrenInited) {\r\n\t\t\t\tthis.updateRadiuses(dataItem.children);\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\tprotected updateRadius(dataItem: ForceDirectedSeriesDataItem) {\r\n\t\tlet node = dataItem.node;\r\n\t\tlet minSide = (this.innerWidth + this.innerHeight) / 2;\r\n\t\tlet minRadius = $utils.relativeToValue(this.minRadius, minSide);\r\n\t\tlet maxRadius = $utils.relativeToValue(this.maxRadius, minSide);\r\n\r\n\t\tlet baseValue = this.baseValue;\r\n\t\tif (baseValue == null) {\r\n\t\t\tbaseValue = this._minValue;\r\n\t\t}\r\n\r\n\t\tlet radius = minRadius + (dataItem.value - baseValue) / (this._maxValue - baseValue) * (maxRadius - minRadius);\r\n\r\n\t\tif (!$type.isNumber(radius)) {\r\n\t\t\tradius = minRadius;\r\n\t\t}\r\n\r\n\t\t//if(!node.circle.isHidden){\r\n\t\tnode.circle.radius = radius;\r\n\t\t//}\r\n\t\tnode.outerCircle.radius = radius + 3;\r\n\r\n\t\tnode.circle.states.getKey(\"active\").properties.radius = radius;\r\n\t\tnode.circle.defaultState.properties.radius = radius;\r\n\t}\r\n\r\n\t/**\r\n\t * Initializes node.\r\n\t *\r\n\t * @ignore\r\n\t */\r\n\tpublic initNode(dataItem: ForceDirectedSeriesDataItem): void {\r\n\r\n\t\tlet node = dataItem.node;\r\n\t\tnode.parent = this;\r\n\t\tthis.updateRadius(dataItem);\r\n\r\n\t\t//let nodeIndex = this.nodes.indexOf(dataItem.node);\r\n\r\n\t\tif (!dataItem.children || dataItem.children.length == 0) {\r\n\t\t\tnode.outerCircle.disabled = true;\r\n\t\t\tnode.circle.interactionsEnabled = true;\r\n\t\t\tnode.cursorOverStyle = MouseCursorStyle.default;\r\n\t\t}\r\n\t\telse {\r\n\t\t\tnode.cursorOverStyle = MouseCursorStyle.pointer;\r\n\t\t}\r\n\r\n\r\n\t\tif (this.dataItemsInvalid && (dataItem.level >= this.maxLevels - 1 || dataItem.collapsed)) {\r\n\t\t\tnode.isActive = false;\r\n\t\t\tthis.updateNodeList();\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tif (!node.isActive) {\r\n\t\t\tnode.hide(0);\r\n\t\t}\r\n\r\n\t\tthis.handleFixed(dataItem);\r\n\r\n\t\tif (dataItem.children) {\r\n\t\t\tlet index = 0;\r\n\t\t\tdataItem.childrenInited = true;\r\n\r\n\t\t\tif (this.dataItems.length == 1 && dataItem.level == 0) {\r\n\t\t\t\tthis.colors.next();\r\n\t\t\t}\r\n\r\n\t\t\tdataItem.children.each((child) => {\r\n\t\t\t\t/*\r\n\t\t\t\tlet link = this.links.create();\r\n\t\t\t\tlink.parent = this;\r\n\t\t\t\tlink.zIndex = -1;\r\n\t\t\t\tdataItem.childLinks.push(link);\r\n\t\t\t\tlink.source = dataItem.node;\r\n\t\t\t\tlet childIndex = this.nodes.indexOf(child.node);\r\n\t\t\t\tlink.target = child.node;\r\n\t\t\t\tchild.parentLink = link;\r\n\r\n\t\t\t\tthis._forceLinks.push({ source: nodeIndex, target: childIndex });\r\n\t\t\t\t*/\r\n\r\n\t\t\t\tlet link = node.linkWith(child.node);\r\n\t\t\t\tchild.parentLink = link;\r\n\r\n\t\t\t\tlet radius = 2 * node.circle.pixelRadius + child.node.circle.pixelRadius;\r\n\r\n\t\t\t\tlet angle = index / dataItem.children.length * 360;\r\n\r\n\t\t\t\tchild.node.x = node.pixelX + radius * $math.cos(angle);\r\n\t\t\t\tchild.node.y = node.pixelY + radius * $math.sin(angle);\r\n\r\n\t\t\t\tchild.node.circle.radius = 0;\r\n\r\n\t\t\t\tlet color: Color | LinearGradient | RadialGradient | Pattern;\r\n\r\n\t\t\t\tlet diColor = child.properties.color;\r\n\t\t\t\tif ($type.hasValue(diColor)) {\r\n\t\t\t\t\tcolor = diColor;\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tif (this.dataItems.length == 1 && dataItem.level == 0) {\r\n\t\t\t\t\t\tcolor = this.colors.next();\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse {\r\n\t\t\t\t\t\tcolor = dataItem.color;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tchild.color = color;\r\n\t\t\t\tchild.node.fill = color;\r\n\t\t\t\tchild.node.stroke = color;\r\n\t\t\t\tchild.parentLink.stroke = color;\r\n\r\n\t\t\t\tchild.node.fill = child.node.fill;\r\n\t\t\t\tchild.node.stroke = child.node.stroke;\r\n\r\n\t\t\t\tthis.initNode(child);\r\n\r\n\t\t\t\tindex++;\r\n\t\t\t})\r\n\t\t}\r\n\t\tnode.isActive = true;\r\n\t\tnode.show(0);\r\n\t\tthis.updateNodeList();\r\n\t}\r\n\r\n\t/**\r\n\t * @ignore\r\n\t * @todo description\r\n\t */\r\n\tprotected processLinkWith(dataItem: ForceDirectedSeriesDataItem) {\r\n\r\n\t\tif (dataItem.linkWith) {\r\n\t\t\t$array.each(dataItem.linkWith, (id, index) => {\r\n\t\t\t\tlet dataItemToConnect = this.getDataItemById(this.dataItems, id);\r\n\r\n\t\t\t\tif (dataItemToConnect) {\r\n\t\t\t\t\tdataItem.node.linkWith(dataItemToConnect.node, this.linkWithStrength);\r\n\t\t\t\t}\r\n\t\t\t})\r\n\t\t}\r\n\r\n\t\tif (dataItem.children) {\r\n\t\t\tdataItem.children.each((child) => {\r\n\t\t\t\tthis.processLinkWith(child);\r\n\t\t\t})\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Returns a [[ForceDirectedSeriesDataItem]] related to node by specific id.\r\n\t *\r\n\t * @param dataItems List of data items to search in\r\n\t * @param id Id to search for\r\n\t * @return Data item\r\n\t */\r\n\tpublic getDataItemById(dataItems: OrderedListTemplate, id: string): ForceDirectedSeriesDataItem {\r\n\t\tfor (let i = dataItems.length - 1; i >= 0; i--) {\r\n\t\t\tlet dataItem = dataItems.getIndex(i);\r\n\r\n\t\t\tif (dataItem.id == id) {\r\n\t\t\t\treturn dataItem;\r\n\t\t\t}\r\n\t\t\tif (dataItem.children) {\r\n\t\t\t\tlet di = this.getDataItemById(dataItem.children, id);\r\n\t\t\t\tif (di) {\r\n\t\t\t\t\treturn di;\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 * 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 ForceDirectedSeriesDataItem();\r\n\t}\r\n\r\n\t/**\r\n\t * A list of nodes in series.\r\n\t *\r\n\t * @return Node list\r\n\t */\r\n\tpublic get nodes(): ListTemplate {\r\n\t\tif (!this._nodes) {\r\n\t\t\tlet node = this.createNode();\r\n\r\n\t\t\tnode.applyOnClones = true;\r\n\t\t\tthis._disposers.push(node);\r\n\r\n\t\t\tthis._nodes = new ListTemplate(node);\r\n\t\t\tthis._disposers.push(new ListDisposer(this._nodes));\r\n\t\t}\r\n\t\treturn this._nodes;\r\n\t}\r\n\r\n\t/**\r\n\t * A list of links between nodes.\r\n\t *\r\n\t * @return Link list\r\n\t */\r\n\tpublic get links(): ListTemplate {\r\n\t\tif (!this._links) {\r\n\t\t\tlet link = this.createLink();\r\n\t\t\tlink.applyOnClones = true;\r\n\t\t\tthis._disposers.push(link);\r\n\r\n\t\t\tthis._links = new ListTemplate(link);\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 * Creates a new node.\r\n\t */\r\n\tprotected createNode(): this[\"_node\"] {\r\n\t\treturn new ForceDirectedNode();\r\n\t}\r\n\r\n\t/**\r\n\t * Creates a new link.\r\n\t */\r\n\tprotected createLink(): this[\"_link\"] {\r\n\t\treturn new ForceDirectedLink();\r\n\t}\r\n\r\n\t/**\r\n\t * Smallest possible radius in pixels of the node circle.\r\n\t *\r\n\t * If set in percent, it radius will be calculated from average width and\r\n\t * height of series.\r\n\t *\r\n\t * @default Percent(1)\r\n\t * @param value Minimum radius (px or percent)\r\n\t */\r\n\tpublic set minRadius(value: number | Percent) {\r\n\t\tthis.setPropertyValue(\"minRadius\", value, true);\r\n\t}\r\n\r\n\t/**\r\n\t * @return Minimum radius (px or percent)\r\n\t */\r\n\tpublic get minRadius(): number | Percent {\r\n\t\treturn this.getPropertyValue(\"minRadius\");\r\n\t}\r\n\r\n\r\n\t/**\r\n\t * Base value. If you set it to null, real minimum value of your data will be used.\r\n\t *\r\n\t * @default 0\r\n\t * @param value Minimum value\r\n\t */\r\n\tpublic set baseValue(value: number) {\r\n\t\tthis.setPropertyValue(\"baseValue\", value, true);\r\n\t}\r\n\r\n\t/**\r\n\t * @return Minimum value\r\n\t */\r\n\tpublic get baseValue(): number {\r\n\t\treturn this.getPropertyValue(\"baseValue\");\r\n\t}\r\n\r\n\t/**\r\n\t * Biggest possible radius in pixels of the node circle.\r\n\t *\r\n\t * If set in percent, it radius will be calculated from average width and\r\n\t * height of series.\r\n\t *\r\n\t * @default Percent(8)\r\n\t * @param value Maximum radius (px or Percent)\r\n\t */\r\n\tpublic set maxRadius(value: number | Percent) {\r\n\t\tthis.setPropertyValue(\"maxRadius\", value, true);\r\n\t}\r\n\r\n\t/**\r\n\t * @return Maximum radius (px or Percent)\r\n\t */\r\n\tpublic get maxRadius(): number | Percent {\r\n\t\treturn this.getPropertyValue(\"maxRadius\");\r\n\t}\r\n\r\n\t/**\r\n\t * A color set to be used for nodes.\r\n\t *\r\n\t * iIt works like this:\r\n\t *\r\n\t * The first level with more than one node, assigns different colors to all\r\n\t * nodes in this list. Their child nodes inherit the color.\r\n\t *\r\n\t * For example, if the top level has one node with three children, the top\r\n\t * node will get first color, the first child will get second color, etc.\r\n\t *\r\n\t * If there are two top nodes, the first top node gets first color, the\r\n\t * second top node gets the second color. Their subsequent children inherit\r\n\t * colors.\r\n\t *\r\n\t * @param value Color set\r\n\t */\r\n\tpublic set colors(value: ColorSet) {\r\n\t\tthis.setPropertyValue(\"colors\", value, true);\r\n\t}\r\n\r\n\t/**\r\n\t * @return Color set\r\n\t */\r\n\tpublic get colors(): ColorSet {\r\n\t\treturn this.getPropertyValue(\"colors\");\r\n\t}\r\n\r\n\t/**\r\n\t * Number of levels to be displayed initially.\r\n\t *\r\n\t * @param value Number of levels\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 Number of levels\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 * Relative strength each node pushes (or attracts) other nodes (it is\r\n\t * multiplied by `node.circle.radius` for big nodes to push stronger).\r\n\t *\r\n\t * Positive value will make nodes attract each other, while negative will\r\n\t * push away each other. The bigger the negative number is, the more\r\n\t * scattered nodes will be.\r\n\t *\r\n\t * Available value range: `-XX` to `XX`.\r\n\t *\r\n\t * @default -15\r\n\t * @param value Body push/attrack strength\r\n\t */\r\n\tpublic set manyBodyStrength(value: number) {\r\n\t\tif (this.setPropertyValue(\"manyBodyStrength\", value)) {\r\n\t\t\tthis.restartSimulation();\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * @return Body push/attrack strength\r\n\t */\r\n\tpublic get manyBodyStrength(): number {\r\n\t\treturn this.getPropertyValue(\"manyBodyStrength\");\r\n\t}\r\n\r\n\t/**\r\n\t * Relative strength each child node is pushes (or attracted) to the center\r\n\t * of the chart.\r\n\t *\r\n\t * Positive value will make nodes to be attracted to center, while negative\r\n\t * will push them away.\r\n\t *\r\n\t * Available value range: `-50` to `50`.\r\n\t *\r\n\t * @default 0.8\r\n\t * @param value Stregth of attraction to center\r\n\t */\r\n\tpublic set centerStrength(value: number) {\r\n\t\tif (this.setPropertyValue(\"centerStrength\", value)) {\r\n\t\t\tthis.restartSimulation();\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * @return Stregth of attraction to center\r\n\t */\r\n\tpublic get centerStrength(): number {\r\n\t\treturn this.getPropertyValue(\"centerStrength\");\r\n\t}\r\n\r\n\t/**\r\n\t * Relative attraction strength between the nodes connected with `linkWith`.\r\n\t *\r\n\t * @since 4.4.8\r\n\t * @param value Strength\r\n\t * @default undefined\r\n\t */\r\n\tpublic set linkWithStrength(value: number) {\r\n\t\tif (this.setPropertyValue(\"linkWithStrength\", value)) {\r\n\t\t\tthis.restartSimulation();\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * @return Strength\r\n\t */\r\n\tpublic get linkWithStrength(): number {\r\n\t\treturn this.getPropertyValue(\"linkWithStrength\");\r\n\t}\r\n\r\n\t/**\r\n\t * The bigger the number the more slowly the nodes will move. Think of it as\r\n\t * friction.\r\n\t *\r\n\t * @since 4.9.2\r\n\t * @param value Velocity decay\r\n\t * @default 0.4\r\n\t */\r\n\tpublic set velocityDecay(value: number) {\r\n\t\tif (this.setPropertyValue(\"velocityDecay\", value)) {\r\n\t\t\tthis.d3forceSimulation.velocityDecay(value);\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * @return Velocity decay\r\n\t */\r\n\tpublic get velocityDecay(): number {\r\n\t\treturn this.getPropertyValue(\"velocityDecay\");\r\n\t}\r\n\r\n\t/**\r\n\t * Specifies if user can drag fixed nodes.\r\n\t *\r\n\t * @since 4.9.0\r\n\t * @default false\r\n\t * @param value Allow drag fixed nodes?\r\n\t */\r\n\tpublic set dragFixedNodes(value: boolean) {\r\n\t\tif (this.setPropertyValue(\"dragFixedNodes\", value)) {\r\n\t\t\tthis.dataItems.each((dataItem) => {\r\n\t\t\t\tthis.handleFixed(dataItem);\r\n\t\t\t})\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * @return Allow drag fixed nodes?\r\n\t */\r\n\tpublic get dragFixedNodes(): boolean {\r\n\t\treturn this.getPropertyValue(\"dragFixedNodes\");\r\n\t}\r\n\r\n\t/**\r\n\t * Binds related legend data item's visual settings to this series' visual\r\n\t * settings.\r\n\t *\r\n\t * @ignore Exclude from docs\r\n\t * @param marker Container\r\n\t * @param dataItem Data item\r\n\t */\r\n\tpublic createLegendMarker(marker: Container, dataItem?: this[\"_dataItem\"]): void {\r\n\t\tmarker.children.each((child) => {\r\n\t\t\tlet node = dataItem.node;\r\n\r\n\t\t\tif (child instanceof RoundedRectangle) {\r\n\t\t\t\tchild.cornerRadius(40, 40, 40, 40);\r\n\t\t\t}\r\n\r\n\r\n\t\t\tchild.defaultState.properties.fill = node.fill;\r\n\t\t\tchild.defaultState.properties.stroke = node.stroke;\r\n\t\t\tchild.defaultState.properties.fillOpacity = node.fillOpacity;\r\n\t\t\tchild.defaultState.properties.strokeOpacity = node.strokeOpacity;\r\n\r\n\t\t\tchild.fill = node.fill;\r\n\t\t\tchild.stroke = node.stroke;\r\n\t\t\tchild.fillOpacity = node.fillOpacity;\r\n\t\t\tchild.strokeOpacity = node.strokeOpacity;\r\n\r\n\t\t\tif (child.fill == undefined) {\r\n\t\t\t\tchild.__disabled = true;\r\n\t\t\t}\r\n\r\n\t\t\tlet legendDataItem = marker.dataItem;\r\n\t\t\tlegendDataItem.color = node.fill;\r\n\t\t\tlegendDataItem.colorOrig = node.fill;\r\n\r\n\t\t\tnode.events.on(\"propertychanged\", (ev) => {\r\n\t\t\t\tif (ev.property == \"fill\") {\r\n\r\n\t\t\t\t\tchild.__disabled = false;\r\n\r\n\t\t\t\t\tif (!child.isActive) {\r\n\t\t\t\t\t\tchild.fill = node.fill;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tchild.defaultState.properties.fill = node.fill;\r\n\t\t\t\t\tlegendDataItem.color = node.fill;\r\n\t\t\t\t\tlegendDataItem.colorOrig = node.fill;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (ev.property == \"stroke\") {\r\n\t\t\t\t\tif (!child.isActive) {\r\n\t\t\t\t\t\tchild.stroke = node.stroke;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tchild.defaultState.properties.stroke = node.stroke;\r\n\t\t\t\t}\r\n\t\t\t}, undefined, false)\r\n\t\t});\r\n\t}\r\n\r\n\t/**\r\n\t * Renders series hidden until Xth tick.\r\n\t *\r\n\t * @default 10\r\n\t * @since 4.10.17\r\n\t * @param value Number of ticks to delay rendering\r\n\t */\r\n\tpublic set showOnTick(value: number) {\r\n\t\tthis.setPropertyValue(\"showOnTick\", value);\r\n\t}\r\n\r\n\t/**\r\n\t * @return Number of ticks to delay rendering\r\n\t */\r\n\tpublic get showOnTick(): number {\r\n\t\treturn this.getPropertyValue(\"showOnTick\");\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[\"ForceDirectedSeries\"] = ForceDirectedSeries;\r\nregistry.registeredClasses[\"ForceDirectedSeriesDataItem\"] = ForceDirectedSeriesDataItem;\r\n\n\n\n// WEBPACK FOOTER //\n// ../../../../../src/.internal/plugins/forceDirected/ForceDirectedSeries.ts","/**\r\n * ForceDirectedTree chart module.\r\n */\r\n\r\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\r\nimport { SerialChart, ISerialChartProperties, ISerialChartDataFields, ISerialChartAdapters, ISerialChartEvents, SerialChartDataItem } from \"../../charts/types/SerialChart\";\r\nimport { ForceDirectedSeries, ForceDirectedSeriesDataItem } from \"./ForceDirectedSeries\";\r\nimport { Export } from \"../../core/export/Export\";\r\nimport { registry } from \"../../core/Registry\";\r\nimport * as $type from \"../../core/utils/Type\";\r\nimport * as $utils from \"../../core/utils/Utils\";\r\nimport { color } from \"../../core/utils/Color\";\r\nimport { percent } from \"../../core/utils/Percent\";\r\nimport { IPoint } from \"../../core/defs/IPoint\";\r\nimport { Sprite, ISpriteEvents, AMEvent } from \"../../core/Sprite\";\r\nimport { IDisposer } from \"../../core/utils/Disposer\";\r\nimport * as $ease from \"../../core/utils/Ease\";\r\nimport * as $math from \"../../core/utils/Math\";\r\nimport { ZoomOutButton } from \"../../core/elements/ZoomOutButton\";\r\nimport { getInteraction, IInteractionEvents } from \"../../core/interaction/Interaction\";\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 [[ForceDirectedTree]].\r\n *\r\n * @since 4.3.8\r\n * @see {@link DataItem}\r\n */\r\nexport class ForceDirectedTreeDataItem extends SerialChartDataItem { }\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 [[ForceDirectedTree]].\r\n *\r\n * @since 4.3.8\r\n */\r\nexport interface IForceDirectedTreeDataFields extends ISerialChartDataFields { }\r\n\r\n/**\r\n * Defines properties for [[ForceDirectedTree]].\r\n *\r\n * @since 4.3.8\r\n */\r\nexport interface IForceDirectedTreeProperties extends ISerialChartProperties {\r\n\r\n\t/**\r\n\t * Indicates whether chart can be zoomed/panned (via mouse, touch, or API).\r\n\t *\r\n\t * @since 4.10.0\r\n\t * @default false\r\n\t */\r\n\tzoomable?: boolean;\r\n\r\n\t/**\r\n\t * Specifies what should chart do if when mouse wheel is rotated.\r\n\t *\r\n\t * @since 4.10.0\r\n\t * @default none\r\n\t */\r\n\tmouseWheelBehavior?: \"zoom\" | \"none\";\r\n\r\n\t/**\r\n\t * When user zooms in or out current zoom level is multiplied or divided\r\n\t * by value of this setting.\r\n\t *\r\n\t * @since 4.10.0\r\n\t * @default 2\r\n\t */\r\n\tzoomStep?: number;\r\n}\r\n\r\n/**\r\n * Defines events for [[ForceDirectedTree]].\r\n *\r\n * @since 4.3.8\r\n */\r\nexport interface IForceDirectedTreeEvents extends ISerialChartEvents { }\r\n\r\n/**\r\n * Defines adapters for [[ForceDirectedTree]].\r\n *\r\n * @since 4.3.8\r\n * @see {@link Adapter}\r\n */\r\nexport interface IForceDirectedTreeAdapters extends ISerialChartAdapters, IForceDirectedTreeProperties { }\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 main class for [[ForceDirectedTree]] chart type.\r\n *\r\n * @see {@link IForceDirectedTreeEvents} for a list of available Events\r\n * @see {@link IForceDirectedTreeAdapters} for a list of available Adapters\r\n * @see {@link https://www.amcharts.com/docs/v4/chart-types/force-directed/} For more information\r\n * @since 4.3.8\r\n * @important\r\n */\r\nexport class ForceDirectedTree extends SerialChart {\r\n\r\n\t/**\r\n\t * Defines the type of data item.\r\n\t */\r\n\tpublic _dataItem: ForceDirectedTreeDataItem;\r\n\r\n\t/**\r\n\t * Defines available data fields.\r\n\t */\r\n\tpublic _dataFields: IForceDirectedTreeDataFields;\r\n\r\n\t/**\r\n\t * Defines available properties.\r\n\t */\r\n\tpublic _properties!: IForceDirectedTreeProperties;\r\n\r\n\t/**\r\n\t * Defines available adapters.\r\n\t */\r\n\tpublic _adapter!: IForceDirectedTreeAdapters;\r\n\r\n\t/**\r\n\t * Defines available events.\r\n\t */\r\n\tpublic _events!: IForceDirectedTreeEvents;\r\n\r\n\t/**\r\n\t * Defines a type of series that this chart uses.\r\n\t */\r\n\tpublic _seriesType: ForceDirectedSeries;\r\n\r\n\t/**\r\n\t * @ignore\r\n\t */\r\n\tprotected _mouseWheelDisposer: IDisposer;\r\n\r\n\t/**\r\n\t * @ignore\r\n\t */\r\n\tprotected _backgroundZoomoutDisposer: IDisposer;\r\n\r\n\t/**\r\n\t * Default duration of zoom animations (ms).\r\n\t */\r\n\tpublic zoomDuration: number = 1000;\r\n\r\n\r\n\t/**\r\n\t * Default zooming animation easing function.\r\n\t */\r\n\tpublic zoomEasing: (value: number) => number = $ease.cubicOut;\r\n\r\n\t/**\r\n\t * Smallest available zoom level. The chart will not allow to zoom out past\r\n\t * this setting.\r\n\t *\r\n\t * NOTE: Should be power of 2.\r\n\t *\r\n\t * @default 1\r\n\t */\r\n\tpublic minZoomLevel: number = 1;\r\n\r\n\t/**\r\n\t * Biggest available zoom level. The chart will not allow to zoom in past\r\n\t * this setting.\r\n\t *\r\n\t * NOTE: Should be power of 2.\r\n\t *\r\n\t * @default 32\r\n\t */\r\n\tpublic maxZoomLevel: number = 16;\r\n\r\n\t/**\r\n\t * A button which is used to zoom out the chart.\r\n\t */\r\n\tprotected _zoomOutButton: ZoomOutButton;\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 = \"ForceDirectedTree\";\r\n\r\n\t\tthis.seriesContainer.isMeasured = true;\r\n\t\tthis.seriesContainer.layout = \"absolute\";\r\n\r\n\t\tthis.mouseWheelBehavior = \"none\";\r\n\t\tthis.zoomStep = 2;\r\n\r\n\t\tthis.seriesContainer.background.fillOpacity = 0;\r\n\t\tthis.seriesContainer.background.fill = color(\"#ffffff\")\r\n\r\n\t\tlet zoomOutButton = this.createChild(ZoomOutButton);\r\n\t\tzoomOutButton.shouldClone = false;\r\n\t\tzoomOutButton.x = percent(100);\r\n\t\tzoomOutButton.horizontalCenter = \"right\";\r\n\t\tzoomOutButton.valign = \"top\";\r\n\t\tzoomOutButton.zIndex = Number.MAX_SAFE_INTEGER;\r\n\t\tzoomOutButton.marginTop = 5;\r\n\t\tzoomOutButton.marginRight = 5;\r\n\t\tzoomOutButton.isMeasured = false;\r\n\r\n\t\tzoomOutButton.adapter.add(\"dx\", (dx, target) => {\r\n\t\t\treturn - zoomOutButton.marginRight;\r\n\t\t})\r\n\r\n\t\tzoomOutButton.hide(0);\r\n\t\tthis.zoomOutButton = zoomOutButton;\r\n\r\n\t\tthis.addDisposer(this.seriesContainer.events.on(\"sizechanged\", () => {\r\n\r\n\t\t\tif (this.seriesContainer.scale != 1) {\r\n\t\t\t\tthis.zoomOutButton.show();\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tthis.zoomOutButton.hide();\r\n\t\t\t}\r\n\t\t}));\r\n\r\n\t\tconst interaction = getInteraction();\r\n\t\tthis._disposers.push(interaction.body.events.on(\"down\", (event: IInteractionEvents[\"down\"]) => {\r\n\t\t\tif (this.zoomable) {\r\n\t\t\t\tlet svgPoint = $utils.documentPointToSvg(event.pointer.point, this.htmlContainer);\r\n\t\t\t\tif (svgPoint.x > 0 && svgPoint.y > 0 && svgPoint.x < this.svgContainer.width && svgPoint.y < this.svgContainer.height) {\r\n\t\t\t\t\tthis.seriesContainer.dragStart(event.pointer);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}, this));\r\n\t\tthis._disposers.push(interaction.body.events.on(\"up\", (event: IInteractionEvents[\"up\"]) => {\r\n\t\t\tif (this.zoomable) {\r\n\t\t\t\tthis.seriesContainer.dragStop(event.pointer, true);\r\n\t\t\t}\r\n\t\t}, this));\r\n\r\n\t\t// Apply theme\r\n\t\tthis.applyTheme();\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 ForceDirectedSeries();\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 ForceDirectedTreeDataItem();\r\n\t}\r\n\r\n\t/**\r\n\t * Setups the legend to use the chart's data.\r\n\t *\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\tlet legendData: any[] = [];\r\n\r\n\t\t\tthis.series.each((series) => {\r\n\t\t\t\tif (!series.hiddenInLegend) {\r\n\r\n\t\t\t\t\tlet dataItems = series.dataItems;\r\n\t\t\t\t\tif (dataItems.length == 1) {\r\n\t\t\t\t\t\tlet children = series.dataItems.getIndex(0).children;\r\n\t\t\t\t\t\tif (children && children.length > 0) {\r\n\t\t\t\t\t\t\tdataItems = children;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tdataItems.each((dataItem) => {\r\n\t\t\t\t\t\tif (!dataItem.hiddenInLegend) {\r\n\t\t\t\t\t\t\tlegendData.push(dataItem);\r\n\r\n\t\t\t\t\t\t\tlet legendSettings = series.legendSettings;\r\n\t\t\t\t\t\t\tif (legendSettings) {\r\n\t\t\t\t\t\t\t\tif (legendSettings.labelText) {\r\n\t\t\t\t\t\t\t\t\tlegend.labels.template.text = legendSettings.labelText;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tif (legendSettings.itemLabelText) {\r\n\t\t\t\t\t\t\t\t\tlegend.labels.template.text = legendSettings.itemLabelText;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tif (legendSettings.valueText) {\r\n\t\t\t\t\t\t\t\t\tlegend.valueLabels.template.text = legendSettings.valueText;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tif (legendSettings.itemValueText) {\r\n\t\t\t\t\t\t\t\t\tlegend.valueLabels.template.text = legendSettings.itemValueText;\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\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\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(\"Force directed tree\");\r\n\t\t}\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\tthis.series.each((series) => {\r\n\t\t\t\t\tif ($type.hasValue(series.dataFields.children)) {\r\n\t\t\t\t\t\tdelete info.dataFields[series.dataFields.children];\r\n\t\t\t\t\t}\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\t/**\r\n\t * Handles mouse wheel event, e.g. user rotates mouse wheel while over the\r\n\t * map: zooms in or out depending on the direction of the wheel turn.\r\n\t *\r\n\t * @param event Original event\r\n\t */\r\n\tprotected handleWheel(event: AMEvent[\"wheel\"]) {\r\n\r\n\t\tlet point: IPoint = $utils.documentPointToSprite(event.point, this.seriesContainer);\r\n\r\n\t\tlet zoomLevel = this.seriesContainer.scale;\r\n\r\n\t\tif (event.shift.y < 0) {\r\n\t\t\tzoomLevel *= this.zoomStep;\r\n\t\t}\r\n\t\telse {\r\n\t\t\tzoomLevel /= this.zoomStep;\r\n\t\t}\r\n\r\n\t\tzoomLevel = $math.fitToRange(zoomLevel, this.minZoomLevel, this.maxZoomLevel);\r\n\r\n\t\tthis.zoomToPoint(point, zoomLevel)\r\n\t}\r\n\r\n\t/**\r\n\t * Zooms the chart to particular point.\r\n\t *\r\n\t * @from 4.10.0\r\n\t * @param point A point to zoom to\r\n\t * @param zoomLevel Zoom level\r\n\t * @param center Should the chart center on the target point?\r\n\t */\r\n\tpublic zoomToPoint(point: IPoint, zoomLevel: number, center?: boolean): void {\r\n\r\n\t\tlet container = this.seriesContainer;\r\n\r\n\t\tlet svgPoint: IPoint\r\n\t\tif (center) {\r\n\t\t\tsvgPoint = { x: this.maxWidth / 2, y: this.maxHeight / 2 };\r\n\t\t}\r\n\t\telse {\r\n\t\t\tsvgPoint = $utils.spritePointToSvg(point, container)\r\n\t\t}\r\n\r\n\t\tlet x = svgPoint.x - point.x * zoomLevel;\r\n\t\tlet y = svgPoint.y - point.y * zoomLevel;\r\n\r\n\t\tcontainer.animate([{ property: \"scale\", to: zoomLevel }, { property: \"x\", to: x }, { property: \"y\", to: y }], this.zoomDuration, this.zoomEasing);\r\n\t}\r\n\r\n\t/**\r\n\t * Zooms the chart to particular data item (node).\r\n\t *\r\n\t * @from 4.10.0\r\n\t * @param dataItem A data item to zoom to\r\n\t * @param zoomLevel Zoom level\r\n\t * @param center Should the chart center on the target point?\r\n\t */\r\n\tpublic zoomToDataItem(dataItem: ForceDirectedSeriesDataItem, zoomLevel?: number, center?: boolean): void {\r\n\t\tlet x = dataItem.node.pixelX;\r\n\t\tlet y = dataItem.node.pixelY;\r\n\r\n\t\tif (!$type.isNumber(zoomLevel)) {\r\n\t\t\tzoomLevel = this.seriesContainer.scale * this.zoomStep;\r\n\t\t}\r\n\r\n\t\tthis.zoomToPoint({ x: x, y: y }, zoomLevel, center);\r\n\t}\r\n\r\n\t/**\r\n\t * Zooms out the chart to initial full view.\r\n\t *\r\n\t * @from 4.10.0\r\n\t */\r\n\tpublic zoomOut(): void {\r\n\t\tlet container = this.seriesContainer;\r\n\t\tthis.zoomToPoint({ x: container.pixelWidth / 2, y: container.pixelHeight / 2 }, 1, true);\r\n\t}\r\n\r\n\t/**\r\n\t * When user zooms in or out current zoom level is multiplied or divided\r\n\t * by value of this setting.\r\n\t *\r\n\t * @default false\r\n\t * @since 4.10.0\r\n\t * @see {@link https://www.amcharts.com/docs/v4/chart-types/force-directed/#Zooming} for more information about zooming ForceDirectedTree\r\n\t * @param value Zoomable\r\n\t */\r\n\tpublic set zoomable(value: boolean) {\r\n\t\tif (this.setPropertyValue(\"zoomable\", value)) {\r\n\t\t\tif (value) {\r\n\t\t\t\tthis.seriesContainer.resizable = true;\r\n\t\t\t\tthis.seriesContainer.draggable = true;\r\n\t\t\t\tthis.seriesContainer.dragWhileResize = true;\r\n\t\t\t\tthis.mouseWheelBehavior = \"zoom\";\r\n\r\n\t\t\t\tthis._backgroundZoomoutDisposer = this.seriesContainer.background.events.on(\"hit\", () => {\r\n\t\t\t\t\tthis.zoomOut();\r\n\t\t\t\t}, this, false);\r\n\t\t\t\tthis._disposers.push(this._backgroundZoomoutDisposer);\r\n\r\n\t\t\t\tthis._disposers.push(this.seriesContainer.events.on(\"sizechanged\", () => {\r\n\t\t\t\t\tthis.series.each((series) => {\r\n\t\t\t\t\t\tseries.nodes.each((node) => {\r\n\t\t\t\t\t\t\tnode.updateLabelSize();\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\telse {\r\n\t\t\t\tthis.seriesContainer.resizable = false;\r\n\t\t\t\tthis.seriesContainer.draggable = false;\r\n\t\t\t\tthis.seriesContainer.dragWhileResize = false;\r\n\t\t\t\tthis.mouseWheelBehavior = \"none\";\r\n\t\t\t\tif (this._backgroundZoomoutDisposer) {\r\n\t\t\t\t\tthis._backgroundZoomoutDisposer.dispose();\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 * @return Zoomable\r\n\t */\r\n\tpublic get zoomable(): boolean {\r\n\t\treturn this.getPropertyValue(\"zoomable\");\r\n\t}\r\n\r\n\t/**\r\n\t * Specifies what should chart do if when mouse wheel is rotated.\r\n\t *\r\n\t * @param Mouse wheel behavior\r\n\t * @since 4.10.0\r\n\t * @default none\r\n\t */\r\n\tpublic set mouseWheelBehavior(value: \"zoom\" | \"none\") {\r\n\r\n\t\tif (this.setPropertyValue(\"mouseWheelBehavior\", value)) {\r\n\t\t\tif (value != \"none\") {\r\n\t\t\t\tthis._mouseWheelDisposer = this.chartContainer.events.on(\"wheel\", this.handleWheel, this, false);\r\n\t\t\t\tthis._disposers.push(this._mouseWheelDisposer);\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tif (this._mouseWheelDisposer) {\r\n\t\t\t\t\tthis._mouseWheelDisposer.dispose();\r\n\t\t\t\t}\r\n\t\t\t\tthis.chartContainer.wheelable = false;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * @return Mouse wheel behavior\r\n\t */\r\n\tpublic get mouseWheelBehavior(): \"zoom\" | \"none\" {\r\n\t\treturn this.getPropertyValue(\"mouseWheelBehavior\");\r\n\t}\r\n\r\n\t/**\r\n\t * When user zooms in or out current zoom level is multiplied or divided\r\n\t * by value of this setting.\r\n\t *\r\n\t * @since 4.10.0\r\n\t * @default 2\r\n\t * @param value Zoom factor\r\n\t */\r\n\tpublic set zoomStep(value: number) {\r\n\t\tthis.setPropertyValue(\"zoomStep\", value);\r\n\t}\r\n\r\n\t/**\r\n\t * @return Zoom factor\r\n\t */\r\n\tpublic get zoomStep(): number {\r\n\t\treturn this.getPropertyValue(\"zoomStep\");\r\n\t}\r\n\r\n\t/**\r\n\t * A [[Button]] element that is used for zooming out the chart.\r\n\t *\r\n\t * This button appears only when chart is zoomed in, and disappears\r\n\t * autoamatically when it is zoome dout.\r\n\t *\r\n\t * @param button Zoom out button\r\n\t */\r\n\tpublic set zoomOutButton(button: ZoomOutButton) {\r\n\t\tthis._zoomOutButton = button;\r\n\t\tif (button) {\r\n\t\t\tbutton.events.on(\"hit\", () => {\r\n\t\t\t\tthis.zoomOut();\r\n\t\t\t}, undefined, false);\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * @return Zoom out button\r\n\t */\r\n\tpublic get zoomOutButton(): ZoomOutButton {\r\n\t\treturn this._zoomOutButton;\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[\"ForceDirectedTree\"] = ForceDirectedTree;\r\nregistry.registeredClasses[\"ForceDirectedTreeDataItem\"] = ForceDirectedTreeDataItem;\r\n\n\n\n// WEBPACK FOOTER //\n// ../../../../../src/.internal/plugins/forceDirected/ForceDirectedTree.ts","import * as m from \"../../es2015/plugins/forceDirected\";\nwindow.am4plugins_forceDirected = m;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./plugins/forceDirected.js\n// module id = null\n// module chunks = "],"sourceRoot":""}