Skip to main content
Version: 2027.02 Beta
View as Markdown

Perspective - Line Scripting

This page details the component-specific events and functions available for Perspective's Line 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 data element in the chart.

event.color​

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

event.componentType​

  • Object Path
    • event.componentType
  • Type
    • String
  • Description
    • Type of element clicked. For example, series, markPoint.

event.data​

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

event.dataIndex​

  • Object Path
    • event.dataIndex
  • Type
    • Integer
  • Description
    • Zero-based data item index.

event.name​

  • Object Path
    • event.name
  • Type
    • String
  • Description
    • Category or data item name.

event.selfType​

  • Object Path
    • event.selfType
  • Type
    • String
  • Description
    • line or area when a line or shaded fill is hit instead of a point. Empty otherwise.

event.seriesIndex​

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

event.seriesName​

  • Object Path
    • event.seriesName
  • Type
    • String
  • Description
    • Series name.

event.seriesType​

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

event.value​

  • Object Path
    • event.value
  • Type
    • None
  • Description
    • Numeric value of the data item.

onChartMouseOver​

This event is fired when the user moves the mouse over a data element in the chart.

event.color​

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

event.componentType​

  • Object Path
    • event.componentType
  • Type
    • String
  • Description
    • Type of element clicked. For example, series, markPoint.

event.data​

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

event.dataIndex​

  • Object Path
    • event.dataIndex
  • Type
    • Integer
  • Description
    • Zero-based data item index.

event.name​

  • Object Path
    • event.name
  • Type
    • String
  • Description
    • Category or data item name.

event.selfType​

  • Object Path
    • event.selfType
  • Type
    • String
  • Description
    • line or area when a line or shaded fill is hit instead of a point. Empty otherwise.

event.seriesIndex​

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

event.seriesName​

  • Object Path
    • event.seriesName
  • Type
    • String
  • Description
    • Series name.

event.seriesType​

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

event.value​

  • Object Path
    • event.value
  • Type
    • None
  • Description
    • Numeric value of the data item.

onChartMouseOut​

This event is fired when the user moves the mouse out of a data element in the chart.

event.color​

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

event.componentType​

  • Object Path
    • event.componentType
  • Type
    • String
  • Description
    • Type of element clicked. For example, series, markPoint.

event.data​

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

event.dataIndex​

  • Object Path
    • event.dataIndex
  • Type
    • Integer
  • Description
    • Zero-based data item index.

event.name​

  • Object Path
    • event.name
  • Type
    • String
  • Description
    • Category or data item name.

event.selfType​

  • Object Path
    • event.selfType
  • Type
    • String
  • Description
    • line when a line is hit instead of a point. Empty otherwise.

event.seriesIndex​

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

event.seriesName​

  • Object Path
    • event.seriesName
  • Type
    • String
  • Description
    • Series name.

event.seriesType​

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

event.value​

  • Object Path
    • event.value
  • Type
    • None
  • Description
    • Numeric value of the data item.

onChartHighlight​

This event is fired when the user highlights data in the chart.

event.dataIndex​

  • Object Path
    • event.dataIndex
  • Type
    • Integer
  • Description
    • Zero-based data item index.

event.seriesType​

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

event.type​

  • Object Path
    • event.type
  • Type
    • String
  • Description
    • Type of event: highlight.

onChartDownplay​

This event is fired when the user shrinks or condenses chart data due to stretching axis limits.

event.dataIndex​

  • Object Path
    • event.dataIndex
  • Type
    • Integer
  • Description
    • Zero-based data item index.

event.seriesIndex​

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

event.type​

  • Object Path
    • event.type
  • Type
    • String
  • Description
    • Type of event: downplay.

onChartLegendSelectChanged​

This event is fired when the user toggles the legend button.

event.name​

  • Object Path
    • event.name
  • Type
    • String
  • Description
    • Category or data item name.

event.selected​

  • Object Path
    • event.selected
  • Type
    • Dictionary
  • Description
    • Table of all legend selecting states.

event.type​

  • Object Path
    • event.type
  • Type
    • String
  • Description
    • Type of event: legendselectchanged.

onChartDataZoom​

This event is fired when the user zooms in on the data area.

event.end​

  • Object Path
    • event.end
  • Type
    • Integer
  • Description
    • Percentage of zoom finish position, 0 - 100.

event.endValue​

  • Object Path
    • event.endValue
  • Type
    • Integer
  • Description
    • Data value of zoom finish position; only exists in zoom event of triggered by toolbar.

event.start​

  • Object Path
    • event.start
  • Type
    • Integer
  • Description
    • Percentage of zoom start position, 0 - 100.

event.startValue​

  • Object Path
    • event.endValue
  • Type
    • Integer
  • Description
    • Data value of zoom start position; only exists in zoom event of triggered by toolbar.

event.type​

  • Object Path
    • event.type
  • Type
    • String
  • Description
    • Type of event: datazoom.

Component Functions​

This component does not have Component Functions associated with it.

Extension Functions​

This component does not have Extension Functions associated with it.