Skip to content

Link Chart

ESM:
Use dark colors for code blocksCopy
1
import "@arcgis/map-components/components/arcgis-link-chart";
CDN:
No specific import is needed for this component.
Since:ArcGIS Maps SDK for JavaScript 4.32

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

PropertyAttributeType
ReadonlyCollection<LayerView>
analysesCollection<Analysis>
animationsDisabledanimations-disabledboolean
ariaDOMContainerAria
autoDestroyDisabledauto-destroy-disabledboolean
backgroundColorBackground
basemapbasemapBasemap | string
basemapViewBasemapView
centercenterArray<number> | Point | string
constraintsView2DConstraints
displayFilterDisableddisplay-filter-disabledboolean
extentExtent
fatalErrorError
graphicsCollection<Graphic>
HighlightOptions
highlightsCollection<HighlightOptions>
interacting
readonly
boolean
itemId
reflected
item-idstring
layerViews
readonly
Collection<LayerView>
loadErrorSourcesArray<WebLinkChart | Basemap | Ground | Layer | WebMap | WebScene>
magnifier
readonly
Magnifier
mapWebLinkChart
navigating
readonly
boolean
navigationNavigation
paddingViewPadding
popupPopup
popupDisabledpopup-disabledboolean
ready
readonly
boolean
resizeAlignresize-align"bottom" | "bottom-left" | "bottom-right" | "center" | "left" | "right" | "top" | "top-left" | "top-right"
resolution
readonly
number
rotationrotationnumber
scalescalenumber
spatialReferenceSpatialReference
stationary
readonly
boolean
suspended
readonlyreflected
suspendedboolean
themeTheme
timeExtentTimeExtent
timeZonetime-zonestring
updating
readonly
boolean
view
readonly
LinkChartView
viewpointViewpoint
zoomzoomnumber

allLayerViews

readonlyProperty
allLayerViews: ReadonlyCollection<LayerView>

Collection containing a flat list of all the created LayerViews related to the basemap, operational layers, and group layers in this view.

analyses

Property
analyses: Collection<Analysis>
Since:ArcGIS Maps SDK for JavaScript 4.34Link Chart since 4.32, analyses added at 4.34.

A collection of analyses associated with the view.

Read more...

animationsDisabled

Property
animationsDisabled: boolean
Since:ArcGIS Maps SDK for JavaScript 4.34Link Chart since 4.32, animationsDisabled added at 4.34.

Indicates whether animations are disabled in the view. This includes animated symbols (animated CIMSymbol, PictureMarkerSymbol from a GIF/animated PNG), animated renderers (FlowRenderer), animated layers (MediaLayer, VideoLayer), and animations triggered by view navigation (for example, goTo()). Setting this property to true disables all animations in the view.

Attribute
animations-disabled
Default value
false

aria

Property
aria: DOMContainerAria
Since:ArcGIS Maps SDK for JavaScript 4.34Link Chart since 4.32, aria added at 4.34.

The ARIA attributes for the view container. Provides accessibility information to assistive technologies such as screen readers. Supports the following properties: label, description, describedByElements, and labelledByElements.

autoDestroyDisabled

Property
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

Property
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

Property
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

Property
basemapView: BasemapView

Represents the view for a single basemap after it has been added to the link chart.

center

Property
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

Property
constraints: View2DConstraints

Specifies constraints to scale, zoom, and rotation that may be applied to the LinkChartView.

displayFilterDisabled

Property
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

Property
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

Property
fatalError: Error

A rejected view indicates a fatal error making it unable to display.

graphics

Property
graphics: Collection<Graphic>

Allows for adding graphics directly to the default graphics in the View.

Examples
Use dark colors for code blocksCopy
1
2
// Adds a graphic to the View
graphics.add(pointGraphic);
Use dark colors for code blocksCopy
1
2
// Removes a graphic from the View
graphics.remove(pointGraphic);

highlightOptions

deprecatedProperty
highlightOptions: HighlightOptions
Deprecatedsince version 4.32.

Use the highlights property instead.

Options for configuring the highlight.

