@amcharts/amcharts5-mcp 1.2.0 → 1.4.0
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 +84 -6
- package/content/gantt.md +3 -3
- package/content/map.md +3 -1
- package/content/stock.md +45 -4
- package/content/timeline.md +29 -25
- package/content/ui-elements.md +5 -3
- package/content/wordcloud.md +91 -5
- package/content/xy.md +51 -1
- package/extended/charts/word-cloud.md +19 -3
- package/extended/concepts/colors-gradients-and-patterns/patterns.md +53 -0
- package/extended/concepts/events.md +18 -0
- package/extended/concepts/themes.md +91 -0
- package/extended/reference/irectanglepatternsettings.md +1 -0
- package/extended/reference/iseriessettings.md +2 -0
- package/extended/reference/iserpentinechartsettings.md +1 -0
- package/extended/reference/ispiralchartsettings.md +1 -0
- package/extended/reference/istarpatternsettings.md +38 -0
- package/extended/reference/itrianglepatternsettings.md +37 -0
- package/extended/reference/iwordcloudsettings.md +24 -8
- package/extended/reference/ixychartsettings.md +2 -0
- package/extended/reference/ixycursorsettings.md +1 -0
- package/extended/reference/starpattern.md +51 -0
- package/extended/reference/trianglepattern.md +49 -0
- package/package.json +10 -1
- package/src/content-fs.js +84 -0
- package/src/content.js +214 -0
- package/src/index.js +6 -629
- package/src/tools.js +391 -0
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
title: "Word cloud"
|
|
3
3
|
source: "https://www.amcharts.com/docs/v5/charts/word-cloud/"
|
|
4
4
|
scraped: "2026-03-15"
|
|
5
|
+
updated: "2026-08-05"
|
|
6
|
+
updatedFor: "@amcharts/amcharts5@5.20.1"
|
|
5
7
|
---
|
|
6
8
|
|
|
7
9
|
[Word clouds](https://en.wikipedia.org/wiki/Tag_cloud) (or tag clouds) help visualize weight or importance of individual words from a keyword list or a free-form text.
|
|
@@ -247,13 +249,27 @@ Series setting responsible for identifying possible angles is named `angles`.
|
|
|
247
249
|
|
|
248
250
|
It's an array of numbers, and the default is `[0, -90]` meaning that words can come at zero (horizontal) or 90 (vertical) angle.
|
|
249
251
|
|
|
250
|
-
The only supported values are `0`, `90`, and `-90`.
|
|
251
|
-
|
|
252
252
|
To make all words horizontal, set it to `[0]`. To make all vertical, use `[90]`.
|
|
253
253
|
|
|
254
|
+
**Any angle is supported as of 5.20.1.** Earlier versions only handled `0`, `90` and `-90`; the layout rewrite in 5.20.1 rasterizes each word and its collision mask at the word's actual angle, so diagonal values work and neighboring words pack into the corners of a rotated word's footprint rather than reserving its full axis-aligned bounding box.
|
|
255
|
+
|
|
256
|
+
```javascript
|
|
257
|
+
am5wc.WordCloud.new(root, {
|
|
258
|
+
categoryField: "tag",
|
|
259
|
+
valueField: "weight",
|
|
260
|
+
angles: [0, -30, -45, -60, -90] // arbitrary angles, not just 0/±90
|
|
261
|
+
});
|
|
262
|
+
```
|
|
263
|
+
|
|
264
|
+
NOTE There is one place where `0` and `±90` still get special treatment: if a word comes out very wide relative to the available area, the layout will flip it to `0` or `±90` for a better fit — but only if that value is present in your `angles` array. Omit them and your angles are used as given.
|
|
265
|
+
|
|
266
|
+
#### Choosing angles
|
|
267
|
+
|
|
268
|
+
`randomizeAngles` (default `true`) picks a random entry from `angles` for each word. Set it to `false` to cycle through `angles` in order — combined with `randomness: 0` this produces a reproducible layout.
|
|
269
|
+
|
|
254
270
|
#### Rotating whole series
|
|
255
271
|
|
|
256
|
-
|
|
272
|
+
Instead of (or in addition to) rotating individual words, the whole series can be rotated using `rotation` and relative centering settings on the series itself.
|
|
257
273
|
|
|
258
274
|
let series = root.container.children.push(
|
|
259
275
|
am5wc.WordCloud.new(root, {
|
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
title: "Patterns"
|
|
3
3
|
source: "https://www.amcharts.com/docs/v5/concepts/colors-gradients-and-patterns/patterns/"
|
|
4
4
|
scraped: "2026-03-15"
|
|
5
|
+
updated: "2026-08-05"
|
|
6
|
+
updatedFor: "@amcharts/amcharts5@5.20.1"
|
|
5
7
|
---
|
|
6
8
|
|
|
7
9
|
This tutorial looks at how we can create patterns to use for element fills ant outlines.
|
|
@@ -43,8 +45,57 @@ Example
|
|
|
43
45
|
|
|
44
46
|
`[PathPattern](https://www.amcharts.com/docs/v5/reference/pathpattern/)`
|
|
45
47
|
|
|
48
|
+
`[StarPattern](https://www.amcharts.com/docs/v5/reference/starpattern/)` (5.20.0)
|
|
49
|
+
|
|
50
|
+
`[TrianglePattern](https://www.amcharts.com/docs/v5/reference/trianglepattern/)` (5.20.0)
|
|
51
|
+
|
|
46
52
|
Patterns can be customized by applying rotation, gap, stroke, and other settings, which we'll explore in a bit.
|
|
47
53
|
|
|
54
|
+
### Star and triangle patterns (5.20.0)
|
|
55
|
+
|
|
56
|
+
`StarPattern` and `TrianglePattern` work like `RectanglePattern`/`CirclePattern` — a grid of shapes with a `gap` between them, and an optional `checkered` mode that places only every second shape.
|
|
57
|
+
|
|
58
|
+
```javascript
|
|
59
|
+
columnSeries.columns.template.set("fillPattern", am5.StarPattern.new(root, {
|
|
60
|
+
color: am5.color(0xffffff),
|
|
61
|
+
radius: 5, // outer radius of the star, in pixels. Default: 5
|
|
62
|
+
innerRadius: am5.percent(50), // inner radius: pixels or a percent of `radius`. Default: 50%
|
|
63
|
+
spikes: 5, // number of spikes. Default: 5
|
|
64
|
+
gap: 6, // gap between stars, in pixels. Default: 6
|
|
65
|
+
checkered: false, // place every second star. Default: false
|
|
66
|
+
centered: true // center stars in their grid cell. Default: true
|
|
67
|
+
}));
|
|
68
|
+
|
|
69
|
+
columnSeries.columns.template.set("fillPattern", am5.TrianglePattern.new(root, {
|
|
70
|
+
color: am5.color(0xffffff),
|
|
71
|
+
maxWidth: 8, // width of the triangle, in pixels. Default: 8
|
|
72
|
+
maxHeight: 8, // height of the triangle, in pixels. Default: 8
|
|
73
|
+
gap: 6, // gap between triangles, in pixels. Default: 6
|
|
74
|
+
checkered: false,
|
|
75
|
+
centered: true
|
|
76
|
+
}));
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
### `rotateShapes` (5.20.0)
|
|
80
|
+
|
|
81
|
+
`RectanglePattern`, `StarPattern` and `TrianglePattern` accept a `rotateShapes` setting (default `false`).
|
|
82
|
+
|
|
83
|
+
When `false`, `rotation` rotates the whole pattern grid. That does not tile periodically on an axis-aligned tile, so you usually have to enlarge `width`/`height` and tweak `gap` to avoid seams — expensive on large tiles.
|
|
84
|
+
|
|
85
|
+
When `true`, `rotation` instead rotates **each shape around its own center** while the grid stays axis-aligned. This tiles seamlessly (a small `width`/`height` is enough) and is significantly faster.
|
|
86
|
+
|
|
87
|
+
```javascript
|
|
88
|
+
columnSeries.columns.template.set("fillPattern", am5.RectanglePattern.new(root, {
|
|
89
|
+
color: am5.color(0xffffff),
|
|
90
|
+
rotation: 45,
|
|
91
|
+
rotateShapes: true // rotate each rectangle, not the whole grid
|
|
92
|
+
}));
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
NOTE Star, triangle, rectangle and circle patterns normalize an oversized `width`/`height` down to a single repeat cell (2×2 cells when `checkered`), since the grid repeats every cell anyway. This optimization is skipped when a whole-pattern `rotation` is set — another reason to prefer `rotateShapes`.
|
|
96
|
+
|
|
97
|
+
NOTE As of 5.20.0, `PathPattern` repeats its `svgPath` as a grid itself instead of drawing once and letting the rendering engine repeat it.
|
|
98
|
+
|
|
48
99
|
## Setting pattern
|
|
49
100
|
|
|
50
101
|
To set a pattern fill on an element, we need to assign it to element's `fillPattern` setting.
|
|
@@ -243,6 +294,8 @@ For more configuration options, visit following class references:
|
|
|
243
294
|
- [`RectanglePattern` settings](https://www.amcharts.com/docs/v5/reference/linepattern/#Settings)
|
|
244
295
|
- [`CirclePattern` settings](https://www.amcharts.com/docs/v5/reference/linepattern/#Settings)
|
|
245
296
|
- [`PathPattern` settings](https://www.amcharts.com/docs/v5/reference/pathpattern/#Settings)
|
|
297
|
+
- [`StarPattern` settings](https://www.amcharts.com/docs/v5/reference/starpattern/#Settings)
|
|
298
|
+
- [`TrianglePattern` settings](https://www.amcharts.com/docs/v5/reference/trianglepattern/#Settings)
|
|
246
299
|
|
|
247
300
|
## Examples
|
|
248
301
|
|
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
title: "Events"
|
|
3
3
|
source: "https://www.amcharts.com/docs/v5/concepts/events/"
|
|
4
4
|
scraped: "2026-03-15"
|
|
5
|
+
updated: "2026-08-05"
|
|
6
|
+
updatedFor: "@amcharts/amcharts5@5.20.1"
|
|
5
7
|
---
|
|
6
8
|
|
|
7
9
|
## User interactions
|
|
@@ -82,6 +84,22 @@ For example, a Scrollbar might invoke a `rangechanged` event when its selection
|
|
|
82
84
|
|
|
83
85
|
For a complete list of element's events, see "Events" section in its class reference. Here's a [link](https://www.amcharts.com/docs/v5/reference/scrollbar/#Events) to `Scrollbar` events as an example.
|
|
84
86
|
|
|
87
|
+
## Global pointer events
|
|
88
|
+
|
|
89
|
+
Regular pointer events like `pointerdown` fire only when the pointer is over the element itself. The "global" variants fire on **every** element for a pointer action anywhere on the chart surface, which is what you need for drag-style interactions that must keep tracking once the pointer leaves the element.
|
|
90
|
+
|
|
91
|
+
Available on all elements:
|
|
92
|
+
|
|
93
|
+
- `globalpointermove`
|
|
94
|
+
- `globalpointerup`
|
|
95
|
+
- `globalpointerdown` — added in 5.20.0
|
|
96
|
+
|
|
97
|
+
```javascript
|
|
98
|
+
series.columns.template.events.on("globalpointerdown", function(ev) {
|
|
99
|
+
// fires on a press anywhere on the chart surface
|
|
100
|
+
});
|
|
101
|
+
```
|
|
102
|
+
|
|
85
103
|
## Debounced events
|
|
86
104
|
|
|
87
105
|
Starting with version `5.14`, we can create debounced events, i.e. ensuring that event handler will be invoked only once during specific timeframe.
|
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
title: "Themes"
|
|
3
3
|
source: "https://www.amcharts.com/docs/v5/concepts/themes/"
|
|
4
4
|
scraped: "2026-03-15"
|
|
5
|
+
updated: "2026-08-05"
|
|
6
|
+
updatedFor: "@amcharts/amcharts5@5.20.1"
|
|
5
7
|
---
|
|
6
8
|
|
|
7
9
|
Themes can be used to apply a collection of settings to chart's elements easily, with a a single line of code.
|
|
@@ -62,6 +64,95 @@ A theme that can be used to enable responsive features of the chart - adapting s
|
|
|
62
64
|
|
|
63
65
|
A theme that adds alternative default colors.
|
|
64
66
|
|
|
67
|
+
## Themes added in 5.20.0
|
|
68
|
+
|
|
69
|
+
The list above is the pre-5.20 set. Version 5.20.0 added a large batch of palette themes, dark variants, and two parameterized themes. All live in `/themes` and load exactly like the others.
|
|
70
|
+
|
|
71
|
+
### New palette themes
|
|
72
|
+
|
|
73
|
+
Theme name
|
|
74
|
+
|
|
75
|
+
Comment
|
|
76
|
+
|
|
77
|
+
`Colorblind`
|
|
78
|
+
|
|
79
|
+
A color-blindness-safe palette based on the Okabe-Ito color set.
|
|
80
|
+
|
|
81
|
+
`Ember`
|
|
82
|
+
|
|
83
|
+
A warm, fire-oriented palette.
|
|
84
|
+
|
|
85
|
+
`Midnight`
|
|
86
|
+
|
|
87
|
+
A dark theme.
|
|
88
|
+
|
|
89
|
+
`Nord`
|
|
90
|
+
|
|
91
|
+
A palette based on the Nord color scheme.
|
|
92
|
+
|
|
93
|
+
`Pastel`
|
|
94
|
+
|
|
95
|
+
A soft, low-saturation palette.
|
|
96
|
+
|
|
97
|
+
`Patterns`
|
|
98
|
+
|
|
99
|
+
Uses pattern fills instead of flat colors — useful for print, monochrome output, and accessibility.
|
|
100
|
+
|
|
101
|
+
`Petroleum`
|
|
102
|
+
|
|
103
|
+
A deep blue-green palette.
|
|
104
|
+
|
|
105
|
+
`Savanna`
|
|
106
|
+
|
|
107
|
+
A warm, earthy palette.
|
|
108
|
+
|
|
109
|
+
### New dark variants
|
|
110
|
+
|
|
111
|
+
Dark counterparts were added for most palette themes: `ColorblindDark`, `DatavizDark`, `FrozenDark`, `KellyDark`, `MaterialDark`, `MoonriseDark`, `NordDark`, `PastelDark`, `PatternsDark`, `SpiritedDark`.
|
|
112
|
+
|
|
113
|
+
Each already carries dark background and interface colors, so you should NOT additionally apply the `Dark` theme when using one.
|
|
114
|
+
|
|
115
|
+
### Parameterized themes: `Monochrome` and `Adaptive`
|
|
116
|
+
|
|
117
|
+
These two themes generate their palette from colors you supply, using OKLCH so the result stays perceptually balanced (even lightness/chroma, evenly spread hues). Because a theme cannot take constructor parameters, they ship as **factory functions** — call them with `(root, settings)`. A `.new(root, settings)` alias also works.
|
|
118
|
+
|
|
119
|
+
Both are additive: they do not modify any built-in theme.
|
|
120
|
+
|
|
121
|
+
`Monochrome` — a single-hue lightness ramp:
|
|
122
|
+
|
|
123
|
+
```javascript
|
|
124
|
+
import am5themes_Monochrome from "@amcharts/amcharts5/themes/Monochrome";
|
|
125
|
+
|
|
126
|
+
root.setThemes([
|
|
127
|
+
am5themes_Animated.new(root),
|
|
128
|
+
am5themes_Monochrome(root, {
|
|
129
|
+
color: 0x2c6e91, // base color of the ramp; hex number, CSS string, or Color. Default: #2e7c9e (blue)
|
|
130
|
+
accent: 0xff7f0e, // optional: applied to the FIRST series only, so one series stands out
|
|
131
|
+
count: 7, // number of steps in the ramp. Default: 7
|
|
132
|
+
dark: false // true = dark background + interface colors, ramp runs light-to-mid. Default: false
|
|
133
|
+
})
|
|
134
|
+
]);
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
`Adaptive` — a full palette generated from one or two base colors:
|
|
138
|
+
|
|
139
|
+
```javascript
|
|
140
|
+
import am5themes_Adaptive from "@amcharts/amcharts5/themes/Adaptive";
|
|
141
|
+
|
|
142
|
+
root.setThemes([
|
|
143
|
+
am5themes_Animated.new(root),
|
|
144
|
+
am5themes_Adaptive(root, {
|
|
145
|
+
baseColor: 0x2c6e91, // primary base color. The FIRST generated color is this color,
|
|
146
|
+
// so a brand color always appears in the chart.
|
|
147
|
+
// Default: green-to-yellow (#4b8e39 first, #ffdd00 last)
|
|
148
|
+
baseColor2: 0xffdd00, // optional: palette spans the two colors, interpolated in OKLCH,
|
|
149
|
+
// instead of fanning out from a single hue
|
|
150
|
+
count: 10, // number of series colors to generate. Default: 10
|
|
151
|
+
dark: false // true = faintly base-tinted dark background + matching interface colors
|
|
152
|
+
})
|
|
153
|
+
]);
|
|
154
|
+
```
|
|
155
|
+
|
|
65
156
|
## Applying
|
|
66
157
|
|
|
67
158
|
Each chart can have multiple themes applied to it.
|
|
@@ -55,3 +55,4 @@ Extends: IPatternSettings
|
|
|
55
55
|
- **gap** (`undefined | number`) — Default 6 Gap between rectangles, in pixels.
|
|
56
56
|
- **maxHeight** (`undefined | number`) — Default 5 Maximum height of the rectangle, in pixels.
|
|
57
57
|
- **maxWidth** (`undefined | number`) — Default 5 Maximum width of the rectangle, in pixels.
|
|
58
|
+
- **rotateShapes** (`undefined | false | true`) — Default false *(since 5.20.0)* If set to true, rotation rotates each rectangle around its own center while the grid/tile stays axis-aligned, instead of rotating the whole pattern. This tiles seamlessly (a small width/height is enough) and is much faster than rotating the whole pattern on large tiles.
|
|
@@ -76,7 +76,9 @@ Extended by: IFlowSettings, IFlowNodesSettings, IPercentSeriesSettings, ILegendS
|
|
|
76
76
|
- **customValueField** (`undefined | string`) — A key to look up in data for a numeric customValue of the data item. Usually used for storing additional numeric information and heat rules.
|
|
77
77
|
- **excludeFromAggregate** (`Array`) — A list of field names to exclude from automatic aggregation when calculateAggregates is enabled. Use it to optimize performance by disabling automatic aggregation for data fields where aggregate values are not needed. @since 5.14.4
|
|
78
78
|
- **fill** (`Color`) — Series fill color. Click here for more info
|
|
79
|
+
- **fillGradient** (`Gradient`) — *(since 5.20.0)* Series fill gradient.
|
|
79
80
|
- **fillPattern** (`Pattern`) — Series fill pattern. Click here for more info @since 5.10.0
|
|
81
|
+
- **strokeGradient** (`Gradient`) — *(since 5.20.0)* Series stroke gradient.
|
|
80
82
|
- **heatRules** (`IHeatRule[]`) — A list of heat rules to apply on series elements. Click here for more info
|
|
81
83
|
- **idField** (`undefined | string`) — A key to look up in data for an id of the data item.
|
|
82
84
|
- **legendDataItem** (`DataItem`) — A data item representing series in a Legend. @readonly
|
|
@@ -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
|
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "IStarPatternSettings"
|
|
3
|
+
type: "interface"
|
|
4
|
+
source: "https://www.amcharts.com/docs/v5/reference/istarpatternsettings/"
|
|
5
|
+
generatedFrom: "@amcharts/amcharts5@5.20.1"
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
Settings for `StarPattern` (added in 5.20.0).
|
|
9
|
+
|
|
10
|
+
## Inheritance
|
|
11
|
+
|
|
12
|
+
Extends: IPatternSettings
|
|
13
|
+
|
|
14
|
+
> **Note:** This interface also inherits all settings from IPatternSettings (and its ancestors). Use `get_doc` or `get_core_reference` with the parent interface name to see inherited members.
|
|
15
|
+
|
|
16
|
+
## Properties
|
|
17
|
+
|
|
18
|
+
- **centered** (`undefined | false | true`) — Default true Center stars in their grid cell.
|
|
19
|
+
- **checkered** (`undefined | false | true`) — Default false If set to true, will place every second star, creating a checkered pattern.
|
|
20
|
+
- **gap** (`undefined | number`) — Default 6 Gap between stars, in pixels.
|
|
21
|
+
- **innerRadius** (`undefined | number | Percent`) — Default 50% Inner radius of the star. Either an absolute pixel value or a percent of radius.
|
|
22
|
+
- **radius** (`undefined | number`) — Default 5 Outer radius of the star, in pixels.
|
|
23
|
+
- **rotateShapes** (`undefined | false | true`) — Default false If set to true, rotation rotates each star around its own center while the grid/tile stays axis-aligned, instead of rotating the whole pattern. This tiles seamlessly (a small width/height is enough) and is much faster than rotating the whole pattern on large tiles.
|
|
24
|
+
- **spikes** (`undefined | number`) — Default 5 Number of spikes.
|
|
25
|
+
|
|
26
|
+
### Inherited from IPatternSettings
|
|
27
|
+
|
|
28
|
+
- **color** (`Color`) — Color of the pattern shape.
|
|
29
|
+
- **colorOpacity** (`undefined | number`) — Opacity of the pattern shape.
|
|
30
|
+
- **fill** (`Color`) — Color to fill gaps between pattern shapes.
|
|
31
|
+
- **fillOpacity** (`undefined | number`) — Opacity of the fill for gaps between pattern shapes.
|
|
32
|
+
- **height** (`undefined | number`) — Height of the pattern tile, in pixels.
|
|
33
|
+
- **repetition** (`"repeat" | "repeat-x" | "repeat-y" | "no-repeat"`) — How pattern tiles are repeated when filling the area.
|
|
34
|
+
- **rotation** (`undefined | number`) — Default 0 Rotation of pattern in degrees. Supported values: -90 to 90. See also `rotateShapes`.
|
|
35
|
+
- **strokeDasharray** (`number[] | number`) — Stroke (border or line) dash settings.
|
|
36
|
+
- **strokeDashoffset** (`undefined | number`) — Stroke (border or line) dash offset.
|
|
37
|
+
- **strokeWidth** (`undefined | number`) — Default 1 Width of the pattern's line elements.
|
|
38
|
+
- **width** (`undefined | number`) — Width of the pattern tile, in pixels.
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "ITrianglePatternSettings"
|
|
3
|
+
type: "interface"
|
|
4
|
+
source: "https://www.amcharts.com/docs/v5/reference/itrianglepatternsettings/"
|
|
5
|
+
generatedFrom: "@amcharts/amcharts5@5.20.1"
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
Settings for `TrianglePattern` (added in 5.20.0).
|
|
9
|
+
|
|
10
|
+
## Inheritance
|
|
11
|
+
|
|
12
|
+
Extends: IPatternSettings
|
|
13
|
+
|
|
14
|
+
> **Note:** This interface also inherits all settings from IPatternSettings (and its ancestors). Use `get_doc` or `get_core_reference` with the parent interface name to see inherited members.
|
|
15
|
+
|
|
16
|
+
## Properties
|
|
17
|
+
|
|
18
|
+
- **centered** (`undefined | false | true`) — Default true Center triangles in their grid cell.
|
|
19
|
+
- **checkered** (`undefined | false | true`) — Default false If set to true, will place every second triangle, creating a checkered pattern.
|
|
20
|
+
- **gap** (`undefined | number`) — Default 6 Gap between triangles, in pixels.
|
|
21
|
+
- **maxHeight** (`undefined | number`) — Default 8 Height of the triangle, in pixels.
|
|
22
|
+
- **maxWidth** (`undefined | number`) — Default 8 Width of the triangle, in pixels.
|
|
23
|
+
- **rotateShapes** (`undefined | false | true`) — Default false If set to true, rotation rotates each triangle around its own center while the grid/tile stays axis-aligned, instead of rotating the whole pattern. This tiles seamlessly (a small width/height is enough) and is much faster than rotating the whole pattern on large tiles.
|
|
24
|
+
|
|
25
|
+
### Inherited from IPatternSettings
|
|
26
|
+
|
|
27
|
+
- **color** (`Color`) — Color of the pattern shape.
|
|
28
|
+
- **colorOpacity** (`undefined | number`) — Opacity of the pattern shape.
|
|
29
|
+
- **fill** (`Color`) — Color to fill gaps between pattern shapes.
|
|
30
|
+
- **fillOpacity** (`undefined | number`) — Opacity of the fill for gaps between pattern shapes.
|
|
31
|
+
- **height** (`undefined | number`) — Height of the pattern tile, in pixels.
|
|
32
|
+
- **repetition** (`"repeat" | "repeat-x" | "repeat-y" | "no-repeat"`) — How pattern tiles are repeated when filling the area.
|
|
33
|
+
- **rotation** (`undefined | number`) — Default 0 Rotation of pattern in degrees. Supported values: -90 to 90. See also `rotateShapes`.
|
|
34
|
+
- **strokeDasharray** (`number[] | number`) — Stroke (border or line) dash settings.
|
|
35
|
+
- **strokeDashoffset** (`undefined | number`) — Stroke (border or line) dash offset.
|
|
36
|
+
- **strokeWidth** (`undefined | number`) — Default 1 Width of the pattern's line elements.
|
|
37
|
+
- **width** (`undefined | number`) — Width of the pattern tile, in pixels.
|
|
@@ -57,20 +57,36 @@ Extends: ISeriesSettings
|
|
|
57
57
|
|
|
58
58
|
## Properties
|
|
59
59
|
|
|
60
|
-
- **
|
|
60
|
+
- **allowNesting** (`undefined | false | true`) — Default true *(since 5.20.1)* Whether words may nest into each other's empty space. When true a word is packed against its neighbors' letters, so small words tuck into the concavities of bigger ones and the cloud packs tightly — but bounding boxes may overlap. Set to false to pack whole bounding boxes instead, so they never overlap (useful when labels have an opaque background, whose rectangles would otherwise slide into a neighbor's gaps).
|
|
61
|
+
- **angles** (`number[]`) — Default [0, -90] An array of possible rotation angles for words. As of 5.20.1 any angle is supported (e.g. [0, -30, -45]); earlier versions only handled 0, 90 and -90. Note that an overly wide word may still be flipped to 0 or ±90 for a better fit, but only if that value is present in the array.
|
|
61
62
|
- **animationDuration** (`undefined | number`) — Duration of word animation when chart resizes.
|
|
62
63
|
- **animationEasing** (`undefined | ( t: Time) => Time`) — Default am5.ease.out($ease.cubic) An easing function to use for word animations. Click here for more info
|
|
63
|
-
- **autoFit** (`undefined | false | true`) — Default false
|
|
64
|
+
- **autoFit** (`undefined | false | true`) — Default true (set by WordCloudDefaultTheme; the typings' @default false is stale) Indicates whether font sizes are scaled down so all words fit the available area.
|
|
64
65
|
- **categoryField** (`undefined | string`) — A field in data that holds category names.
|
|
65
66
|
- **colors** (`ColorSet`) — A ColorSet to use when asigning colors for slices.
|
|
66
|
-
- **excludeWords** (`Array`) — Array of words exclude from cloud.
|
|
67
|
+
- **excludeWords** (`Array`) — Default [] Array of words exclude from cloud.
|
|
67
68
|
- **fillField** (`undefined | string`) — A field that holds color for label fill.
|
|
69
|
+
- **maskByShape** (`undefined | false | true`) — Default false *(since 5.20.1)* If set to true, words are clipped to the svgPath shape, so the parts of letters that overhang the outline (see shapeTolerance) are cut off at the edge for a crisp silhouette. Requires svgPath.
|
|
68
70
|
- **maxCount** (`undefined | number`) — Maximum number of words to show.
|
|
69
|
-
- **maxFontSize** (`number | Percent`) — Absolute or relative font size for the biggest words.
|
|
70
|
-
- **minFontSize** (`number | Percent`) — Absolute or relative font size for the smallest words.
|
|
71
|
+
- **maxFontSize** (`number | Percent`) — Default 15% Absolute or relative font size for the biggest words.
|
|
72
|
+
- **minFontSize** (`number | Percent`) — Default 2% Absolute or relative font size for the smallest words.
|
|
71
73
|
- **minValue** (`undefined | number`) — Minimum occurances for a word to be included into cloud.
|
|
72
|
-
- **minWordLength** (`undefined | number`) — Minimum number of characters for a word to be included in the cloud.
|
|
74
|
+
- **minWordLength** (`undefined | number`) — Default 1 Minimum number of characters for a word to be included in the cloud.
|
|
73
75
|
- **progress** (`undefined | number`) — Progress of current word layout animation. (0-1) @readonly
|
|
74
|
-
- **
|
|
75
|
-
- **
|
|
76
|
+
- **randomizeAngles** (`undefined | false | true`) — Default true *(since 5.20.1)* How a word's rotation is chosen from angles. When true each word picks a random angle from angles, so the cloud looks different on every layout. When false words cycle through angles in order (word 0 gets angles[0], word 1 angles[1], and so on), which — together with randomness: 0 — makes the layout reproducible.
|
|
77
|
+
- **randomness** (`undefined | number`) — Default 0 Randomness of word placement (0-1).
|
|
78
|
+
- **shapeTolerance** (`undefined | number`) — Default 0 *(since 5.20.1)* Extra distance (in pixels) a word may extend past the svgPath outline, on top of the automatic per-word overhang (a fraction of each word's own size). Can also be negative to pull words further inside the outline, creating visual padding between the words and the shape edge. Only affects placement — the drawn shape outline is unchanged. Requires svgPath.
|
|
79
|
+
- **step** (`undefined | number`) — Default 15 Step for next word placement.
|
|
80
|
+
- **svgPath** (`undefined | string`) — *(since 5.20.1)* Experimental: if set, words are arranged to fill this shape. The path is scaled proportionally to fit the plot area. The fit is approximate — favor simple, bold shapes over complex, thin, or highly concave ones, and tune shapeTolerance, maskByShape, angles (and minFontSize/maxFontSize) to get a better fill for a particular shape.
|
|
76
81
|
- **text** (`undefined | string`) — Source text from which words are extracted.
|
|
82
|
+
|
|
83
|
+
### Inherited from ISeriesSettings (notable for WordCloud)
|
|
84
|
+
|
|
85
|
+
- **sequencedInterpolation** (`undefined | false | true`) — Default true (set by WordCloudDefaultTheme) Staggers the word reveal instead of showing all words at once.
|
|
86
|
+
- **sequencedDelay** (`undefined | number`) — Default 15 Milliseconds between words when sequencedInterpolation is enabled.
|
|
87
|
+
|
|
88
|
+
## Breaking change in 5.20.1
|
|
89
|
+
|
|
90
|
+
The WordCloud layout is now computed synchronously in a single pass instead of one word per animation frame — much faster for large clouds. The per-data-item `ghostLabel` is removed and labels are held in an internal container, so code reading `dataItem.get("ghostLabel")` or walking `series.children` for labels needs updating. Use `series.labels` (a `ListTemplate<Label>`) or `dataItem.get("label")` instead.
|
|
91
|
+
|
|
92
|
+
A `series.shape` (`Graphics`) element was added; it draws the `svgPath` outline behind the words. Its geometry and `forceHidden` are managed by the series — only `fill`/`stroke` styling is yours to set.
|
|
@@ -82,6 +82,8 @@ Extended by: IRadarChartSettings, IStockPanelSettings, ICurveChartSettings
|
|
|
82
82
|
- **pinchZoomY** (`undefined | false | true`) — Default false If set to true, using pinch gesture on the chart's plot area will zoom chart vertically. NOTE: this setting is not supported in a RadarChart. Click here for more info @since 5.1.8
|
|
83
83
|
- **scrollbarX** (`Scrollbar`) — horizontal scrollbar. Click here for more info
|
|
84
84
|
- **scrollbarY** (`Scrollbar`) — Vertical scrollbar.
|
|
85
|
+
- **strokeDasharrays** (`Array<number | Array<number>>`) — *(since 5.20.0)* A list of stroke dash arrays to cycle through for line series as they are added, the same way colors cycles series colors. Each entry is a strokeDasharray value (an array of dash/gap lengths, or a single number); 0 or an empty array is a solid line.
|
|
86
|
+
- **strokeWidths** (`Array<number>`) — *(since 5.20.0)* A list of stroke widths (in pixels) to cycle through for line series as they are added, the same way colors cycles series colors. Each added line series is given the next width based on its position. Useful for telling line series apart without relying on color (e.g. the "Patterns" theme).
|
|
85
87
|
- **wheelStep** (`undefined | number`) — Default 0.25 Indicates the relative "speed" of the mouse wheel.
|
|
86
88
|
- **wheelX** (`"zoomX" | "zoomY" | "zoomXY" | "panX" | "panY" | "panXY" | "none"`) — Indicates what happens when mouse wheel is spinned horizontally while over plot area. Click here for more info
|
|
87
89
|
- **wheelY** (`"zoomX" | "zoomY" | "zoomXY" | "panX" | "panY" | "panXY" | "none"`) — Indicates what happens when mouse wheel is spinned vertically while over plot area. Click here for more info
|
|
@@ -85,6 +85,7 @@ Extended by: IRadarCursorSettings, ICurveCursorSettings
|
|
|
85
85
|
|
|
86
86
|
- **alwaysShow** (`undefined | false | true`) — Default false If set to true, cursor will not be hidden when mouse cursor moves out of the plot area.
|
|
87
87
|
- **behavior** (`"zoomX" | "zoomY" | "zoomXY" | "selectX" | "selectY" | "selectXY" | "none"`) — Default "none" What should cursor do when dragged across plot area. Click here for more info
|
|
88
|
+
- **clickTolerance** (`undefined | number`) — Default 0 *(since 5.20.0)* How far (in pixels) outside the plot area a press can start and still begin a zoom/selection, when behavior is set to a zoom or select mode. Makes it easier to start selecting near the edges of the plot area. The selection still starts on the edge of the plot area (the press point is clamped into it). A value of 0 (default) disables this and keeps the original behavior: a selection can only start within the plot area.
|
|
88
89
|
- **moveThreshold** (`undefined | number`) — Default 1 Minimum distance in pixels between down and up points. If a distance is less than the value of moveThreshold, the zoom or selection won't happen. @since 5.2.20
|
|
89
90
|
- **positionX** (`undefined | number`) — Cursor's horizontal position relative to plot area. If this setting is set, cursor will not react to mouse/touch and will just sit at specified position until positionX is reset to undefined. 0 - left, 1 - right.
|
|
90
91
|
- **positionY** (`undefined | number`) — Cursor's vertical position relative to plot area. If this setting is set, cursor will not react to mouse/touch and will just sit at specified position until positionY is reset to undefined. 0 - left, 1 - right.
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "StarPattern"
|
|
3
|
+
type: "class"
|
|
4
|
+
source: "https://www.amcharts.com/docs/v5/reference/starpattern/"
|
|
5
|
+
generatedFrom: "@amcharts/amcharts5@5.20.1"
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
Star pattern. Draws a grid of stars, used as a `fillPattern` or `strokePattern` on any element.
|
|
9
|
+
|
|
10
|
+
Added in 5.20.0.
|
|
11
|
+
|
|
12
|
+
## Import
|
|
13
|
+
|
|
14
|
+
```javascript
|
|
15
|
+
// Import StarPattern
|
|
16
|
+
import * as am5 from "@amcharts/amcharts5"
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## Usage
|
|
20
|
+
|
|
21
|
+
```javascript
|
|
22
|
+
columnSeries.columns.template.set("fillPattern", am5.StarPattern.new(root, {
|
|
23
|
+
color: am5.color(0xffffff),
|
|
24
|
+
radius: 5,
|
|
25
|
+
innerRadius: am5.percent(50),
|
|
26
|
+
spikes: 5,
|
|
27
|
+
gap: 6
|
|
28
|
+
}));
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
## Inheritance
|
|
32
|
+
|
|
33
|
+
Extends: Pattern
|
|
34
|
+
|
|
35
|
+
> **Note:** This class also inherits all settings, properties, methods, and events from Pattern (and its ancestors). Use `get_doc` or `get_core_reference` with the parent class name to see inherited members.
|
|
36
|
+
|
|
37
|
+
## Settings
|
|
38
|
+
|
|
39
|
+
- **centered** (`undefined | false | true`) — Default true Center stars in their grid cell.
|
|
40
|
+
- **checkered** (`undefined | false | true`) — Default false If set to true, will place every second star, creating a checkered pattern.
|
|
41
|
+
- **gap** (`undefined | number`) — Default 6 Gap between stars, in pixels.
|
|
42
|
+
- **innerRadius** (`undefined | number | Percent`) — Default 50% Inner radius of the star. Either an absolute pixel value or a percent of radius.
|
|
43
|
+
- **radius** (`undefined | number`) — Default 5 Outer radius of the star, in pixels.
|
|
44
|
+
- **rotateShapes** (`undefined | false | true`) — Default false If set to true, rotation rotates each star around its own center while the grid/tile stays axis-aligned, instead of rotating the whole pattern. This tiles seamlessly (a small width/height is enough) and is much faster than rotating the whole pattern on large tiles.
|
|
45
|
+
- **spikes** (`undefined | number`) — Default 5 Number of spikes.
|
|
46
|
+
|
|
47
|
+
See `IStarPatternSettings` (`reference/istarpatternsettings`) for the full settings list including everything inherited from `IPatternSettings`.
|
|
48
|
+
|
|
49
|
+
## Notes
|
|
50
|
+
|
|
51
|
+
A star pattern's tile is only a repeat unit — the grid repeats every cell — so an oversized `width`/`height` just wastes memory and draw time for an identical result. The class normalizes the tile to a single cell (2x2 cells when `checkered`). This optimization is skipped for a whole-pattern `rotation` (which isn't periodic on an axis-aligned tile — use `rotateShapes` for that) and for non-`repeat` repetitions.
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "TrianglePattern"
|
|
3
|
+
type: "class"
|
|
4
|
+
source: "https://www.amcharts.com/docs/v5/reference/trianglepattern/"
|
|
5
|
+
generatedFrom: "@amcharts/amcharts5@5.20.1"
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
Triangle pattern. Draws a grid of triangles, used as a `fillPattern` or `strokePattern` on any element.
|
|
9
|
+
|
|
10
|
+
Added in 5.20.0.
|
|
11
|
+
|
|
12
|
+
## Import
|
|
13
|
+
|
|
14
|
+
```javascript
|
|
15
|
+
// Import TrianglePattern
|
|
16
|
+
import * as am5 from "@amcharts/amcharts5"
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## Usage
|
|
20
|
+
|
|
21
|
+
```javascript
|
|
22
|
+
columnSeries.columns.template.set("fillPattern", am5.TrianglePattern.new(root, {
|
|
23
|
+
color: am5.color(0xffffff),
|
|
24
|
+
maxWidth: 8,
|
|
25
|
+
maxHeight: 8,
|
|
26
|
+
gap: 6
|
|
27
|
+
}));
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
## Inheritance
|
|
31
|
+
|
|
32
|
+
Extends: Pattern
|
|
33
|
+
|
|
34
|
+
> **Note:** This class also inherits all settings, properties, methods, and events from Pattern (and its ancestors). Use `get_doc` or `get_core_reference` with the parent class name to see inherited members.
|
|
35
|
+
|
|
36
|
+
## Settings
|
|
37
|
+
|
|
38
|
+
- **centered** (`undefined | false | true`) — Default true Center triangles in their grid cell.
|
|
39
|
+
- **checkered** (`undefined | false | true`) — Default false If set to true, will place every second triangle, creating a checkered pattern.
|
|
40
|
+
- **gap** (`undefined | number`) — Default 6 Gap between triangles, in pixels.
|
|
41
|
+
- **maxHeight** (`undefined | number`) — Default 8 Height of the triangle, in pixels.
|
|
42
|
+
- **maxWidth** (`undefined | number`) — Default 8 Width of the triangle, in pixels.
|
|
43
|
+
- **rotateShapes** (`undefined | false | true`) — Default false If set to true, rotation rotates each triangle around its own center while the grid/tile stays axis-aligned, instead of rotating the whole pattern. This tiles seamlessly (a small width/height is enough) and is much faster than rotating the whole pattern on large tiles.
|
|
44
|
+
|
|
45
|
+
See `ITrianglePatternSettings` (`reference/itrianglepatternsettings`) for the full settings list including everything inherited from `IPatternSettings`.
|
|
46
|
+
|
|
47
|
+
## Notes
|
|
48
|
+
|
|
49
|
+
A triangle pattern's tile is only a repeat unit — the grid repeats every cell — so an oversized `width`/`height` just wastes memory and draw time for an identical result. The class normalizes the tile to a single cell (2x2 cells when `checkered`). This optimization is skipped for a whole-pattern `rotation` (which isn't periodic on an axis-aligned tile — use `rotateShapes` for that) and for non-`repeat` repetitions.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@amcharts/amcharts5-mcp",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.4.0",
|
|
4
4
|
"mcpName": "io.github.amcharts/amcharts5",
|
|
5
5
|
"description": "On-demand access to amCharts 5 docs, code examples, and API reference",
|
|
6
6
|
"type": "module",
|
|
@@ -12,12 +12,17 @@
|
|
|
12
12
|
"src/",
|
|
13
13
|
"content/",
|
|
14
14
|
"extended/",
|
|
15
|
+
"!extended/reference-generated/",
|
|
15
16
|
"README.md",
|
|
16
17
|
"LICENSE"
|
|
17
18
|
],
|
|
18
19
|
"scripts": {
|
|
19
20
|
"start": "node src/index.js",
|
|
20
21
|
"dev": "node --watch src/index.js",
|
|
22
|
+
"test": "node test.js",
|
|
23
|
+
"build:worker": "node scripts/build-worker-content.js",
|
|
24
|
+
"dev:worker": "npm run build:worker && wrangler dev",
|
|
25
|
+
"deploy": "npm run build:worker && wrangler deploy",
|
|
21
26
|
"prepublishOnly": "node -e \"const fs=require('fs');if(!fs.existsSync('content'))fs.mkdirSync('content');fs.cpSync('amcharts5-skill/amcharts5-skill/SKILL.md','content/SKILL.md');for(const f of fs.readdirSync('amcharts5-skill/amcharts5-skill/references').filter(x=>x.endsWith('.md')))fs.cpSync('amcharts5-skill/amcharts5-skill/references/'+f,'content/'+f)\"",
|
|
22
27
|
"postpublish": "node -e \"require('fs').rmSync('content',{recursive:true,force:true})\""
|
|
23
28
|
},
|
|
@@ -48,5 +53,9 @@
|
|
|
48
53
|
"@modelcontextprotocol/sdk": "^1.12.1",
|
|
49
54
|
"jsdom": "^29.0.0",
|
|
50
55
|
"turndown": "^7.2.2"
|
|
56
|
+
},
|
|
57
|
+
"devDependencies": {
|
|
58
|
+
"agents": "^0.16.2",
|
|
59
|
+
"wrangler": "^4.102.0"
|
|
51
60
|
}
|
|
52
61
|
}
|