Components
Chart
Tag: <we-chart>
Standard module: we_chart
Renders an Apache ECharts chart from a saved report or a standalone object. Report chart settings can be saved from its settings panel.
Features
- Supports bar, line, area, pie, donut, scatter, and funnel charts.
- Can chart a saved report or object directly; report settings save automatically and standalone settings stay local.
- Exposes
setSettingsOpen()and emits chart settings events.
Public parameters
| JavaScript property | HTML attribute | Type | Initial value | Purpose |
|---|---|---|---|---|
reportId |
report-id |
String | '' |
Saved Report ID; loads its filters and data sources. |
objectId |
object-id |
String | '' |
Object API name or key prefix for a standalone chart. |
chartType |
chart-type |
String | 'bar' |
bar, line, area, pie, donut, scatter, or funnel. |
categoryField |
category-field |
String | '' |
Alias for xField. |
measureField |
measure-field |
String | '' |
Alias for yField. |
aggregate |
aggregate |
String | '' |
Alias for aggregation. |
xField |
x-field |
String | '' |
Category or X axis field. |
yField |
y-field |
String | '' |
Measure or Y axis field. |
aggregation |
aggregation |
String | 'count' |
count, sum, avg, min, max, or count_distinct. |
seriesField |
series-field |
String | '' |
Field used to split chart series. |
dateGrain |
date-grain |
String | 'none' |
none, day, week, month, quarter, or year. |
sort |
sort |
String | 'value-desc' |
Sort categories by value or label. |
limit |
limit |
Number | 10 |
Maximum categories, clamped to 1–100. |
title |
title |
String | '' |
Chart title. |
height |
height |
Number | 360 |
Chart height in pixels, clamped to 220–800. |
orientation |
orientation |
String | 'vertical' |
vertical or horizontal. |
stacked |
stacked |
Boolean | false |
Stack bar, line, or area series. |
smooth |
smooth |
Boolean | false |
Smooth line or area curves. |
showLabels |
show-labels |
Boolean | false |
Show point or category labels. |
showLegend |
show-legend |
Boolean | true |
Show the legend. |
showTooltip |
show-tooltip |
Boolean | true |
Show hover tooltips. |
showZoom |
show-zoom |
Boolean | false |
Show axis zoom controls. |
palette |
palette |
String | 'platform' |
platform, cool, or warm. |
active |
active |
Boolean | false |
Show the saved report chart above the report. |
showSettings |
show-settings |
Boolean | false |
Show the chart settings icon. |
Public methods
setSettingsOpen()is exposed by@apiFunction.refreshChart()is exposed by@apiFunction.
Events
chart-logic-changedis emitted as a DOM custom event.chart-point-selectis emitted as a DOM custom event.chart-settings-visibilityis emitted as a DOM custom event.
Page-builder availability declared in package metadata: WE__RecordPage, WE__AppPage.
Source: working/environment_modules/standard/we_chart/WebComponent/WeChart.js.