Skip to main content
Version: 2027.02 Beta
View as Markdown

Perspective - Bar Scripting

This page details the component specific events and functions available for Perspective's Sankey component. Right-click on the component or select Components from the Designer menubar to access the Configure Events and Configure Scripts popups.

Component Events​

The Perspective Event Types Reference page describes all the possible component event types for Perspective components.

onChartClick​

This event is fired when the user clicks on a node or link in the chart.

event.color​

  • Object Path
    • event.color
  • Type
    • String
  • Description
    • Color of the clicked element.

event.componentType​

  • Object Path
    • event.componentType
  • Type
    • String
  • Description
    • Chart component type (always series for chart elements).

event.data​

  • Object Path
    • event.data
  • Type
    • Null
  • Description
    • Raw data item value, full node or link object.

event.dataIndex​

  • Object Path
    • event.dataIndex
  • Type
    • Integer
  • Description
    • Zero-based index of the clicked element.

event.dataType​

  • Object Path
    • event.dataType
  • Type
    • String
  • Description
    • Will be node when a node was clicked and edge when a link was clicked.

event.name​

  • Object Path
    • event.name
  • Type
    • String
  • Description
    • Node name (maps to data.nodes[x].name). Empty for edge clicks.

event.seriesIndex​

  • Object Path
    • event.seriesIndex
  • Type
    • Integer
  • Description
    • Zero-based series index.

event.seriesName​

  • Object Path
    • event.seriesName
  • Type
    • String
  • Description
    • The name of the series.

event.seriesType​

  • Object Path
    • event.seriesType
  • Type
    • String
  • Description
    • Series type: sankey.

event.value​

  • Object Path
    • event.value
  • Type
    • Null
  • Description
    • Numeric value of the clicked element.

onChartMouseOver​

This event is fired when the user moves the mouse over a node or link.

event.color​

  • Object Path
    • event.color
  • Type
    • String
  • Description
    • Color of the hovered element.

event.componentType​

  • Object Path
    • event.componentType
  • Type
    • String
  • Description
    • Chart component type.

event.data​

  • Object Path
    • event.data
  • Type
    • Null
  • Description
    • Raw data item value.

event.dataIndex​

  • Object Path
    • event.dataIndex
  • Type
    • Integer
  • Description
    • Zero-based index of the hovered element.

event.dataType​

  • Object Path
    • event.dataType
  • Type
    • String
  • Description
    • Will be node when hovering a node and edge when hovering a link.

event.name​

  • Object Path
    • event.name
  • Type
    • String
  • Description
    • Node name. Empty for edge hover.

event.seriesIndex​

  • Object Path
    • event.seriesIndex
  • Type
    • Integer
  • Description
    • Zero-based series index.

event.seriesName​

  • Object Path
    • event.seriesName
  • Type
    • String
  • Description
    • The name of the series.

event.seriesType​

  • Object Path
    • event.seriesType
  • Type
    • String
  • Description
    • Series type: sankey.

event.value​

  • Object Path
    • event.value
  • Type
    • Null
  • Description
    • Numeric value of the hovered element.

onChartMouseOut​

This event is fired when the user moves the mouse out of a node or link.

event.color​

  • Object Path
    • event.color
  • Type
    • String
  • Description
    • Color of the element.

event.componentType​

  • Object Path
    • event.componentType
  • Type
    • String
  • Description
    • Chart component type.

event.data​

  • Object Path
    • event.data
  • Type
    • Null
  • Description
    • Raw data item value.

event.dataIndex​

  • Object Path
    • event.dataIndex
  • Type
    • Integer
  • Description
    • Zero-based index of the element.

event.dataType​

  • Object Path
    • event.dataType
  • Type
    • String
  • Description
    • Will be node when leaving a node and edge when leaving a link.

event.name​

  • Object Path
    • event.name
  • Type
    • String
  • Description
    • Node name. Empty for edge mouseout.

event.seriesIndex​

  • Object Path
    • event.seriesIndex
  • Type
    • Integer
  • Description
    • Zero-based series index.

event.seriesName​

  • Object Path
    • event.seriesName
  • Type
    • String
  • Description
    • The name of the series.

event.seriesType​

  • Object Path
    • event.seriesType
  • Type
    • String
  • Description
    • Series type: sankey.

event.value​

  • Object Path
    • event.value
  • Type
    • Null
  • Description
    • Numeric value of the element.

Component Functions​

This component does not have Component Functions associated with it.

Extension Functions​

This component does not have Extension Functions associated with it.