Perspective - Area

Component Palette Icon:
The Area component provides a way to communicate volume or magnitude in addition to trend direction. Similar to a Line component, each pen (an individual data series) in an Area component is independently bound to a data field and independently styled. Multiple pens can coexist on the same chart, share or split y-axes, and be configured with entirely different visual behaviors without any coupling between them.
The Area component has three pre-configured variants:
- Basic: A line chart with the area beneath each series filled in. Communicates volume or magnitude with trend direction.
- Pieces: An area chart where the fill beneath the line is applied conditionally based on threshold rules. It combines the visual weight of an area chart with the operational context of conditional coloring.
- Stacked: A multi-series area chart where each series is stacked on top of the previous, with the combined height representing the total across all series. Common for visualizing part-to-whole relationships over time, such as energy consumption by source or production by line.
Properties​
Most Properties have binding options. For more information on Bindings, see Types of Bindings in Perspective. This section only documents the Props Category of properties. The other Categories are described on the Perspective Component Properties page.
| Name | Description | Property Type |
|---|---|---|
| data | Dataset powering the chart. Structured as an array of objects where each key represents a field that each series can reference by name. | array |
| series | A set of related data points. One object per pen. Each series is fully independent. See series Properties for more array properties. | array |
| stackGroups | A series in the same group to stack on top of one another. Stacked in the order declared, not in the order listed in this array. Leave empty to draw every series on its own. | array |
| xAxis | Configuration and styling options for the horizontal axis. See xAxis Properties for more details. | object |
| yAxis | Configuration and styling options for the vertical axis. See yAxis Properties for more details. | array |
| title | Chart title and subtitle. See title Properties for more object properties. | object |
| legend | Configures how the chart legend displays.
| object |
| visualMap | Global conditional styling rules applied across all series. When enabled, overrides each series' line.color and line.type based on where the value falls within the defined threshold ranges. Applicable to the Pieces Area chart variant. See visualMap Properties for more object properties. | object |
| zoom | Zoom and pan behavior. Allows users to zoom along the x-axis, y-axis, or both.
| object |
| tooltip | The tooltip text shown on hover. Can be overriden by series.advanced.tooltip.
| object |
| axisPointer | The line or crosshair that follows the hovered point along the axes, and the label it can print along the axes. See axisPointer Properties for more object properties. | object |
| appearance | Visual configuration of the chart. Series-level properties take precedence when overlap occurs. See appearance Properties for more object properties. | object |
| style | Style configuration for the chart. | object |
series Properties​
| Name | Description | Property Type |
|---|---|---|
| label | The series display name. The label is visible in the legend and tooltips. | string |
| value | Field key from data to plot on the y-axis. | string |
| line | Configures the line stroke for the series.
| object |
| smooth | The segment interpolation is curved when true. If false, the interpolation is rigid. | boolean |
| area | Configures the fill area beneath the line.
| object |
| points | Configures the data point dot(s) shown at each value, including styling.
| object |
| dataLabels | The value label randered at each data point.
| object |
| visible | Shows the pen without removing it when true. Default is true. | boolean |
| referenceLines | Renders reference lines at threshold boundaries. This offers a persistent visual indicator of where value transitions occur, independent of the current data. See the series.referenceLines Properties section for more object properties. | object |
| advanced | Configures less commonly used series settings. See the series.advanced Properties section for more object properties. | object |
series.referenceLines Properties​
| Name | Description | Property Type |
|---|---|---|
| animation | Configures reference line entry and transition animations.
| object |
| endpoints | Configures the dots drawn at the two ends of a reference line, including styling.
| object |
| items | Ordered list of reference items. | array |
series.advanced Properties​
| Name | Description | Property Type |
|---|---|---|
| yAxis | Enables dual-axis layouts, and determines which y-axis the series binds to. | number |
| stackGroup | Series sharing this key are stacked. Only applicable when area.enabled is true. | string |
| connectNulls | Connects the line across null or missing values when true. Default is false. | boolean |
| step | Render as a step line at the start, middle, or end. Leave empty to disable step rendering. | string |
| tooltip | Tooltip text settings for a single pen. When tooltip.trigger is set to item, all settings under this property will apply to the single pen tooltip. When set to axis, every pen along the axis shares one tooltip, so enabled and formatter will only apply to this row.
| object |
xAxis Properties​
| Name | Description | Property Type |
|---|---|---|
| type | Axis scale type. Set to value to enable function (x,y) plotting. | string |
| field | Default x-axis field for all series. Can be overridden per series via series configuration. | string |
| visible | Shows the x-axis on the chart when true. Default is true. | boolean |
| position | Side of the chart the x-axis renders on. | string |
| title | Configures the x-axis title.
| object |
| min | The start value, or minimum boundary, of the x-axis. Accepts number, string, or auto. | string |
| max | The end value, or maximum boundary, of the x-axis. Accepts number, string, or auto. | string |
| boundaryGap | Configures axis spacing at the data extremes. The categories will be inset from the edges of the axis when true.
| boolean |
| gridLines | Vertical grid line stroke configuration and styling.
| object |
| axisLine | Axis line stroke configuration and styling.
| object |
| ticks | Configures the tick marks along the x-axis.
| object |
| labels | Configures tick label text.
| object |
| elementStyle | Visual style for a shape element rendered onto a chart canvas, including fill, stroke, opacity, shadow, and decoration. | object |
| advanced | Advanced optional settings for the x-axis. See the xAxis.advanced Properties section for object properties. | object |
xAxis.advanced Properties​
| Name | Description | Property Type |
|---|---|---|
| axisPointer | Configures axis pointer settings for the x-axis alone. Only the x-axis shows a pointer, unless the chart-level shape is cross, which adds one on the y-axis as well. Turning the pointer off at the chart level will turn it off here as well.
| object |
yAxis Properties​
| Name | Description | Property Type |
|---|---|---|
| visible | Shows the y-axis on the chart when true. Default is true. | boolean |
| title | Configures the y-axis title.
| object |
| min | The start value, or minimum boundary, of the y-axis. Accepts number, string, or auto. | string |
| max | The end value, or maximum boundary, of the y-axis. Accepts number, string, or auto. | string |
| boundaryGap | Axis spacing at the data extremes. The categories are inset from the edges of the axis when true. Default is true.
| boolean |
| gridLines | Horizontal grid line stroke configuration.
| object |
| axisLine | Axis line stroke configuration.
| object |
| ticks | Configures tick marks along the y-axis.
| object |
| labels | Configures tick label text.
| object |
| elementStyle | Visual style for a shape element rendered onto a chart canvas, including fill, stroke, opacity, shadow, and decoration. | object |
| advanced | Advanced optional settings for the y-axis. See the yAxis.advanced Properties section for object properties. | object |
yAxis.advanced Properties​
| Name | Description | Property Type |
|---|---|---|
| axisPointer | Configures axis pointer settings for the y-axis alone. Only the x-axis shows a pointer, unless the chart-level shape is cross, which adds one on the y-axis as well. Turning the pointer off at the chart level will turn it off here as well.
| object |
title Properties​
| Name | Description | Property Type |
|---|---|---|
| visible | Shows the chart title when true. Default is true. | boolean |
| text | Main title text. | string |
| color | Color of the main title text. Takes precedence over elementStyle.color when both are set. Can be chosen from color wheel, chosen from color palette, or entered as RGB or HSL value. See Color Selector. | color |
| fontSize | Font size of the main title text. Takes precedence over elementStyle.fontSize when both are set. | number |
| subtitle | Configures the subtitle displayed beneath the main title.
| object |
| position | Position of the title within the chart. | string |
| gap | Pixel gap between the main title and subtitle. | number |
| elementStyle | Visual style for a shape element rendered onto a chart canvas, including fill, stroke, opacity, shadow, and decoration. | object |
visualMap Properties​
| Name | Description | Property Type |
|---|---|---|
| enabled | Enables conditional styling for all series on the chart when true. Default is false for the Basic and Stacked variants. Default is true for the Pieces variant. | boolean |
| dimension | Specifies which data dimension each point's min/max values are compared against, and in what units those bounds are expressed in. See the pieces.min property for more on how each axis type will read bounds.
| string |
| pieces | Ordered list of threshold rules applied globally across all series. The last entry in this array will treat its max as inclusive. Points that do not match a piece are styled by the outOfRange property instead. | array |
| outOfRange | Configures the appearance of data that no threshold range applies to. When data is out of range, the value falls outside of each configured range, or the range is toggled off in the visualMap.legend property. | object |
| legend | Configures the legend that displays each piece and range when visualMap is enabled. This legend is distinct from the chart main legend.
| object |
axisPointer Properties​
| Name | Description | Property Type |
|---|---|---|
| enabled | Shows the pointer for users when true. For tooltips, the pointer follows the hovered point even when the tooltip is hidden or tooltip.item is set to trigger. If false, the pointer and label are removed. | boolean |
| type | The pointer shape.
| string |
| label | The label the pointer prints against the axis, showing the hovered x or y value. To change the tooltip formatting, use tooltip.formatter instead.
| object |
appearance Properties​
| Name | Description | Property Type |
|---|---|---|
| colorPalette | The chart color palette. Auto-assigned to the default theme. | array |
| backgroundColor | Chart background fill color. Can be chosen from color wheel, chosen from color palette, or entered as RGB or HSL value. See Color Selector. | color |
| animation | Configures chart-level entry and transition animation.
| object |
Component Scripts and Events​
Further component interaction and functionality can be configured for all components through scripting and event actions. Right-click on the component or select Components from the Designer menubar to access the configuration popups for both of these options:
- Configure Events: Accesses the Event Configuration popup where you can configure actions to run in response to events to make the component dynamic. The Events Configurations page shows how to configure events and actions on a Perspective component.
- Configure Scripts: Accesses the Script Configuration popup where custom methods and message handlers can be added. The Scripting in Perspective section details scripting fundamentals, creating custom methods, and using message handlers.
The Area component also has Component Events associated with it. See the Perspective - Area Scripting page for more information.
Examples​
Basic Area - Weekly Rainfall Example​

