import "@arcgis/map-components/components/arcgis-link-chart";
Loads a WebLinkChart from an ArcGIS Enterprise portal into a LinkChartView.
Note: Sign in to access the data in this demo, U/P: viewer01
/I68VGU^nMurF
Demo
Properties
Property | Attribute | Type |
---|---|---|
allLayerViews readonly |
| |
auto-destroy-disabled | boolean | |
| ||
basemap | Basemap | string | |
| ||
center | Array<number> | Point | string | |
| View2DConstraints | |
display-filter-disabled | boolean | |
| ||
| ||
| ||
| ||
interacting readonly |
| boolean |
item-id | string | |
layerViews readonly |
| |
magnifier readonly |
| |
| ||
navigating readonly |
| boolean |
| ||
| ViewPadding | |
| ||
popup-disabled | boolean | |
ready readonly |
| boolean |
resize-align | "bottom" | "bottom-left" | "bottom-right" | "center" | "left" | "right" | "top" | "top-left" | "top-right" | |
resolution readonly |
| number |
rotation | number | |
scale | number | |
| ||
stationary readonly |
| boolean |
suspended readonly | suspended | boolean |
| ||
| ||
time-zone | string | |
updating readonly | updating | boolean |
view readonly |
| |
| ||
zoom | number |
allLayerViews
allLayerViews: Collection<LayerView>
Collection containing a flat list of all the created LayerViews related to the basemap, operational layers, and group layers in this view.
autoDestroyDisabled
autoDestroyDisabled: boolean
If true, the component will not be destroyed automatically when it is disconnected from the document. This is useful when you want to move the component to a different place on the page, or temporarily hide it. If this is set, make sure to call the `destroy` method when you are done to prevent memory leaks.
- Attribute
- auto-destroy-disabled
- Default value
- false
background
background: ColorBackground
The background color of the LinkChartView. If the view's link chart changes, the view's background
is reset to the link chart's background,
even if the user set it previously.
- Default value
- null
basemap
basemap: Basemap | string
Specifies a basemap for the link chart. The basemap is only visible when the link chart is set to a geographic layout. See documentation on layouts for more detail. The basemap is a set of layers that give geographic context to the LinkChartView and the other operational layers in the link chart.
- Attribute
- basemap
basemapView
basemapView: BasemapView
Represents the view for a single basemap after it has been added to the link chart.
center
center: Array<number> | Point | string
Represents the view's center point; when setting the center, you may pass a
esri/geometry/Point instance or a string representing
a longitude/latitude pair ("-100.4593, 36.9014"
).
Setting the center immediately changes the current view.
For animating the view, see this component's goTo() method.
- Attribute
- center
constraints
constraints: View2DConstraints
Specifies constraints to scale, zoom, and rotation that may be applied to the LinkChartView.
displayFilterDisabled
displayFilterDisabled: boolean
Indicates whether layer's displayFilter are honored when rendering layers in the view.
If false
, display filters are ignored and all features are rendered.
- Attribute
- display-filter-disabled
- Default value
- false
extent
extent: Extent
The extent represents the visible portion of a link chart within the view as an instance of Extent. Setting the extent immediately changes the view without animation. To animate the view, see this component's goTo() method. When the view is rotated, the extent does not update to include the newly visible portions of the link chart.
fatalError
fatalError: Error
A rejected view indicates a fatal error making it unable to display.
graphics
graphics: Collection<Graphic>
Allows for adding graphics directly to the default graphics in the View. Example:
// Adds a graphic to the View
graphics.add(pointGraphic);
Example:
// Removes a graphic from the View
graphics.remove(pointGraphic);
highlights
highlights: Collection<HighlightOptions>
The highlights property is a collection of HighlightGroup objects that allow you to visually emphasize specific features on the link chart.
interacting
interacting: boolean
Indication whether the view is being interacted with (for example when panning or by an interactive tool).
- Default value
- false
itemId
itemId: string
The ID of a WebLinkChart from an ArcGIS Enterprise portal.
To configure the portal url you must set the portalUrl
property on config
before the arcgis-linkchart
component loads.
- Attribute
- item-id
layerViews
layerViews: Collection<LayerView>
A collection containing a hierarchical list of all the created LayerViews of the operational layers in the link chart.
magnifier
magnifier: Magnifier
The magnifier allows for showing a portion of the view as a magnifier image on top of the view.
navigating
navigating: boolean
Indication whether the view is being navigated (for example when panning).
- Default value
- false
padding
padding: ViewPadding
Use the padding property to make the center, and extent, etc.
- Default value
- {left: 0, top: 0, right: 0, bottom: 0}
popup
popup: Popup
A Popup object that displays general content or attributes from layers in the map.
popupDisabled
popupDisabled: boolean
Controls whether the popup opens when users click on the view.
- Attribute
- popup-disabled
- Default value
- false
ready
ready: boolean
When true
, this property indicates whether the view successfully satisfied all dependencies,
signaling that the following conditions are met.
- Default value
- false
resizeAlign
resizeAlign: "bottom" | "bottom-left" | "bottom-right" | "center" | "left" | "right" | "top" | "top-left" | "top-right"
Defines which anchor stays still while resizing the browser window. The default, center
,
ensures the view's center point remains constantly visible as the window size changes. The other
options allow the respective portion of the view to remain visible when the window's size is changed.
- Attribute
- resize-align
- Default value
- "center"
resolution
resolution: number
Represents the current value of one pixel in the unit of the view's spatialReference. The value of resolution is calculated by dividing the view's extent width by its width.
rotation
rotation: number
The clockwise rotation of due north in relation to the top of the view in degrees.
The view may be rotated by directly setting
the rotation or by using the following mouse event: Right-click + Drag
.
WebLinkChart rotation may be disabled by setting the rotationEnabled
property
in constraints to false
.
- Attribute
- rotation
- Default value
- 0
scale
scale: number
Represents the link chart scale at the center of the view. Setting the scale immediately changes the view. For animating the view, see this component's goTo() method.
- Attribute
- scale
spatialReference
spatialReference: SpatialReference
The spatial reference of the view. This indicates the projected or geographic coordinate system used to locate geographic features in the link chart.
- Default value
- null
stationary
stationary: boolean
Indication whether the view is animating, being navigated with or resizing.
- Default value
- false
suspended
suspended: boolean
Indicates if the view is visible on the page.
- Attribute
- suspended
- Default value
- true
theme
theme: Theme
This property specifies the base colors used by some widgets and components to render graphics and labels.
- Default value
- null
timeExtent
timeExtent: TimeExtent
The view's time extent. Time-aware layers display their temporal data that falls within the view's time extent. Setting the view's time extent is similar to setting the spatial extent because once the time extent is set, the view updates automatically to conform to the change.
- Default value
- null
timeZone
timeZone: string
Defines the time zone of the view. The time zone property determines how dates and times are represented to the user, but the underlying data is unchanged.
- Attribute
- time-zone
- Default value
- "system"
updating
updating: boolean
Indicates whether the view is being updated by additional data requests to the network, or by processing received data.
- Attribute
- updating
- Default value
- false
viewpoint
viewpoint: Viewpoint
Represents the current view as a Viewpoint or point of observation on the view. Setting the viewpoint immediately changes the current view. For animating the view, see this component's goTo() method.
zoom
zoom: number
Represents the level of detail (LOD) at the center of the view. A zoom level (or scale) is a number that defines how large or small the contents of a link chart appear in a link chart view. Zoom level is a number usually between 0 (global view) and 23 (very detailed view) and is used as a shorthand for predetermined scale values. A value of -1 means the view has no LODs. When setting the zoom value, the LinkChartView converts it to the corresponding scale, or interpolates it if the zoom is a fractional number. LinkChartView can display link charts with different projections at a full range of scales, and so use the scale property on this component rather than zoom level.
Setting the zoom immediately changes the current view. For animating the view, see this component's goTo() method.
Setting this property in conjunction with center
is a convenient way to set the initial extent of the view.
- Attribute
- zoom
Methods
Method | Signature |
---|---|
addLayer(layer: __esri.Layer | Promise<any>, index?: number): Promise<void> | |
addLayers(layers: __esri.Layer[], index?: number): Promise<void> | |
closePopup(): Promise<void> | |
componentOnReady(): Promise<void> | |
destroy(): Promise<void> | |
goTo(target: __esri.GoToTarget2D, options?: __esri.GoToOptions2D): Promise<unknown> | |
openPopup(options?: __esri.PopupViewOpenPopupOptions): Promise<void> | |
toMap(screenPoint: __esri.MapViewScreenPoint | MouseEvent): __esri.Point | |
toScreen(point: __esri.Point, options?: __esri.ToScreenOptions2D): __esri.MapViewScreenPoint | nullish | |
tryFatalErrorRecovery(): Promise<void> | |
whenLayerView(layer: __esri.Layer): Promise<__esri.LayerView> |
addLayer
addLayer(layer: __esri.Layer | Promise<any>, index?: number): Promise<void>
Adds a layer to the layers collection.
Parameters
Parameter | Type | Optional? |
---|---|---|
layer | Layer | Promise<any> | |
index | number | undefined |
- Returns
- Promise<void>
addLayers
addLayers(layers: __esri.Layer[], index?: number): Promise<void>
Adds a layer or array of layers to the layers collection.
Parameters
Parameter | Type | Optional? |
---|---|---|
layers | Array<Layer> | |
index | number | undefined |
- Returns
- Promise<void>
componentOnReady
componentOnReady(): Promise<void>
Create a promise that resolves once component is fully loaded.
- Returns
- Promise<void>
destroy
destroy(): Promise<void>
Destroys the view, and any associated resources, including its map, popup, and UI elements.
- Returns
- Promise<void>
goTo
goTo(target: __esri.GoToTarget2D, options?: __esri.GoToOptions2D): Promise<unknown>
Sets the view to a given target.
Parameters
Parameter | Type | Optional? |
---|---|---|
target | any | |
options | GoToOptions2D | undefined |
- Returns
- Promise<unknown>
openPopup
openPopup(options?: __esri.PopupViewOpenPopupOptions): Promise<void>
Opens the popup at the given location with content defined either explicitly with content or driven from the PopupTemplate of input features.
Parameters
Parameter | Type | Optional? |
---|---|---|
options | PopupViewOpenPopupOptions | undefined |
- Returns
- Promise<void>
toMap
toMap(screenPoint: __esri.MapViewScreenPoint | MouseEvent): __esri.Point
Parameters
Parameter | Type | Optional? |
---|---|---|
screenPoint | MapViewScreenPoint | MouseEvent |
- Returns
- Point
toScreen
toScreen(point: __esri.Point, options?: __esri.ToScreenOptions2D): __esri.MapViewScreenPoint | nullish
Parameters
Parameter | Type | Optional? |
---|---|---|
point | ||
options | ToScreenOptions2D | undefined |
- Returns
- MapViewScreenPoint | null | undefined
tryFatalErrorRecovery
tryFatalErrorRecovery(): Promise<void>
Call this method to clear any fatal errors resulting from a lost WebGL context.
- Returns
- Promise<void>
whenLayerView
whenLayerView(layer: __esri.Layer): Promise<__esri.LayerView>
Gets the LayerView created on the view for the given layer.
Parameters
Parameter | Type | Optional? |
---|---|---|
layer |
- Returns
- Promise<LayerView>
Events
Event | Type |
---|---|
void | |
ViewLayerviewCreateEvent | |
ViewLayerviewCreateErrorEvent | |
ViewLayerviewDestroyEvent | |
void |
arcgisViewChange
arcgisViewChange: void
This event is for view related property changes: zoom, scale, center, rotation, extent, camera, viewpoint. This event will also emit if stationary toggles from true to false.
arcgisViewClick
arcgisViewClick: ViewClickEvent
Fires after a user clicks on the view.
arcgisViewDoubleClick
arcgisViewDoubleClick: ViewDoubleClickEvent
Fires after double-clicking on the view.
arcgisViewDrag
arcgisViewDrag: ViewDragEvent
Fires during a pointer drag on the view.
arcgisViewHold
arcgisViewHold: ViewHoldEvent
Fires during a pointer drag on the view.
arcgisViewImmediateClick
arcgisViewImmediateClick: ViewImmediateClickEvent
Fires right after a user clicks on the view.
arcgisViewImmediateDoubleClick
arcgisViewImmediateDoubleClick: ViewImmediateDoubleClickEvent
Is emitted after two consecutive immediate-click events.
arcgisViewKeyDown
arcgisViewKeyDown: ViewKeyDownEvent
Fires after a keyboard key is pressed.
arcgisViewKeyUp
arcgisViewKeyUp: ViewKeyUpEvent
Fires after a keyboard key is pressed.
arcgisViewLayerviewCreate
arcgisViewLayerviewCreate: ViewLayerviewCreateEvent
Fires after each layer in the link chart has a corresponding LayerView created and rendered in the view.
arcgisViewLayerviewCreateError
arcgisViewLayerviewCreateError: ViewLayerviewCreateErrorEvent
Fires when an error emits during the creation of a LayerView after a layer has been added to the link chart.
arcgisViewLayerviewDestroy
arcgisViewLayerviewDestroy: ViewLayerviewDestroyEvent
Fires after a LayerView is destroyed and is no longer rendered in the view.
arcgisViewMouseWheel
arcgisViewMouseWheel: ViewMouseWheelEvent
Fires when a wheel button of a pointing device (typically a mouse) is scrolled on the view.
arcgisViewPointerDown
arcgisViewPointerDown: ViewPointerDownEvent
Fires after a mouse button is pressed, or a finger touches the display.
arcgisViewPointerEnter
arcgisViewPointerEnter: ViewPointerEnterEvent
Fires after a mouse cursor enters the view, or a display touch begins.
arcgisViewPointerLeave
arcgisViewPointerLeave: ViewPointerLeaveEvent
Fires after a mouse cursor leaves the view, or a display touch ends.
arcgisViewPointerMove
arcgisViewPointerMove: ViewPointerMoveEvent
Fires after the mouse or a finger on the display moves.
arcgisViewPointerUp
arcgisViewPointerUp: ViewPointerUpEvent
Fires after a mouse button is released, or a display touch ends.