highlights

Property

The highlights property is a collection of HighlightGroup objects that allow you to visually emphasize specific features on the link chart.

interacting

readonlyProperty
interacting: boolean

Indication whether the view is being interacted with (for example when panning or by an interactive tool).

Default value
false

itemId

reflected
Property
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 Link Chart component loads.

Attribute
item-id

layerViews

readonlyProperty
layerViews: Collection<LayerView>

A collection containing a hierarchical list of all the created LayerViews of the operational layers in the link chart.

loadErrorSources

Property
loadErrorSources: Array<WebLinkChart | Basemap | Ground | Layer | WebMap | WebScene>
Since:ArcGIS Maps SDK for JavaScript 4.34Link Chart since 4.32, loadErrorSources added at 4.34.

An array of objects that encountered an error while loading the component or any of its dependencies (e.g., basemap, ground, layers, tables). You may inspect the errors by accessing each object's loadError property.

magnifier

readonlyProperty
magnifier: Magnifier

The magnifier allows for showing a portion of the view as a magnifier image on top of the view.

map

Property

An instance of a WebLinkChart object to display in the view.

readonlyProperty
navigating: boolean

Indication whether the view is being navigated (for example when panning).

Default value
false
Property
navigation: Navigation

Options to configure the navigation behavior of the View.

padding

Property
padding: ViewPadding

Use the padding property to make the center, and extent, etc.

Default value
{left: 0, top: 0, right: 0, bottom: 0}
Property
popup: Popup

A Popup object that displays general content or attributes from layers in the map.

Read more...

popupDisabled

Property
popupDisabled: boolean

Controls whether the popup opens automatically when users click on the view.

Attribute
popup-disabled
Default value
false

ready

readonlyProperty
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

Property
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

readonlyProperty
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

Property
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

Property
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

Property
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

readonlyProperty
stationary: boolean

Indication whether the view is animating, being navigated with or resizing.

Default value
false

suspended

readonlyreflected
Property
suspended: boolean

Indicates if the view is visible on the page.

Attribute
suspended
Default value
true

theme

Property
theme: Theme

This property specifies the base colors used by some widgets and components to render graphics and labels.

Default value
null

timeExtent

Property
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

Property
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

readonlyProperty
updating: boolean

Indicates whether the view is being updated by additional data requests to the network, or by processing received data.

Default value
false

view

readonlyProperty

Internal view of the component.

viewpoint

Property
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

Property
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

MethodSignature
addLayer
deprecated
addLayer(layer: __esri.Layer | Promise<any>, index?: number): Promise<void>
addLayers
deprecated
addLayers(layers: __esri.Layer[], index?: number): Promise<void>
closePopupclosePopup(): Promise<void>
componentOnReadycomponentOnReady(): Promise<void>
destroydestroy(): Promise<void>
goTogoTo(target: __esri.GoToTarget2D, options?: __esri.GoToOptions2D): Promise<unknown>
openPopupopenPopup(options?: __esri.PopupViewOpenPopupOptions): Promise<void>
toMaptoMap(screenPoint: __esri.MapViewScreenPoint | MouseEvent): __esri.Point
toScreentoScreen(point: __esri.Point, options?: __esri.ToScreenOptions2D): __esri.MapViewScreenPoint | nullish
tryFatalErrorRecoverytryFatalErrorRecovery(): Promise<void>
viewOnReadyviewOnReady(callback?: (): void, errback?: (error: Error) => void): Promise<void>
whenAnalysisViewwhenAnalysisView(analysis: __esri.Analysis): Promise<__esri.AnalysisView2DUnion>
whenLayerViewwhenLayerView(layer: __esri.Layer): Promise<__esri.LayerView>

addLayer

deprecatedMethod
addLayer(layer: __esri.Layer | Promise<any>, index?: number): Promise<void>
Deprecatedsince 4.33, use element.map.add(layer) instead.

Adds a layer to the map layers collection.

Parameters
ParameterTypeOptional?
layerLayer | Promise<any>
indexnumber | undefined
Returns
Promise<void>

