require(["esri/widgets/LinkChartLayoutSwitcher/LinkChartLayoutSwitcherViewModel"], (LinkChartLayoutSwitcherVM) => { /* code goes here */ });
import LinkChartLayoutSwitcherVM from "@arcgis/core/widgets/LinkChartLayoutSwitcher/LinkChartLayoutSwitcherViewModel.js";
esri/widgets/LinkChartLayoutSwitcher/LinkChartLayoutSwitcherViewModel
Provides the logic for the esri/widgets/LinkChartLayoutSwitcher widget that switches the layout of a LinkChartView
- See also
-
- esri/widgets/LinkChartLayoutSwitcher
Constructors
-
Parameterproperties Objectoptional
See the properties for a list of all the properties that may be passed into the constructor.
Property Overview
Name | Type | Summary | Class |
---|---|---|---|
The name of the class. | Accessor | ||
The current selected link chart layout. | LinkChartLayoutSwitcherViewModel | ||
Prevents extent from updating on changes to the layout. | LinkChartLayoutSwitcherViewModel | ||
The current state of the widget. | LinkChartLayoutSwitcherViewModel | ||
The view associated with the widget instance. | LinkChartLayoutSwitcherViewModel |
Property Details
-
layout
layout String
-
The current selected link chart layout.
Possible Values:"organic-standard" |"organic-community" |"basic-grid" |"hierarchical-bottom-to-top" |"radial-root-centric" |"tree-left-to-right" |"geographic-organic-standard" |"chronological-mono-timeline" |"chronological-multi-timeline"
- Default Value:"organic-standard"
-
preventExtentUpdate
preventExtentUpdate Boolean
-
Prevents extent from updating on changes to the layout.
- Default Value:false
-
state
state Stringreadonly
-
The current state of the widget.
Possible Values:"loading" |"ready" |"disabled"
- Default Value:"loading"
-
view
view LinkChartView |null |undefined
-
The view associated with the widget instance.
Method Overview
Name | Return Type | Summary | Class |
---|---|---|---|
Adds one or more handles which are to be tied to the lifecycle of the object. | Accessor | ||
Emits an event on the instance. | LinkChartLayoutSwitcherViewModel | ||
Indicates whether there is an event listener on the instance that matches the provided event name. | LinkChartLayoutSwitcherViewModel | ||
Returns true if a named group of handles exist. | Accessor | ||
Registers an event handler on the instance. | LinkChartLayoutSwitcherViewModel | ||
Removes a group of handles owned by the object. | Accessor | ||
Promise<void> | Switches the layout of the link chart. | LinkChartLayoutSwitcherViewModel |
Method Details
-
Inherited from Accessor
-
Adds one or more handles which are to be tied to the lifecycle of the object. The handles will be removed when the object is destroyed.
// Manually manage handles const handle = reactiveUtils.when( () => !view.updating, () => { wkidSelect.disabled = false; }, { once: true } ); this.addHandles(handle); // Destroy the object this.destroy();
ParametershandleOrHandles WatchHandle|WatchHandle[]Handles marked for removal once the object is destroyed.
groupKey *optionalKey identifying the group to which the handles should be added. All the handles in the group can later be removed with Accessor.removeHandles(). If no key is provided the handles are added to a default group.
-
hasHandles
InheritedMethodhasHandles(groupKey){Boolean}
Inherited from Accessor -
Returns true if a named group of handles exist.
ParametergroupKey *optionalA group key.
ReturnsType Description Boolean Returns true
if a named group of handles exist.Example// Remove a named group of handles if they exist. if (obj.hasHandles("watch-view-updates")) { obj.removeHandles("watch-view-updates"); }
-
on
on(type, listener){Object}
-
Registers an event handler on the instance. Call this method to hook an event with a listener.
ParametersReturnsType Description Object Returns an event handler with a remove()
method that should be called to stop listening for the event(s).Property Type Description remove Function When called, removes the listener from the event. Exampleview.on("click", function(event){ // event is the event handle returned after the event fires. console.log(event.mapPoint); });
-
Inherited from Accessor
-
Removes a group of handles owned by the object.
ParametergroupKey *optionalA group key or an array or collection of group keys to remove.
Exampleobj.removeHandles(); // removes handles from default group obj.removeHandles("handle-group"); obj.removeHandles("other-handle-group");
-
Switches the layout of the link chart.
ParameternewLayout StringList of specific entities and relationships to update.
Possible Values:"organic-standard"|"organic-community"|"basic-grid"|"hierarchical-bottom-to-top"|"radial-root-centric"|"tree-left-to-right"|"geographic-organic-standard"|"chronological-mono-timeline"|"chronological-multi-timeline"
ReturnsType Description Promise<void> - Resolves when the data in the link chart has been updated.
Event Overview
Name | Type | Summary | Class |
---|---|---|---|
|
Fires when the switchLayout() method is called. |
LinkChartLayoutSwitcherViewModel |
Event Details
-
Fires when the switchLayout() method is called.
- See also
ExamplelayoutSwitcher.viewModel.on("switchLayout", function(event){ console.log("Layout Switched"); });