@amcharts/amcharts5-mcp 1.1.9 → 1.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +98 -0
- package/content/SKILL.md +62 -1
- package/content/gantt.md +3 -3
- package/content/stock.md +4 -3
- package/content/timeline.md +29 -25
- package/content/ui-elements.md +5 -3
- package/content/wordcloud.md +4 -4
- package/content/xy.md +12 -1
- package/extended/examples/maps/map-sankey-series.md +129 -0
- package/extended/reference/hierarchy.md +1 -0
- package/extended/reference/ihierarchysettings.md +1 -0
- package/extended/reference/imovingaveragedeviationsettings.md +2 -1
- package/extended/reference/imovingaveragesettings.md +2 -1
- package/extended/reference/iserpentinechartsettings.md +1 -0
- package/extended/reference/ispiralchartsettings.md +1 -0
- package/extended/reference/itreesettings.md +3 -0
- package/extended/reference/ivalueaxissettings.md +1 -0
- package/extended/reference/ivoronoitreemapsettings.md +2 -1
- package/extended/reference/movingaverage.md +2 -1
- package/extended/reference/movingaveragedeviation.md +2 -1
- package/extended/reference/tree.md +3 -0
- package/extended/reference/valueaxis.md +1 -0
- package/extended/reference/voronoitreemap.md +2 -1
- package/package.json +9 -1
- package/src/content-fs.js +74 -0
- package/src/content.js +214 -0
- package/src/index.js +10 -516
- package/src/tools.js +391 -0
package/README.md
CHANGED
|
@@ -10,6 +10,104 @@ Instead of loading the entire amCharts reference into the AI's context window, t
|
|
|
10
10
|
|
|
11
11
|
## Quick Start
|
|
12
12
|
|
|
13
|
+
The easiest way is the **hosted server** — no install, just add one URL. Prefer to
|
|
14
|
+
run it yourself? See [Local install](#local-install-npx) below.
|
|
15
|
+
|
|
16
|
+
### Hosted (no install) — recommended
|
|
17
|
+
|
|
18
|
+
Point your AI client at:
|
|
19
|
+
|
|
20
|
+
```
|
|
21
|
+
https://mcp.amcharts.com/mcp
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
**Claude Code**
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
claude mcp add --transport http amcharts5 https://mcp.amcharts.com/mcp
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
**Claude Desktop / claude.ai** — Settings → Connectors → **Add custom connector**, then paste `https://mcp.amcharts.com/mcp`.
|
|
31
|
+
|
|
32
|
+
**Cursor** — `.cursor/mcp.json`:
|
|
33
|
+
|
|
34
|
+
```json
|
|
35
|
+
{
|
|
36
|
+
"mcpServers": {
|
|
37
|
+
"amcharts5": {
|
|
38
|
+
"url": "https://mcp.amcharts.com/mcp"
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
**VS Code + GitHub Copilot** — `.vscode/mcp.json`:
|
|
45
|
+
|
|
46
|
+
```json
|
|
47
|
+
{
|
|
48
|
+
"servers": {
|
|
49
|
+
"amcharts5": {
|
|
50
|
+
"type": "http",
|
|
51
|
+
"url": "https://mcp.amcharts.com/mcp"
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
**Windsurf** — `~/.codeium/windsurf/mcp_config.json`:
|
|
58
|
+
|
|
59
|
+
```json
|
|
60
|
+
{
|
|
61
|
+
"mcpServers": {
|
|
62
|
+
"amcharts5": {
|
|
63
|
+
"serverUrl": "https://mcp.amcharts.com/mcp"
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
**ChatGPT** (Plus/Pro/Enterprise with connectors/developer mode enabled) — Settings → **Connectors** → **Add custom connector**, then paste `https://mcp.amcharts.com/mcp`.
|
|
70
|
+
|
|
71
|
+
**Cline** (VS Code extension) — open the **MCP Servers** panel → **Remote Servers**, paste `https://mcp.amcharts.com/mcp`, or add to its MCP settings JSON:
|
|
72
|
+
|
|
73
|
+
```json
|
|
74
|
+
{
|
|
75
|
+
"mcpServers": {
|
|
76
|
+
"amcharts5": {
|
|
77
|
+
"type": "streamableHttp",
|
|
78
|
+
"url": "https://mcp.amcharts.com/mcp"
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
**Clients that only support local (stdio) servers** (e.g. Zed, Continue, Amazon Q Developer) — bridge to the hosted URL with [`mcp-remote`](https://www.npmjs.com/package/mcp-remote). Use this as the server's run command in the client's config:
|
|
85
|
+
|
|
86
|
+
```bash
|
|
87
|
+
npx mcp-remote https://mcp.amcharts.com/mcp
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
For example, in a `command`/`args` style config:
|
|
91
|
+
|
|
92
|
+
```json
|
|
93
|
+
{
|
|
94
|
+
"mcpServers": {
|
|
95
|
+
"amcharts5": {
|
|
96
|
+
"command": "npx",
|
|
97
|
+
"args": ["-y", "mcp-remote", "https://mcp.amcharts.com/mcp"]
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
Any other MCP client that accepts a remote server URL works too — use the `/mcp`
|
|
104
|
+
endpoint (Streamable HTTP) or `/sse` (legacy SSE). For URL-only clients that still
|
|
105
|
+
expect a command, use the `mcp-remote` bridge shown above.
|
|
106
|
+
|
|
107
|
+
## Local install (npx)
|
|
108
|
+
|
|
109
|
+
Prefer running it yourself? The server is also published to npm and runs over stdio.
|
|
110
|
+
|
|
13
111
|
### Claude Code
|
|
14
112
|
|
|
15
113
|
For **all projects** (global, recommended):
|
package/content/SKILL.md
CHANGED
|
@@ -164,6 +164,34 @@ series.set("tooltip", am5.Tooltip.new(root, {
|
|
|
164
164
|
|
|
165
165
|
**Inline formatting:** `"[bold]{name}[/]: [fontSize: 20px]{value}[/]"`
|
|
166
166
|
|
|
167
|
+
**A tooltip with no text renders as an empty bubble.** Enabling a `am5.Tooltip` without `labelText` (or `series.tooltipText`) shows a blank tooltip. Series text lives on `tooltip.labelText` or `series.set("tooltipText", ...)`; for column/bar charts the text usually goes on `series.columns.template.set("tooltipText", "{categoryX}: {valueY}")`.
|
|
168
|
+
|
|
169
|
+
### Styling a tooltip
|
|
170
|
+
|
|
171
|
+
The tooltip background is a **`PointedRectangle`** (NOT a `RoundedRectangle`), so it has a single `cornerRadius` — there are no `cornerRadiusTL/TR/BL/BR`:
|
|
172
|
+
|
|
173
|
+
```js
|
|
174
|
+
const tooltip = am5.Tooltip.new(root, { labelText: "{valueY}" });
|
|
175
|
+
|
|
176
|
+
// Background color + shape — must turn OFF getFillFromSprite, else bg copies the series color
|
|
177
|
+
tooltip.set("getFillFromSprite", false);
|
|
178
|
+
tooltip.get("background").setAll({
|
|
179
|
+
fill: am5.color(0x000000),
|
|
180
|
+
fillOpacity: 0.8,
|
|
181
|
+
stroke: am5.color(0xffffff),
|
|
182
|
+
strokeOpacity: 0.3,
|
|
183
|
+
cornerRadius: 6 // single radius — PointedRectangle, not four corners
|
|
184
|
+
});
|
|
185
|
+
|
|
186
|
+
// Text color — must turn OFF autoTextColor (it auto-picks for contrast), then set on the label
|
|
187
|
+
tooltip.set("autoTextColor", false);
|
|
188
|
+
tooltip.label.setAll({ fill: am5.color(0xffffff) }); // tooltip.label is read-only accessor
|
|
189
|
+
|
|
190
|
+
series.set("tooltip", tooltip);
|
|
191
|
+
```
|
|
192
|
+
|
|
193
|
+
`getStrokeFromSprite` (default `false`) copies the sprite's stroke color when `true`.
|
|
194
|
+
|
|
167
195
|
## Chart title
|
|
168
196
|
|
|
169
197
|
Do NOT add titles as HTML elements — they are outside the canvas and won't appear in exports. Add an `am5.Label` to the container BEFORE the chart, and set `verticalLayout`:
|
|
@@ -358,8 +386,15 @@ sprite.setAll({ fill: am5.color(0xff0000), strokeWidth: 2 });
|
|
|
358
386
|
// Read current value
|
|
359
387
|
const fill = sprite.get("fill");
|
|
360
388
|
const width = sprite.getPrivate("width"); // read-only internal values
|
|
389
|
+
|
|
390
|
+
// set() RETURNS the value — handy for capturing the created object inline:
|
|
391
|
+
const cursor = chart.set("cursor", am5xy.XYCursor.new(root, {}));
|
|
361
392
|
```
|
|
362
393
|
|
|
394
|
+
**Reading back a `Percent`:** a `Percent` exposes two numbers — `.percent` is the 0–100 value, `.value` is the normalized 0–1 fraction. `am5.percent(50).percent === 50` but `am5.percent(50).value === 0.5`. When you read a percent setting back (e.g. `sprite.get("x")` after setting `am5.percent(50)`), use `.percent` for a 0–100 number; `.value` gives `0.5`.
|
|
395
|
+
|
|
396
|
+
**Reading animated settings is unreliable mid-animation.** Right after `series.appear()` / `chart.appear()`, animated settings like `opacity` are still transitioning — `get("opacity")` can return `0` (the start value). Read such settings after the animation completes, or don't persist values read during appear (a common way to accidentally bake `opacity:0` into generated code).
|
|
397
|
+
|
|
363
398
|
## Dynamic data
|
|
364
399
|
|
|
365
400
|
```js
|
|
@@ -639,7 +674,7 @@ onUnmounted(() => { root.dispose(); });
|
|
|
639
674
|
26. **`VoronoiTreemap` has NO `.rectangles` property** — Unlike `Treemap` (which has `series.rectangles.template`), `VoronoiTreemap` renders organic polygon cells. Style via `series.nodes.template` and its children, not `.rectangles`.
|
|
640
675
|
27. **Labels with data placeholders need `populateText: true`** — When a Label uses data field placeholders like `text: "{name}"`, you MUST also set `populateText: true`. Without it, the placeholder is not resolved and the label appears blank. This applies everywhere Labels display dynamic data — bullet labels, map point labels, etc. Example: `am5.Label.new(root, { text: "{name}", populateText: true, ... })`.
|
|
641
676
|
28. **Easing: `am5.ease.in()` does NOT exist** — amCharts 5 provides base easing functions (`am5.ease.cubic`, `am5.ease.bounce`, `am5.ease.elastic`, `am5.ease.linear`, `am5.ease.quad`, `am5.ease.sine`, `am5.ease.circle`, `am5.ease.exp`, `am5.ease.pow`) and three modifiers: `am5.ease.out()`, `am5.ease.inOut()`, `am5.ease.yoyo()`. Usage: `am5.ease.cubic` (ease-in by default), `am5.ease.out(am5.ease.cubic)` (ease-out), `am5.ease.inOut(am5.ease.cubic)` (ease in+out). There is NO `am5.ease.in()` — using it throws a runtime error. The base functions already ease-in by default.
|
|
642
|
-
29.
|
|
677
|
+
29. **`forceHidden` vs `visible`** — `forceHidden: true` ALWAYS hides an element, immune to states, themes/library and even `show()`. `visible` is weaker: amCharts re-manages it on many elements (notably cursor lines, but also labels, ticks, tooltips, grid) in response to interaction or data changes, so a `visible: false` you set may be flipped back to `true`. Rules of thumb: for a **persistent hide**, use `forceHidden: true` (`cursor.lineX.set("forceHidden", true)`, `yRenderer.labels.template.set("forceHidden", true)`, `xRenderer.grid.template.set("forceHidden", true)`). To **reveal** an element that defaults hidden — notably **axis ticks** (`ticks.template` defaults to `visible:false`) — you must raise `visible: true`; flipping `forceHidden` alone won't show it. For cursor lines specifically, always access `cursor.lineX`/`cursor.lineY` after creation — do NOT pass them as constructor options.
|
|
643
678
|
30. **`snapTooltip: true` on series for cursor tooltip snapping** — When using a cursor and you want tooltips to snap to data points, set `snapTooltip: true` on the series in addition to (or instead of) `snapToSeries` on the cursor. This is especially useful for timeline/curve charts.
|
|
644
679
|
31. **Globe rotation uses negative coordinates** — To center the globe (`geoOrthographic`) on a geographic point, set `rotationX` to **-longitude** and `rotationY` to **-latitude**. E.g., to center on Paris (48.86°N, 2.35°E): `chart.animate({ key: "rotationX", to: -2.35 }); chart.animate({ key: "rotationY", to: -48.86 });`. Using positive values rotates the globe the wrong way.
|
|
645
680
|
32. **`positionOnLine` with multi-segment lines limits per-segment control** — `MapPointSeries` data items can animate along a line via `positionOnLine` (0→1). If the line has 3+ points (multi-segment), position 0.5 is the midpoint of the *entire* path, making per-segment effects (scaling at each segment midpoint, pausing between segments, etc.) difficult. For advanced per-segment animations, use **single-segment lines** (2 points each) and animate the bullet across them sequentially. E.g., instead of one line [A,B,C,D], create [A,B], [B,C], [C,D].
|
|
@@ -679,6 +714,32 @@ If you have the ability to run shell commands, validate your generated chart cod
|
|
|
679
714
|
|
|
680
715
|
Skip this step entirely if you cannot execute code (e.g., chat-only context with no tool access).
|
|
681
716
|
|
|
717
|
+
## Recent API changes (newer than the bundled class reference)
|
|
718
|
+
|
|
719
|
+
The bundled per-class API reference was snapshotted on **2026-03-15**, so it predates the changes below. Prefer these names/settings; for anything newer, verify against the live docs (see next section).
|
|
720
|
+
|
|
721
|
+
**Renamed settings (old name still works but is deprecated — use the new one):**
|
|
722
|
+
|
|
723
|
+
| Class(es) | Old | New | Since |
|
|
724
|
+
|-----------|-----|-----|-------|
|
|
725
|
+
| `MovingAverage`, `MovingAverageDeviation`, `MovingAverageEnvelope`, `BollingerBands` | `type` | `maType` | 5.18.0 |
|
|
726
|
+
| `VoronoiTreemap` | `type` | `shapeType` | 5.18.0 |
|
|
727
|
+
|
|
728
|
+
```js
|
|
729
|
+
// Moving-average indicators: use maType, not type
|
|
730
|
+
am5stock.MovingAverage.new(root, { maType: "exponential", period: 20 });
|
|
731
|
+
am5hierarchy.VoronoiTreemap.new(root, { shapeType: "rectangle" }); // was: type
|
|
732
|
+
```
|
|
733
|
+
|
|
734
|
+
**New settings / methods worth knowing:**
|
|
735
|
+
- `Tree`: `fitNodes` (5.18.0, exclude hidden nodes from layout), `nodeSeparation` (5.16.2, custom node-spacing fn), `clustered` (5.16.2, dendrogram layout — leaves at same depth).
|
|
736
|
+
- `ValueAxis`: `syncZeros` (5.16.2, align zero across synced axes — needs `syncWithAxis`).
|
|
737
|
+
- `Hierarchy`: `parentIdField` setting + `setFlatData(data)` method (5.16.2) — feed flat `{id, parentId}` data instead of nested `children`.
|
|
738
|
+
- All entities: `onDebounced(key, cb, delay)` / `offDebounced(key, cb?)` and `onPrivateDebounced` / `offDebouncedPrivate` (5.17.3) — fire once after rapid changes settle.
|
|
739
|
+
- `Label`: `fontFamily: "inherit"` (5.17.3) uses the chart container's computed font.
|
|
740
|
+
- `MapSankeySeries` (5.17.0) — Sankey overlaid on a map; auto-resolves `sourceId`/`targetId` once `polygonSeries` geoJSON loads (5.17.1), so no `datavalidated` wrapper needed. See `references/map.md`.
|
|
741
|
+
- `MapPointSeries` defaults changed to `longitudeField: "longitude"`, `latitudeField: "latitude"` (5.16.1).
|
|
742
|
+
|
|
682
743
|
## Verify unfamiliar API before using it
|
|
683
744
|
|
|
684
745
|
If you are unsure whether a method, property, or setting exists on an amCharts 5 class, **verify it before using it**. Check the class reference (class name in lowercase, e.g. `LineSeries` → `lineseries`):
|
package/content/gantt.md
CHANGED
|
@@ -47,10 +47,10 @@ var chart = root.container.children.push(
|
|
|
47
47
|
| `editable` | boolean | `true` | Allow user to add, edit, remove, drag tasks |
|
|
48
48
|
| `durationUnit` | string | `"day"` | `"year"`, `"month"`, `"week"`, `"day"`, `"hour"`, `"minute"`, `"second"` |
|
|
49
49
|
| `weekends` | number[] | `[0, 6]` | Non-working days (0=Sun, 1=Mon, ... 6=Sat) |
|
|
50
|
-
| `excludeWeekends` | boolean | `
|
|
50
|
+
| `excludeWeekends` | boolean | `false` | Whether to exclude weekends from task durations |
|
|
51
51
|
| `holidays` | Date[] | `[]` | Specific non-working dates |
|
|
52
52
|
| `snapThreshold` | number | `0.5` | Drag snap position within a period (0–1) |
|
|
53
|
-
| `sidebarWidth` | number |
|
|
53
|
+
| `sidebarWidth` | number \| Percent | `30%` | Sidebar width in pixels or Percent |
|
|
54
54
|
|
|
55
55
|
## Data structure
|
|
56
56
|
|
|
@@ -134,7 +134,7 @@ Set `duration: 0` to create milestone markers.
|
|
|
134
134
|
```js
|
|
135
135
|
chart.yAxis.setAll({
|
|
136
136
|
minCellHeight: 80, // row height in pixels (default: 70)
|
|
137
|
-
childCellSize: 1, // child row size relative to parent (default: 0.
|
|
137
|
+
childCellSize: 1, // child row size relative to parent (default: 0.8, 1 = same)
|
|
138
138
|
childShift: 0 // child label indent in pixels (default: 25)
|
|
139
139
|
});
|
|
140
140
|
```
|
package/content/stock.md
CHANGED
|
@@ -216,7 +216,7 @@ stockChart.indicators.push(am5stock.Volume.new(root, {
|
|
|
216
216
|
| Indicator | Class | Needs volumeSeries |
|
|
217
217
|
|-----------|-------|--------------------|
|
|
218
218
|
| Moving Average | `MovingAverage` | No |
|
|
219
|
-
| Moving Average Cross | `
|
|
219
|
+
| Moving Average Cross | `MACross` | No |
|
|
220
220
|
| Moving Average Envelope | `MovingAverageEnvelope` | No |
|
|
221
221
|
| Moving Average Deviation | `MovingAverageDeviation` | No |
|
|
222
222
|
| Bollinger Bands | `BollingerBands` | No |
|
|
@@ -281,8 +281,9 @@ var data = [
|
|
|
281
281
|
## Events
|
|
282
282
|
|
|
283
283
|
```js
|
|
284
|
-
// Period changed
|
|
285
|
-
stockChart.
|
|
284
|
+
// Period changed — the `periodselected` event fires on the PeriodSelector
|
|
285
|
+
// instance, NOT on stockChart. Attach the handler to the selector you created.
|
|
286
|
+
periodSelector.events.on("periodselected", (ev) => {
|
|
286
287
|
console.log("Period:", ev.period);
|
|
287
288
|
});
|
|
288
289
|
|
package/content/timeline.md
CHANGED
|
@@ -48,20 +48,24 @@ const chart = root.container.children.push(
|
|
|
48
48
|
am5timeline.SerpentineChart.new(root, {
|
|
49
49
|
orientation: "vertical", // "vertical" | "horizontal"
|
|
50
50
|
levelCount: 3, // number of bends/turns
|
|
51
|
-
|
|
52
|
-
|
|
51
|
+
startLocation: 0, // relative start of the "road" (0-1)
|
|
52
|
+
endLocation: 1, // relative end of the "road" (0-1)
|
|
53
|
+
yAxisRadius: am5.percent(50), // band thickness (Percent); applied to the Y axes' radius
|
|
53
54
|
})
|
|
54
55
|
);
|
|
55
56
|
```
|
|
56
57
|
|
|
57
|
-
**Serpentine settings
|
|
58
|
+
**Serpentine settings** (`ISerpentineChartSettings`):
|
|
58
59
|
|
|
59
|
-
| Setting | Type | Description |
|
|
60
|
-
|
|
61
|
-
| `orientation` | `"vertical"` \| `"horizontal"` | Direction of the snake pattern |
|
|
62
|
-
| `levelCount` | number | Number of turns/bends |
|
|
63
|
-
| `
|
|
64
|
-
| `
|
|
60
|
+
| Setting | Type | Default | Description |
|
|
61
|
+
|---------|------|---------|-------------|
|
|
62
|
+
| `orientation` | `"vertical"` \| `"horizontal"` | `"vertical"` | Direction of the snake pattern |
|
|
63
|
+
| `levelCount` | number | `3` | Number of turns/bends |
|
|
64
|
+
| `startLocation` | number | `0` | Relative location (0-1) of the start |
|
|
65
|
+
| `endLocation` | number | `1` | Relative location (0-1) of the end |
|
|
66
|
+
| `yAxisRadius` | `Percent` | `50%` | Band thickness — applied to every Y axis renderer's radius |
|
|
67
|
+
|
|
68
|
+
> There is no `yAxisInnerRadius` setting on the chart. Band thickness is controlled by `yAxisRadius` (a `Percent`). For a plain `CurveChart` (no Serpentine/Spiral wrapper) the Y-axis band length is set via `AxisRendererCurveY`'s `axisLength` instead.
|
|
65
69
|
|
|
66
70
|
### SpiralChart
|
|
67
71
|
|
|
@@ -71,23 +75,25 @@ Wraps the chart into a spiral shape.
|
|
|
71
75
|
const chart = root.container.children.push(
|
|
72
76
|
am5timeline.SpiralChart.new(root, {
|
|
73
77
|
levelCount: 3, // number of spiral rings
|
|
74
|
-
|
|
78
|
+
startAngle: -90, // start angle in degrees
|
|
75
79
|
endAngle: -135, // end angle in degrees
|
|
76
|
-
yAxisRadius: am5.percent(
|
|
77
|
-
|
|
78
|
-
innerRadius: am5.percent(30), // inner hole radius
|
|
80
|
+
yAxisRadius: am5.percent(60), // band thickness (Percent)
|
|
81
|
+
innerRadius: am5.percent(30), // inner hole radius (Percent)
|
|
79
82
|
})
|
|
80
83
|
);
|
|
81
84
|
```
|
|
82
85
|
|
|
83
|
-
**Spiral settings
|
|
86
|
+
**Spiral settings** (`ISpiralChartSettings`):
|
|
87
|
+
|
|
88
|
+
| Setting | Type | Default | Description |
|
|
89
|
+
|---------|------|---------|-------------|
|
|
90
|
+
| `levelCount` | number | `3` | Number of spiral rings |
|
|
91
|
+
| `startAngle` | number | `-90` | Where the spiral starts (degrees) |
|
|
92
|
+
| `endAngle` | number | `0` | Where the spiral ends (degrees) |
|
|
93
|
+
| `innerRadius` | `Percent` | `60%` | Size of the center hole |
|
|
94
|
+
| `yAxisRadius` | `Percent` | `50%` | Band thickness — applied to every Y axis renderer's radius |
|
|
84
95
|
|
|
85
|
-
|
|
86
|
-
|---------|------|-------------|
|
|
87
|
-
| `levelCount` | number | Number of spiral rings |
|
|
88
|
-
| `inversed` | boolean | Spiral direction |
|
|
89
|
-
| `endAngle` | number | Where the spiral ends (degrees) |
|
|
90
|
-
| `innerRadius` | percent/number | Size of the center hole |
|
|
96
|
+
> There is no `inversed` or `yAxisInnerRadius` setting on `SpiralChart`. To reverse direction use the `startAngle`/`endAngle` pair. (`inversed` is a valid axis-renderer setting, but not a chart setting.)
|
|
91
97
|
|
|
92
98
|
### CurveChart
|
|
93
99
|
|
|
@@ -306,8 +312,7 @@ chart.get("cursor").events.on("cursormoved", function(ev) {
|
|
|
306
312
|
am5timeline.SerpentineChart.new(root, {
|
|
307
313
|
orientation: "vertical",
|
|
308
314
|
levelCount: 3,
|
|
309
|
-
yAxisRadius: am5.percent(
|
|
310
|
-
yAxisInnerRadius: -25
|
|
315
|
+
yAxisRadius: am5.percent(50)
|
|
311
316
|
})
|
|
312
317
|
);
|
|
313
318
|
|
|
@@ -399,10 +404,9 @@ chart.get("cursor").events.on("cursormoved", function(ev) {
|
|
|
399
404
|
var chart = root.container.children.push(
|
|
400
405
|
am5timeline.SpiralChart.new(root, {
|
|
401
406
|
levelCount: 3,
|
|
402
|
-
|
|
407
|
+
startAngle: -90,
|
|
403
408
|
endAngle: -135,
|
|
404
|
-
yAxisRadius: am5.percent(
|
|
405
|
-
yAxisInnerRadius: 0,
|
|
409
|
+
yAxisRadius: am5.percent(60),
|
|
406
410
|
innerRadius: am5.percent(30)
|
|
407
411
|
})
|
|
408
412
|
);
|
package/content/ui-elements.md
CHANGED
|
@@ -81,14 +81,16 @@ button.get("background").states.create("down", {
|
|
|
81
81
|
### Togglable button
|
|
82
82
|
|
|
83
83
|
```js
|
|
84
|
+
// There is no `togglable` setting on Button. Make it a toggle by setting
|
|
85
|
+
// `toggleKey: "active"` (a Sprite setting) — clicks then flip the `active` boolean.
|
|
84
86
|
var button = container.children.push(am5.Button.new(root, {
|
|
85
|
-
|
|
87
|
+
toggleKey: "active",
|
|
86
88
|
label: am5.Label.new(root, { text: "Toggle" })
|
|
87
89
|
}));
|
|
88
90
|
|
|
89
|
-
// Check active state
|
|
91
|
+
// Check active state via the `active` setting (there is no isActive() method)
|
|
90
92
|
button.events.on("click", function(ev) {
|
|
91
|
-
var isActive = ev.target.
|
|
93
|
+
var isActive = ev.target.get("active");
|
|
92
94
|
console.log("Active:", isActive);
|
|
93
95
|
});
|
|
94
96
|
```
|
package/content/wordcloud.md
CHANGED
|
@@ -57,10 +57,10 @@ series.appear(1000);
|
|
|
57
57
|
|---------|------|---------|-------------|
|
|
58
58
|
| `categoryField` | string | — | Data field for word text (required) |
|
|
59
59
|
| `valueField` | string | — | Data field for word weight/size (required) |
|
|
60
|
-
| `maxFontSize` |
|
|
61
|
-
| `minFontSize` |
|
|
62
|
-
| `angles` | number[] | `[0
|
|
63
|
-
| `randomness` | number (0–1) | `0
|
|
60
|
+
| `maxFontSize` | number \| Percent | `100` | Maximum font size (a `Percent` is relative to the smaller chart dimension) |
|
|
61
|
+
| `minFontSize` | number \| Percent | `10` | Minimum font size (a `Percent` is relative to the smaller chart dimension) |
|
|
62
|
+
| `angles` | number[] | `[0]` | Allowed rotation angles for words |
|
|
63
|
+
| `randomness` | number (0–1) | `0` | Layout randomness (0 = ordered by value, 1 = fully random) |
|
|
64
64
|
| `minWordLength` | number | `1` | Skip words shorter than this |
|
|
65
65
|
| `maxCount` | number | — | Maximum number of words to display |
|
|
66
66
|
| `excludeWords` | string[] | `[]` | Words to exclude |
|
package/content/xy.md
CHANGED
|
@@ -81,6 +81,8 @@ The field name combines the **value type** + **axis direction**:
|
|
|
81
81
|
- Date axis on X → `valueXField: "date"` (dates are numeric timestamps)
|
|
82
82
|
- Open/high/low/close → `openValueYField`, `highValueYField`, `lowValueYField`, `valueYField`
|
|
83
83
|
|
|
84
|
+
**There is NO `dateXField` in v5** (a common wrong guess carried over from v4). A `DateAxis` series reads its date from `valueXField`, pointing at a numeric timestamp (`new Date(...).getTime()`).
|
|
85
|
+
|
|
84
86
|
## Common additions
|
|
85
87
|
|
|
86
88
|
### Cursor
|
|
@@ -109,7 +111,11 @@ legend.data.setAll(chart.series.values);
|
|
|
109
111
|
series.set("tooltip", am5.Tooltip.new(root, {
|
|
110
112
|
labelText: "{name}: {valueY}"
|
|
111
113
|
}));
|
|
114
|
+
|
|
115
|
+
// For column/bar series the tooltip text often lives on the columns template instead:
|
|
116
|
+
series.columns.template.set("tooltipText", "{categoryX}: {valueY}");
|
|
112
117
|
```
|
|
118
|
+
A tooltip enabled with no `labelText`/`tooltipText` shows an empty bubble — always give it text. See SKILL.md → Tooltip for background/text styling.
|
|
113
119
|
|
|
114
120
|
### Stacking
|
|
115
121
|
```js
|
|
@@ -253,6 +259,11 @@ renderer.labels.template.setAll({
|
|
|
253
259
|
});
|
|
254
260
|
```
|
|
255
261
|
|
|
262
|
+
**Axis sub-element defaults:** grid and labels are visible by default; **ticks default to `visible:false`**. To show ticks you must raise `visible` (and give them a non-zero `strokeOpacity`) — toggling `forceHidden` won't reveal them:
|
|
263
|
+
```js
|
|
264
|
+
renderer.ticks.template.setAll({ visible: true, strokeOpacity: 0.5, length: 5 });
|
|
265
|
+
```
|
|
266
|
+
|
|
256
267
|
## LineSeries
|
|
257
268
|
|
|
258
269
|
For line and area charts.
|
|
@@ -659,7 +670,7 @@ am5xy.XYChart.new(root, {
|
|
|
659
670
|
wheelX: "panX", // mouse wheel: "panX", "panY", "zoomX", "zoomY", "none"
|
|
660
671
|
wheelY: "zoomX", // mouse wheel vertical
|
|
661
672
|
pinchZoomX: true, // mobile pinch zoom on X
|
|
662
|
-
|
|
673
|
+
arrangeTooltips: true, // de-overlap stacked series tooltips (NOTE: there is no `arrangeFields` setting)
|
|
663
674
|
maxTooltipDistance: 0, // show tooltips for nearby series (-1 = all)
|
|
664
675
|
})
|
|
665
676
|
```
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "Map Sankey Series"
|
|
3
|
+
source: "https://www.amcharts.com/docs/v5/charts/map-chart/map-sankey-series/"
|
|
4
|
+
category: "maps"
|
|
5
|
+
added: "2026-06-04"
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
`MapSankeySeries` (added in amCharts 5.17.0) draws variable-width curved bands between geographic points on a `MapChart` — a Sankey diagram projected onto a map, where band thickness encodes a numeric `value`. It extends `MapPolygonSeries` and generates real GeoJSON geometry, so bands follow the projection during pan, zoom, and globe rotation.
|
|
9
|
+
|
|
10
|
+
Key implementation details
|
|
11
|
+
A `MapSankeySeries` needs a reference `polygonSeries` (a `MapPolygonSeries` with geodata) to resolve country IDs to geographic centroids. Provide flow data as `{ sourceId, targetId, value }` using ISO 3166-1 alpha-2 country codes, or as explicit `{ sourceLongitude, sourceLatitude, targetLongitude, targetLatitude, value }` coordinates. When using `sourceId`/`targetId`, the series automatically waits for `polygonSeries` to finish parsing its geoJSON before resolving centroids — no `datavalidated` wrapper around `data.setAll()` is needed.
|
|
12
|
+
|
|
13
|
+
Key settings (on `MapSankeySeries`):
|
|
14
|
+
- `polygonSeries` — the `MapPolygonSeries` used to look up centroids (required for `sourceId`/`targetId` data).
|
|
15
|
+
- `maxWidth` (default `5`) — maximum band width, in geographic degrees.
|
|
16
|
+
- `controlPointDistance` (default `0.5`) — bezier curvature of the bands.
|
|
17
|
+
- `nodeType` (default `"circle"`) — node shape: `"circle"` or `"bar"`.
|
|
18
|
+
- `nodePadding` — extra padding around node shapes, in degrees.
|
|
19
|
+
|
|
20
|
+
**WARNING:** never call `polygonSeries.data.setAll()` with your own objects — that replaces the geoJSON-derived data items and breaks `MapSankeySeries` centroid resolution. To set per-country properties (e.g. colors), iterate the existing data items inside the polygon series' `datavalidated` event instead.
|
|
21
|
+
|
|
22
|
+
## JavaScript
|
|
23
|
+
|
|
24
|
+
```javascript
|
|
25
|
+
// Create root element
|
|
26
|
+
// https://www.amcharts.com/docs/v5/getting-started/#Root_element
|
|
27
|
+
var root = am5.Root.new("chartdiv");
|
|
28
|
+
|
|
29
|
+
// Set themes
|
|
30
|
+
// https://www.amcharts.com/docs/v5/concepts/themes/
|
|
31
|
+
root.setThemes([am5themes_Animated.new(root)]);
|
|
32
|
+
|
|
33
|
+
// Create the map chart
|
|
34
|
+
// https://www.amcharts.com/docs/v5/charts/map-chart/
|
|
35
|
+
var chart = root.container.children.push(am5map.MapChart.new(root, {
|
|
36
|
+
panX: "rotateX",
|
|
37
|
+
panY: "translateY",
|
|
38
|
+
projection: am5map.geoNaturalEarth1()
|
|
39
|
+
}));
|
|
40
|
+
|
|
41
|
+
// Country polygons — also used by the Sankey series to resolve centroids
|
|
42
|
+
// https://www.amcharts.com/docs/v5/charts/map-chart/map-polygon-series/
|
|
43
|
+
var polygonSeries = chart.series.push(am5map.MapPolygonSeries.new(root, {
|
|
44
|
+
geoJSON: am5geodata_worldLow
|
|
45
|
+
}));
|
|
46
|
+
polygonSeries.mapPolygons.template.setAll({
|
|
47
|
+
fill: am5.color(0xdddddd),
|
|
48
|
+
stroke: am5.color(0xffffff),
|
|
49
|
+
strokeWidth: 0.5
|
|
50
|
+
});
|
|
51
|
+
|
|
52
|
+
// Highlight the countries involved (set fills on existing geoJSON data items —
|
|
53
|
+
// do NOT call polygonSeries.data.setAll() with custom objects)
|
|
54
|
+
var endpoints = ["BR", "VN", "CO", "DE", "US", "FR", "JP", "CA"];
|
|
55
|
+
polygonSeries.events.on("datavalidated", function () {
|
|
56
|
+
am5.array.each(polygonSeries.dataItems, function (di) {
|
|
57
|
+
if (endpoints.indexOf(di.get("id")) !== -1) {
|
|
58
|
+
di.get("mapPolygon").set("fill", am5.color(0xb0c4a0));
|
|
59
|
+
}
|
|
60
|
+
});
|
|
61
|
+
});
|
|
62
|
+
|
|
63
|
+
// Map Sankey series
|
|
64
|
+
// https://www.amcharts.com/docs/v5/charts/map-chart/map-sankey-series/
|
|
65
|
+
var sankeySeries = chart.series.push(am5map.MapSankeySeries.new(root, {
|
|
66
|
+
polygonSeries: polygonSeries,
|
|
67
|
+
maxWidth: 3,
|
|
68
|
+
controlPointDistance: 0.4,
|
|
69
|
+
nodePadding: 0.3
|
|
70
|
+
}));
|
|
71
|
+
|
|
72
|
+
// Band (link) appearance
|
|
73
|
+
sankeySeries.mapPolygons.template.setAll({
|
|
74
|
+
fill: am5.color(0x6b4f3a),
|
|
75
|
+
fillOpacity: 0.6,
|
|
76
|
+
strokeOpacity: 0,
|
|
77
|
+
tooltipText: "{sourceNode.name} → {targetNode.name}: {value}"
|
|
78
|
+
});
|
|
79
|
+
|
|
80
|
+
// Node appearance
|
|
81
|
+
sankeySeries.nodes.mapPolygons.template.setAll({
|
|
82
|
+
fill: am5.color(0x3c2415),
|
|
83
|
+
stroke: am5.color(0xffffff),
|
|
84
|
+
strokeWidth: 1,
|
|
85
|
+
tooltipText: "{name}: {sum}"
|
|
86
|
+
});
|
|
87
|
+
|
|
88
|
+
// Flow data — { sourceId, targetId, value } using ISO 3166-1 alpha-2 codes.
|
|
89
|
+
// Set directly: the series auto-resolves IDs once polygonSeries loads its geoJSON.
|
|
90
|
+
sankeySeries.data.setAll([
|
|
91
|
+
// Producers → hubs
|
|
92
|
+
{ sourceId: "BR", targetId: "US", value: 450 },
|
|
93
|
+
{ sourceId: "BR", targetId: "DE", value: 350 },
|
|
94
|
+
{ sourceId: "VN", targetId: "DE", value: 200 },
|
|
95
|
+
{ sourceId: "CO", targetId: "US", value: 250 },
|
|
96
|
+
// Hubs → consumer markets
|
|
97
|
+
{ sourceId: "DE", targetId: "FR", value: 150 },
|
|
98
|
+
{ sourceId: "US", targetId: "CA", value: 120 },
|
|
99
|
+
{ sourceId: "US", targetId: "JP", value: 80 }
|
|
100
|
+
]);
|
|
101
|
+
|
|
102
|
+
// Auto-created nodes only know their id — give them readable names
|
|
103
|
+
var countryNames = {
|
|
104
|
+
BR: "Brazil", VN: "Vietnam", CO: "Colombia", DE: "Germany",
|
|
105
|
+
US: "United States", FR: "France", JP: "Japan", CA: "Canada"
|
|
106
|
+
};
|
|
107
|
+
sankeySeries.events.on("datavalidated", function () {
|
|
108
|
+
am5.array.each(sankeySeries.nodes.dataItems, function (di) {
|
|
109
|
+
var id = di.get("id");
|
|
110
|
+
if (id && countryNames[id]) {
|
|
111
|
+
di.set("name", countryNames[id]);
|
|
112
|
+
}
|
|
113
|
+
});
|
|
114
|
+
});
|
|
115
|
+
|
|
116
|
+
// ALTERNATIVE — explicit coordinates instead of country IDs (no polygonSeries
|
|
117
|
+
// lookup needed for these endpoints). Optional `waypoints` route the band
|
|
118
|
+
// through intermediate points (keys MUST be "longitude"/"latitude"):
|
|
119
|
+
// sankeySeries.data.setAll([
|
|
120
|
+
// {
|
|
121
|
+
// sourceLongitude: -47.9, sourceLatitude: -15.8, // Brasília
|
|
122
|
+
// targetLongitude: 13.4, targetLatitude: 52.5, // Berlin
|
|
123
|
+
// value: 350,
|
|
124
|
+
// waypoints: [{ longitude: -25.0, latitude: 20.0 }]
|
|
125
|
+
// }
|
|
126
|
+
// ]);
|
|
127
|
+
|
|
128
|
+
chart.appear(1000, 100);
|
|
129
|
+
```
|
|
@@ -32,6 +32,7 @@ Extended by: LinkedHierarchy, Pack, Partition, Treemap, VoronoiTreemap
|
|
|
32
32
|
- **downDepth** (`undefined | number`) — Number of child levels to open when clicking on a node. Click here for more info
|
|
33
33
|
- **fillField** (`undefined | string`) — A field in data that holds color used for fills for various elements, such as nodes.
|
|
34
34
|
- **initialDepth** (`undefined | number`) — Number of levels to show on chart's first load. Click here for more info
|
|
35
|
+
- **parentIdField** (`undefined | string`) — A field in data that holds the parent node's ID. Used with the `setFlatData(data)` method to build the hierarchy from a flat array (with parent-ID references) instead of nested `children`. @since 5.16.2
|
|
35
36
|
- **patterns** (`PatternSet`) — A PatternSet to use when asigning patterns for nodes. Click here for more info @since 5.10.0
|
|
36
37
|
- **selectedDataItem** (`DataItem`) — A data item for currently selected node. Click here for more info
|
|
37
38
|
- **singleBranchOnly** (`undefined | false | true`) — If set to true will make all other branches collapse when some branch is expanded.
|
|
@@ -99,6 +99,7 @@ Extended by: ILinkedHierarchySettings, IPackSettings, IPartitionSettings, ITreem
|
|
|
99
99
|
- **downDepth** (`undefined | number`) — Number of child levels to open when clicking on a node. Click here for more info
|
|
100
100
|
- **fillField** (`undefined | string`) — A field in data that holds color used for fills for various elements, such as nodes.
|
|
101
101
|
- **initialDepth** (`undefined | number`) — Number of levels to show on chart's first load. Click here for more info
|
|
102
|
+
- **parentIdField** (`undefined | string`) — A field in data that holds the parent node's ID. Used with the `setFlatData(data)` method to build the hierarchy from a flat array (with parent-ID references) instead of nested `children`. @since 5.16.2
|
|
102
103
|
- **patterns** (`PatternSet`) — A PatternSet to use when asigning patterns for nodes. Click here for more info @since 5.10.0
|
|
103
104
|
- **selectedDataItem** (`DataItem`) — A data item for currently selected node. Click here for more info
|
|
104
105
|
- **singleBranchOnly** (`undefined | false | true`) — If set to true will make all other branches collapse when some branch is expanded.
|
|
@@ -73,5 +73,6 @@ Extends: IChartIndicatorSettings
|
|
|
73
73
|
|
|
74
74
|
- **decreasingColor** (`Color`) — Decreasing color.
|
|
75
75
|
- **increasingColor** (`Color`) — Increasing color.
|
|
76
|
-
- **
|
|
76
|
+
- **maType** (`"simple" | "weighted" | "exponential" | "dema" | "tema"`) — Default "simple" Type of the moving average. (Renamed from `type` in 5.18.0.)
|
|
77
|
+
- **type** (`"simple" | "weighted" | "exponential" | "dema" | "tema"`) — *Deprecated since 5.18.0 — use `maType` (still works).* Default "simple" Type of the moving average.
|
|
77
78
|
- **unit** (`"points" | "percent"`) — Default "points" How units are calculated.
|
|
@@ -73,4 +73,5 @@ Extended by: IBollingerBandsSettings, IMovingAverageEnvelopeSettings
|
|
|
73
73
|
## Properties
|
|
74
74
|
|
|
75
75
|
- **offset** (`undefined | number`) — Default 0 Offset.
|
|
76
|
-
- **
|
|
76
|
+
- **maType** (`"simple" | "weighted" | "exponential" | "dema" | "tema"`) — Default "simple" Type of the moving average. (Renamed from `type` in 5.18.0.)
|
|
77
|
+
- **type** (`"simple" | "weighted" | "exponential" | "dema" | "tema"`) — *Deprecated since 5.18.0 — use `maType` (still works).* Default "simple" Type of the moving average.
|
|
@@ -75,4 +75,5 @@ Extends: ICurveChartSettings
|
|
|
75
75
|
- **levelCount** (`undefined | number`) — Default 3 Number of levels in the chart.
|
|
76
76
|
- **orientation** (`"horizontal" | "vertical"`) — Default "vertical" Orientation of the serpatine.
|
|
77
77
|
- **startLocation** (`undefined | number`) — Relative location (0-1) of the start postion. @defult 0
|
|
78
|
+
- **yAxisRadius** (`Percent`) — Default 50% Radius of the Y-axis (band thickness); applied to every Y axis renderer's radius.
|
|
78
79
|
|
|
@@ -75,4 +75,5 @@ Extends: ICurveChartSettings
|
|
|
75
75
|
- **innerRadius** (`Percent`) — Default 60% Inner radius of the spiral in percent.
|
|
76
76
|
- **levelCount** (`undefined | number`) — Default 3 Numer of spiral circles.
|
|
77
77
|
- **startAngle** (`undefined | number`) — Default -90 Start angle of the spiral in degrees.
|
|
78
|
+
- **yAxisRadius** (`Percent`) — Default 50% Y-axis radius in percent (band thickness); applied to every Y axis renderer's radius.
|
|
78
79
|
|
|
@@ -91,5 +91,8 @@ Extends: ILinkedHierarchySettings
|
|
|
91
91
|
|
|
92
92
|
## Properties
|
|
93
93
|
|
|
94
|
+
- **clustered** (`undefined | false | true`) — Default false If set to true, uses a cluster (dendrogram) layout where all leaf nodes are placed at the same depth. @since 5.16.2
|
|
95
|
+
- **fitNodes** (`undefined | false | true`) — Default false If set to true, hidden nodes are excluded from the layout, giving more space to visible ones. @since 5.18.0
|
|
94
96
|
- **inversed** (`undefined | false | true`) — Default false If set to true, will flip the tree direction. @since 5.2.4
|
|
97
|
+
- **nodeSeparation** (`undefined | (a: DataItem, b: DataItem) => number`) — Custom node-separation function; receives two data items and returns a numeric spacing value. @since 5.16.2
|
|
95
98
|
- **orientation** (`"horizontal" | "vertical"`) — Default "vertical" Orientation of the diagram.
|
|
@@ -87,5 +87,6 @@ Extended by: IDateAxisSettings, IDurationAxisSettings
|
|
|
87
87
|
- **strictMinMax** (`undefined | false | true`) — Force axis scale to be precisely at values as set in min and/or max. In case min and/or max is not set, the axis will fix its scale to precise lowest and highest values available through all of the series attached to it. This effectively locks the axis from auto-zooming itself when chart is zoomed in. If you need to zoom to actual low/high values within currently visible scope, use strictMinMaxSelection instead. Use extraMin and extraMax to add extra "padding". Click here for more info
|
|
88
88
|
- **strictMinMaxSelection** (`undefined | false | true`) — Force axis to auto-zoom to exact lowest and highest values from attached series' data items within currently visible range. This is a good feature when your series is plotted from derivative values, like valueYChangeSelection as it helps to avoid frequent jumping of series to adjusted min and max of the axis. This will not work if strictMinMax is set to true (the axis will not zoom at all in this case). Use extraMin and extraMax to add extra "padding". @since 5.1.11
|
|
89
89
|
- **syncWithAxis** (`ValueAxis`) — This setting can be set to an instance of another ValueAxis. If set the grid of this axis will be synced with grid of the target axis. NOTE: this is not 100% guaranteed to work. In some rare cases perfect sync might not be possible. Click here for more info
|
|
90
|
+
- **syncZeros** (`undefined | false | true`) — Aligns the zero baseline across synced axes. Works only if `syncWithAxis` is set and zero is within the min/max of the axis. @since 5.16.2
|
|
90
91
|
- **tooltipNumberFormat** (`string | NumberFormatOptions`) — A numeric format used for numbers displayed in axis tooltip. Click here for more info
|
|
91
92
|
- **treatZeroAs** (`undefined | number`) — Treat zero values as some other value. Useful in situations where zero would result in error, i.e. logarithmic scale. Click here for more info
|
|
@@ -95,4 +95,5 @@ Extends: IHierarchySettings
|
|
|
95
95
|
- **cornerCount** (`undefined | number`) — Default 120 Number of corners when type is "polygon". 120 means the polygoon will look like a circle. NOTE: this setting is ignored if type="rectangle".
|
|
96
96
|
- **maxIterationCount** (`undefined | number`) — Default 100 Maximum allowed number of iterations when computing the layout. Computation is stopped when it number of iterations is reached, even if the convergenceRatio is not yet reached. Bigger number means finer results, but slower performance.
|
|
97
97
|
- **minWeightRatio** (`undefined | number`) — Default 0.005 Minimum weight ratio which allows computing the minimum allowed weight (= [maximum weight] * minWeightRatio). Setting very small minWeigtRatio might result flickering. NOTE: the nodes that have smaller weight will be scaled up and will not represent their true value correctly.
|
|
98
|
-
- **
|
|
98
|
+
- **shapeType** (`"rectangle" | "polygon"`) — Default "polygon" Type of the diagram's shape. (Renamed from `type` in 5.18.0.) Click here for more info
|
|
99
|
+
- **type** (`"rectangle" | "polygon"`) — *Deprecated since 5.18.0 — use `shapeType` (still works).* Default "polygon" Type of the diagram's shape.
|
|
@@ -24,7 +24,8 @@ Extended by: BollingerBands, MovingAverageEnvelope
|
|
|
24
24
|
## Settings
|
|
25
25
|
|
|
26
26
|
- **offset** (`undefined | number`) — Default 0 Offset.
|
|
27
|
-
- **
|
|
27
|
+
- **maType** (`"simple" | "weighted" | "exponential" | "dema" | "tema"`) — Default "simple" Type of the moving average. (Renamed from `type` in 5.18.0.)
|
|
28
|
+
- **type** (`"simple" | "weighted" | "exponential" | "dema" | "tema"`) — *Deprecated since 5.18.0 — use `maType` (still works).* Default "simple" Type of the moving average.
|
|
28
29
|
|
|
29
30
|
## Properties
|
|
30
31
|
|