addLayers

deprecatedMethod
addLayers(layers: __esri.Layer[], index?: number): Promise<void>
Deprecatedsince 4.33, use element.map.addMany([layer]) instead.

Adds a layer or array of layers to the map layers collection.

Parameters
ParameterTypeOptional?
layersArray<Layer>
indexnumber | undefined
Returns
Promise<void>

closePopup

Method
closePopup(): Promise<void>

Closes the popup.

Returns
Promise<void>

componentOnReady

Method
componentOnReady(): Promise<void>

Create a promise that resolves once component is fully loaded.

Example
Use dark colors for code blocksCopy
1
2
3
4
const arcgisLinkChart = document.querySelector("arcgis-link-chart");
document.body.append(arcgisLinkChart);
await arcgisLinkChart.componentOnReady();
console.log("arcgis-link-chart is ready to go!");
Returns
Promise<void>

destroy

Method
destroy(): Promise<void>

Destroys the view, and any associated resources, including its map, popup, and UI elements.

Returns
Promise<void>

goTo

Method
goTo(target: __esri.GoToTarget2D, options?: __esri.GoToOptions2D): Promise<unknown>

Sets the view to a given target.

Parameters
ParameterTypeOptional?
targetany
optionsGoToOptions2D | undefined
Returns
Promise<unknown>

openPopup

Method
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
ParameterTypeOptional?
optionsPopupViewOpenPopupOptions | undefined
Returns
Promise<void>

toMap

Method
toMap(screenPoint: __esri.MapViewScreenPoint | MouseEvent): __esri.Point
Parameters
ParameterTypeOptional?
screenPointMapViewScreenPoint | MouseEvent
Returns
Point

toScreen

Method
toScreen(point: __esri.Point, options?: __esri.ToScreenOptions2D): __esri.MapViewScreenPoint | nullish
Parameters
ParameterTypeOptional?
pointPoint
optionsToScreenOptions2D | undefined
Returns
MapViewScreenPoint | null | undefined

tryFatalErrorRecovery

Method
tryFatalErrorRecovery(): Promise<void>

Call this method to clear any fatal errors resulting from a lost WebGL context.

Returns
Promise<void>

viewOnReady

Method
viewOnReady(callback?: (): void, errback?: (error: Error) => void): Promise<void>
Since:ArcGIS Maps SDK for JavaScript 4.33Link Chart since 4.32, viewOnReady added at 4.33.

viewOnReady() may be leveraged once an instance of the component and its underlying view is created and ready. This method takes two input parameters, a callback function and an errback function, and returns a promise. The callback executes when the promise resolves, and the errback executes if the promise is rejected.

See also
Example
Use dark colors for code blocksCopy
1
2
3
const viewElement = document.querySelector("arcgis-link-chart");
await viewElement.viewOnReady();
// The view is now ready to be used.
Parameters
ParameterTypeOptional?
callback((() => void)) | undefined
errback(((error: Error) => void)) | undefined
Returns
Promise<void>

whenAnalysisView

Method
whenAnalysisView(analysis: __esri.Analysis): Promise<__esri.AnalysisView2DUnion>
Since:ArcGIS Maps SDK for JavaScript 4.34Link Chart since 4.32, whenAnalysisView added at 4.34.

Gets the analysis view created for the given analysis object.

Read more

Parameters
ParameterTypeOptional?
analysisAnalysis
Returns
Promise<ElevationProfileAnalysisView2D>

whenLayerView

Method
whenLayerView(layer: __esri.Layer): Promise<__esri.LayerView>

Gets the LayerView created on the view for the given layer.

Parameters
ParameterTypeOptional?
layerLayer
Returns
Promise<LayerView>

Events

arcgisLoadError

Event
arcgisLoadError: CustomEvent<void>
Since:ArcGIS Maps SDK for JavaScript 4.34Link Chart since 4.32, arcgisLoadError added at 4.34.

Fires when a ArcgisLinkChart fails to load or if one of its dependencies fails to load (e.g., basemap, ground, layers).