[
{
"type": "ia.canvas-charts.area",
"version": 0,
"props": {
"data": [
{
"value": 1,
"day": "Monday"
},
{
"value": 2,
"day": "Tuesday"
},
{
"value": 3,
"day": "Wednesday"
},
{
"value": 0,
"day": "Thursday"
},
{
"value": 1,
"day": "Friday"
},
{
"value": 2,
"day": "Saturday"
},
{
"value": 0,
"day": "Sunday"
}
],
"liveData": false,
"series": [
{
"label": "Rainfall",
"value": "value",
"line": {
"type": "solid",
"width": 2
},
"smooth": false,
"area": {
"fillStyle": "solid",
"color": "",
"opacity": 0.3,
"gradientMode": "fade",
"gradientStart": "#229AD6",
"gradientEnd": "#FFFFFF"
},
"points": {
"visible": false,
"size": 4,
"fillColor": "",
"outlineColor": "transparent",
"outlineWidth": 0,
"shape": "circle"
},
"dataLabels": {
"visible": false,
"position": "top",
"format": "{value}",
"color": "",
"fontSize": "",
"elementStyle": {}
},
"visible": true,
"referenceLines": {
"animation": {
"enabled": true,
"entry": {
"duration": 1000,
"easing": "cubicOut",
"delay": 0
},
"transition": {
"duration": 300,
"easing": "cubicOut",
"delay": 0
}
},
"endpoints": {
"visible": true,
"points": [
{
"size": 4,
"shape": "circle"
}
]
},
"items": []
},
"advanced": {
"yAxis": 0,
"connectNulls": false,
"step": "",
"tooltip": {
"enabled": true,
"formatter": {
"type": "value",
"value": "",
"template": ""
}
}
}
}
],
"xAxis": {
"type": "value",
"field": "day",
"title": {
"text": "Day"
},
"boundaryGap": false
},
"yAxis": [
{
"visible": true,
"title": {
"visible": true,
"text": "Inches",
"color": "",
"fontSize": "",
"position": "middle",
"gap": 15,
"rotation": 0,
"elementStyle": {}
},
"min": "auto",
"max": "auto",
"boundaryGap": true,
"gridLines": {
"visible": false
},
"axisLine": {
"visible": true
},
"ticks": {
"visible": true,
"displayInside": false,
"majorSplit": "auto",
"minorSplit": 0
},
"labels": {
"visible": true,
"color": "",
"fontSize": "",
"rotation": 0,
"width": null,
"overflow": "none",
"elementStyle": {}
},
"advanced": {
"axisPointer": {
"enabled": "auto",
"type": "auto",
"label": {
"visible": "auto",
"color": "",
"fontSize": "",
"backgroundColor": "",
"elementStyle": {}
}
}
}
}
],
"title": {
"text": "Weekly Rainfall",
"position": "top"
}
},
"meta": {
"name": "Area"
},
"position": {
"x": 201,
"y": 174,
"width": 500,
"height": 400
},
"custom": {}
}
]