See also
Example
Use dark colors for code blocksCopy
1
2
3
viewElement.addEventListener("arcgisLoadError", () => {
  console.log(viewElement.loadErrorSources);
});
bubbles
composed
cancelable

arcgisViewAnalysisViewCreate

Event
arcgisViewAnalysisViewCreate: CustomEvent<ViewAnalysisViewCreateEvent>
Since:ArcGIS Maps SDK for JavaScript 4.34Link Chart since 4.32, arcgisViewAnalysisViewCreate added at 4.34.

Fires when the view for an analysis is created.

Read more

bubbles
composed
cancelable

arcgisViewAnalysisViewCreateError

Event
arcgisViewAnalysisViewCreateError: CustomEvent<ViewAnalysisViewCreateErrorEvent>
Since:ArcGIS Maps SDK for JavaScript 4.34Link Chart since 4.32, arcgisViewAnalysisViewCreateError added at 4.34.

Fires when an error occurs during the creation of an analysis view after an analysis is added to the view.

Read more

bubbles
composed
cancelable

arcgisViewAnalysisViewDestroy

Event
arcgisViewAnalysisViewDestroy: CustomEvent<ViewAnalysisViewDestroyEvent>
Since:ArcGIS Maps SDK for JavaScript 4.34Link Chart since 4.32, arcgisViewAnalysisViewDestroy added at 4.34.

Fires after an analysis view is destroyed.

Read more

bubbles
composed
cancelable

arcgisViewChange

Event
arcgisViewChange: CustomEvent<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.

bubbles
composed
cancelable

arcgisViewClick

Event
arcgisViewClick: CustomEvent<ViewClickEvent>

Fires after a user clicks on the view.

bubbles
composed
cancelable

arcgisViewDoubleClick

Event
arcgisViewDoubleClick: CustomEvent<ViewDoubleClickEvent>

Fires after double-clicking on the view.

bubbles
composed
cancelable

arcgisViewDrag

Event
arcgisViewDrag: CustomEvent<ViewDragEvent>

Fires during a pointer drag on the view.

bubbles
composed
cancelable

arcgisViewHold

Event
arcgisViewHold: CustomEvent<ViewHoldEvent>

Fires during a pointer drag on the view.

bubbles
composed
cancelable

arcgisViewImmediateClick

Event
arcgisViewImmediateClick: CustomEvent<ViewImmediateClickEvent>

Fires right after a user clicks on the view.

bubbles
composed
cancelable

arcgisViewImmediateDoubleClick

Event
arcgisViewImmediateDoubleClick: CustomEvent<ViewImmediateDoubleClickEvent>

Is emitted after two consecutive immediate-click events.

bubbles
composed
cancelable

arcgisViewKeyDown

Event
arcgisViewKeyDown: CustomEvent<ViewKeyDownEvent>

Fires after a keyboard key is pressed.

bubbles
composed
cancelable

arcgisViewKeyUp

Event
arcgisViewKeyUp: CustomEvent<ViewKeyUpEvent>

Fires after a keyboard key is pressed.

bubbles
composed
cancelable

arcgisViewLayerviewCreate

Event
arcgisViewLayerviewCreate: CustomEvent<ViewLayerviewCreateEvent>

Fires after each layer in the link chart has a corresponding LayerView created and rendered in the view.

bubbles
composed
cancelable

arcgisViewLayerviewCreateError

Event
arcgisViewLayerviewCreateError: CustomEvent<ViewLayerviewCreateErrorEvent>

Fires when an error emits during the creation of a LayerView after a layer has been added to the link chart.

bubbles
composed
cancelable

arcgisViewLayerviewDestroy

Event
arcgisViewLayerviewDestroy: CustomEvent<ViewLayerviewDestroyEvent>

Fires after a LayerView is destroyed and is no longer rendered in the view.

bubbles
composed
cancelable

arcgisViewMouseWheel

Event
arcgisViewMouseWheel: CustomEvent<ViewMouseWheelEvent>

Fires when a wheel button of a pointing device (typically a mouse) is scrolled on the view.

bubbles
composed
cancelable

arcgisViewPointerDown

Event
arcgisViewPointerDown: CustomEvent<ViewPointerDownEvent>

Fires after a mouse button is pressed, or a finger touches the display.

bubbles
composed
cancelable

arcgisViewPointerEnter

Event
arcgisViewPointerEnter: CustomEvent<ViewPointerEnterEvent>

Fires after a mouse cursor enters the view, or a display touch begins.

bubbles
composed
cancelable

arcgisViewPointerLeave

Event
arcgisViewPointerLeave: CustomEvent<ViewPointerLeaveEvent>

Fires after a mouse cursor leaves the view, or a display touch ends.

bubbles
composed
cancelable

arcgisViewPointerMove

Event
arcgisViewPointerMove: CustomEvent<ViewPointerMoveEvent>

Fires after the mouse or a finger on the display moves.

bubbles
composed
cancelable

arcgisViewPointerUp

Event
arcgisViewPointerUp: CustomEvent<ViewPointerUpEvent>

Fires after a mouse button is released, or a display touch ends.

bubbles
composed
cancelable

arcgisViewReadyChange

Event
arcgisViewReadyChange: CustomEvent<void>

This event is for the ready property and will be emitted when the view is ready. This event will also emit if the map property is changed.

bubbles
composed
cancelable

arcgisViewReadyError

Event
arcgisViewReadyError: CustomEvent<void>
Since:ArcGIS Maps SDK for JavaScript 4.34Link Chart since 4.32, arcgisViewReadyError added at 4.34.

Fires if the view encounters a content or rendering error.

Example
Use dark colors for code blocksCopy
1
2
3
viewElement.addEventListener("arcgisViewReadyError", () => {
  // handle error
});
bubbles
composed
cancelable

Slots

NameDescription
default(unnamed)

Default slot for adding components to the link chart. User is responsible for positioning the content via CSS.

top-left

Slot for components positioned in the top-left corner.

top-right

Slot for components positioned in the top-right corner.

bottom-left

Slot for components positioned in the bottom-left corner.

bottom-right

Slot for components positioned in the bottom-right corner.

top-start

Slot for components positioned at the top-start (top-left in LTR, top-right in RTL).

top-end

Slot for components positioned at the top-end (top-right in LTR, top-left in RTL).

bottom-start

Slot for components positioned at the bottom-start (bottom-left in LTR, bottom-right in RTL).

bottom-end

Slot for components positioned at the bottom-end (bottom-right in LTR, bottom-left in RTL).

popup

Slot for the Popup component to open automatically on click. When using this slot, the popup-disabled attribute must be set to true. Only the Popup component can be placed in this slot.

default (unnamed)

Slot

Default slot for adding components to the link chart. User is responsible for positioning the content via CSS.

top-left

Slot

Slot for components positioned in the top-left corner.

top-right

Slot

Slot for components positioned in the top-right corner.

bottom-left

Slot

Slot for components positioned in the bottom-left corner.

bottom-right

Slot

Slot for components positioned in the bottom-right corner.

top-start

Slot

Slot for components positioned at the top-start (top-left in LTR, top-right in RTL).

top-end

Slot

Slot for components positioned at the top-end (top-right in LTR, top-left in RTL).

bottom-start

Slot

Slot for components positioned at the bottom-start (bottom-left in LTR, bottom-right in RTL).

bottom-end

Slot

Slot for components positioned at the bottom-end (bottom-right in LTR, bottom-left in RTL).

Slot

Slot for the Popup component to open automatically on click. When using this slot, the popup-disabled attribute must be set to true. Only the Popup component can be placed in this slot.

Styles

NameDescription
--arcgis-layout-overlay-space-top

Since 4.34 Specifies the top padding for the layout.

--arcgis-layout-overlay-space-bottom

Since 4.34 Specifies the bottom padding for the layout.

--arcgis-layout-overlay-space-left

Since 4.34 Specifies the left padding for the layout.

--arcgis-layout-overlay-space-right

Since 4.34 Specifies the right padding for the layout.

Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.