@amcharts/amcharts5-mcp 1.3.2 → 1.5.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/content/SKILL.md +166 -8
- package/content/flow.md +4 -0
- package/content/hierarchy.md +21 -0
- package/content/map.md +75 -9
- package/content/pie.md +16 -0
- package/content/radar.md +1 -1
- package/content/stock.md +41 -1
- package/content/timeline.md +3 -3
- package/content/venn.md +4 -0
- package/content/wordcloud.md +92 -4
- package/content/xy.md +67 -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 +32 -0
- package/extended/concepts/serializing/chart-serializer.md +17 -2
- package/extended/concepts/serializing.md +14 -0
- package/extended/concepts/themes.md +91 -0
- package/extended/reference/ibasecolumnseriesdataitem.md +1 -0
- package/extended/reference/ibasecolumnseriessettings.md +2 -0
- package/extended/reference/ichartserializersettings.md +1 -0
- package/extended/reference/imapchartsettings.md +2 -0
- package/extended/reference/imaplineseriesdataitem.md +1 -0
- package/extended/reference/imaplineseriessettings.md +2 -0
- package/extended/reference/iparsesettings.md +9 -3
- package/extended/reference/irectanglepatternsettings.md +1 -0
- package/extended/reference/irootsettings.md +4 -0
- package/extended/reference/iscrollbarsettings.md +1 -0
- package/extended/reference/iserialchartcontainersettings.md +16 -0
- package/extended/reference/iseriessettings.md +2 -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/mapchart.md +4 -0
- package/extended/reference/serialchart.md +1 -1
- package/extended/reference/serialchartcontainer.md +34 -0
- package/extended/reference/starpattern.md +51 -0
- package/extended/reference/trianglepattern.md +49 -0
- package/package.json +2 -1
- package/src/content-fs.js +10 -0
- package/src/tools.js +73 -21
|
@@ -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.
|
|
@@ -43,3 +43,7 @@ If set to some string, it will be used as inner <div> ARIA-LABEL.
|
|
|
43
43
|
- **role** (`undefined | string`) — Allows setting a "role" for the inner <div>. @since 5.3.17 Click here for more info
|
|
44
44
|
- **tooltipContainerBounds** (`undefined | { bottom: number, left: number, right: number, top: number }`) — Allows defining margins around chart area for tooltips to go outside the chart itself. @since 5.2.24
|
|
45
45
|
|
|
46
|
+
- **fontFamily** (`undefined | string`) — Default font family for all text elements, unless overridden on an element. @since 5.20.2
|
|
47
|
+
- **fontSize** (`undefined | number | string`) — Default font size for all text elements, unless overridden on an element. @since 5.20.2
|
|
48
|
+
- **fontWeight** (`"normal" | "bold" | "bolder" | "lighter" | "100" | "200" | "300" | "400" | "500" | "600" | "700" | "800" | "900"`) — Default font weight for all text elements, unless overridden on an element. @since 5.20.2
|
|
49
|
+
- **sanitizeHTML** (`undefined | false | true`) — Default true If set to true, dynamically-set HTML (html/labelHTML, HTML tooltips, modal content) is sanitized. Set to false to opt out. @since 5.19.0
|
|
@@ -52,3 +52,4 @@ Extended by: ISliderSettings, IXYChartScrollbarSettings
|
|
|
52
52
|
- **end** (`undefined | number`) — Relative end of the selected range, with 0 meaning beginning, and 1 the end.
|
|
53
53
|
- **orientation** (`"horizontal" | "vertical"`) — Orientation of the scrollbar.
|
|
54
54
|
- **start** (`undefined | number`) — Relative start of the selected range, with 0 meaning beginning, and 1 the end.
|
|
55
|
+
- **opposite** (`undefined | false | true`) — Default false If set to true, a chart's scrollbarX is placed below the plot area and its scrollbarY to the left, instead of above and to the right. Only has effect on scrollbars set via a chart's scrollbarX/scrollbarY settings; a scrollbar the user added to a container themselves is left where it is. Unrelated to the `opposite` setting of AxisRendererX/AxisRendererY. @since 5.20.2
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "ISerialChartContainerSettings"
|
|
3
|
+
type: "interface"
|
|
4
|
+
source: "https://www.amcharts.com/docs/v5/reference/iserialchartcontainersettings/"
|
|
5
|
+
scraped: "2026-09-14"
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
## Inheritance
|
|
9
|
+
|
|
10
|
+
Extends: ISerialChartSettings
|
|
11
|
+
|
|
12
|
+
> **Note:** This class also inherits all settings, properties, methods, and events from ISerialChartSettings (and its ancestors). Use `get_doc` or `get_core_reference` with the parent class name to see inherited members.
|
|
13
|
+
|
|
14
|
+
## Properties
|
|
15
|
+
|
|
16
|
+
- **zoomTools** (`ZoomTools`) — A ZoomTools instance to add to the chart. When set, its `target` is automatically pointed at the chart's `seriesContainer`. @since 5.20.2
|
|
@@ -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
|
|
@@ -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.
|
|
@@ -66,3 +66,7 @@ Extends: SerialChart
|
|
|
66
66
|
- **wheelY** (`"none" | "zoom" | "rotateX" | "rotateY"`) — Default "zoom" Defines what happens when mouse wheel is turned. Click here for more info
|
|
67
67
|
- **zoomControl** (`ZoomControl`) — A ZoomControl instance. Click here for more info
|
|
68
68
|
- **zoomLevel** (`undefined | number`) — Current zoom level.
|
|
69
|
+
|
|
70
|
+
## Properties
|
|
71
|
+
|
|
72
|
+
- **boxZoomSelection** (`Rectangle`) — A Rectangle element that shows the area being drawn when boxZoom is enabled. Read-only; style its fill/stroke. @since 5.20.2
|
|
@@ -17,7 +17,7 @@ import * as am5 from "@amcharts/amcharts5"
|
|
|
17
17
|
## Inheritance
|
|
18
18
|
|
|
19
19
|
Extends: Chart
|
|
20
|
-
Extended by: PercentChart, XYChart, MapChart
|
|
20
|
+
Extended by: PercentChart, XYChart, MapChart, SerialChartContainer
|
|
21
21
|
|
|
22
22
|
> **Note:** This class also inherits all settings, properties, methods, and events from Chart (and its ancestors). Use `get_doc` or `get_core_reference` with the parent class name to see inherited members.
|
|
23
23
|
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "SerialChartContainer"
|
|
3
|
+
type: "class"
|
|
4
|
+
source: "https://www.amcharts.com/docs/v5/reference/serialchartcontainer/"
|
|
5
|
+
scraped: "2026-09-14"
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
A `SerialChart` whose `seriesContainer` is a `ZoomableContainer`, so that the chart contents can be zoomed and panned.
|
|
9
|
+
|
|
10
|
+
Unlike the abstract `SerialChart`, this chart attaches its `seriesContainer` to the display tree on its own, so it can be instantiated and used directly — e.g. to make a `ForceDirected`, `Tree` or `Pack` series zoomable/pannable. Bullets sit alongside the series inside the zoomable container, so they zoom and pan with it.
|
|
11
|
+
|
|
12
|
+
@since 5.20.2
|
|
13
|
+
|
|
14
|
+
## Import
|
|
15
|
+
|
|
16
|
+
```javascript
|
|
17
|
+
// Import SerialChartContainer — exported from the root module, not a chart package
|
|
18
|
+
import * as am5 from "@amcharts/amcharts5"
|
|
19
|
+
const chart = root.container.children.push(am5.SerialChartContainer.new(root, {}));
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
## Inheritance
|
|
23
|
+
|
|
24
|
+
Extends: SerialChart
|
|
25
|
+
|
|
26
|
+
> **Note:** This class also inherits all settings, properties, methods, and events from SerialChart (and its ancestors). Use `get_doc` or `get_core_reference` with the parent class name to see inherited members.
|
|
27
|
+
|
|
28
|
+
## Settings
|
|
29
|
+
|
|
30
|
+
- **zoomTools** (`ZoomTools`) — A ZoomTools instance to add to the chart. When set, its `target` is automatically pointed at the chart's `seriesContainer`.
|
|
31
|
+
|
|
32
|
+
## Properties
|
|
33
|
+
|
|
34
|
+
- **zoomableContainer** (`ZoomableContainer`) — Default ZoomableContainer.new() A ZoomableContainer which holds chart's `seriesContainer` so it can be zoomed and panned. Theme tag `serialchartcontainer` (default theme: `wheelable: false`, `pinchZoom: false`, `maskContent: true`).
|
|
@@ -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.5.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,6 +12,7 @@
|
|
|
12
12
|
"src/",
|
|
13
13
|
"content/",
|
|
14
14
|
"extended/",
|
|
15
|
+
"!extended/reference-generated/",
|
|
15
16
|
"README.md",
|
|
16
17
|
"LICENSE"
|
|
17
18
|
],
|
package/src/content-fs.js
CHANGED
|
@@ -25,6 +25,14 @@ const REFERENCES_DIR = existsSync(join(SKILL_DIR, "references"))
|
|
|
25
25
|
: SKILL_DIR;
|
|
26
26
|
const EXTENDED_DIR = join(ROOT, "extended");
|
|
27
27
|
|
|
28
|
+
// Directories under extended/ that must never be served. `reference-generated/`
|
|
29
|
+
// is work-in-progress output from scripts/generate-reference.cjs: it duplicates
|
|
30
|
+
// every page in reference/ under a second key, which makes search return each
|
|
31
|
+
// class twice and advertises an unfinished section via get_doc. It is untracked,
|
|
32
|
+
// but untracked does NOT mean unpublished — `files: ["extended/"]` packs from the
|
|
33
|
+
// filesystem, so without this it also ships in the npm tarball.
|
|
34
|
+
const EXTENDED_SKIP_DIRS = new Set(["reference-generated"]);
|
|
35
|
+
|
|
28
36
|
/**
|
|
29
37
|
* Read all skill + extended markdown into the raw { skillFiles, extendedFiles }
|
|
30
38
|
* shape that buildContent() expects.
|
|
@@ -58,6 +66,8 @@ function walkExtended(dir, prefix, out) {
|
|
|
58
66
|
for (const entry of readdirSync(dir, { withFileTypes: true })) {
|
|
59
67
|
const fullPath = join(dir, entry.name);
|
|
60
68
|
if (entry.isDirectory()) {
|
|
69
|
+
// Only skip at the top level — a nested dir of the same name is fine.
|
|
70
|
+
if (!prefix && EXTENDED_SKIP_DIRS.has(entry.name)) continue;
|
|
61
71
|
walkExtended(fullPath, prefix ? `${prefix}/${entry.name}` : entry.name, out);
|
|
62
72
|
} else if (entry.name.endsWith(".md")) {
|
|
63
73
|
const key = prefix
|
package/src/tools.js
CHANGED
|
@@ -12,6 +12,26 @@ import { CHART_TYPE_MAP, extractImportBlock, searchDocs } from "./content.js";
|
|
|
12
12
|
export function registerTools(server, content) {
|
|
13
13
|
const { docs, extendedDocs, examples } = content;
|
|
14
14
|
|
|
15
|
+
// Resolve any identifier a search result prints — "skill/SKILL.md",
|
|
16
|
+
// "skill/xy", "SKILL", "xy.md", "extended/charts/xy-chart/cursor",
|
|
17
|
+
// "charts/xy-chart/cursor", "reference/xycursor" — to a doc. Search results
|
|
18
|
+
// label their source exactly this way, so an agent can paste the label
|
|
19
|
+
// straight into get_section / get_doc.
|
|
20
|
+
function resolveDoc(id) {
|
|
21
|
+
let key = String(id || "").trim().replace(/^\/+|\/+$/g, "").replace(/\.md$/i, "");
|
|
22
|
+
if (!key) return null;
|
|
23
|
+
let skillKey = key.startsWith("skill/") ? key.slice("skill/".length) : key;
|
|
24
|
+
if (docs.has(skillKey)) return { doc: docs.get(skillKey), label: `skill/${skillKey}` };
|
|
25
|
+
const extKey = key.startsWith("extended/") ? key.slice("extended/".length) : key;
|
|
26
|
+
if (extendedDocs.has(extKey)) return { doc: extendedDocs.get(extKey), label: `extended/${extKey}` };
|
|
27
|
+
// Case-insensitive skill fallback ("skill" → "SKILL", "Xy" → "xy").
|
|
28
|
+
const lower = skillKey.toLowerCase();
|
|
29
|
+
for (const [name, doc] of docs) {
|
|
30
|
+
if (name.toLowerCase() === lower) return { doc, label: `skill/${name}` };
|
|
31
|
+
}
|
|
32
|
+
return null;
|
|
33
|
+
}
|
|
34
|
+
|
|
15
35
|
// --- Tool: list_chart_types ---
|
|
16
36
|
server.tool(
|
|
17
37
|
"list_chart_types",
|
|
@@ -86,12 +106,39 @@ export function registerTools(server, content) {
|
|
|
86
106
|
return { content: [{ type: "text", text: `No results found for "${query}".${hint}` }] };
|
|
87
107
|
}
|
|
88
108
|
|
|
109
|
+
// Per-result excerpt budget. When only one or two sections match, the
|
|
110
|
+
// whole point is to read them — grow the budget instead of cutting the
|
|
111
|
+
// answer off.
|
|
112
|
+
const budget = results.length <= 2 ? 6000 : 2000;
|
|
113
|
+
const terms = query.toLowerCase().split(/\s+/).filter(Boolean);
|
|
114
|
+
|
|
89
115
|
let text = `# Search results for "${query}" (scope: ${scope})\n\n`;
|
|
90
116
|
for (const r of results) {
|
|
117
|
+
const id = `${r.source}/${r.file}`;
|
|
91
118
|
text += `## ${r.docTitle} → ${r.heading}\n`;
|
|
92
|
-
text += `*(source: ${
|
|
93
|
-
|
|
94
|
-
|
|
119
|
+
text += `*(source: ${id}.md, relevance: ${r.score})*\n\n`;
|
|
120
|
+
let body = r.body;
|
|
121
|
+
if (body.length > budget) {
|
|
122
|
+
// The excerpt is a fixed-size head, so the line that matched the
|
|
123
|
+
// query may lie past the cut. Quote the matching lines beyond the
|
|
124
|
+
// head so the answer is never lost, and print the exact call that
|
|
125
|
+
// returns the full section.
|
|
126
|
+
const head = body.slice(0, budget);
|
|
127
|
+
const beyond = [];
|
|
128
|
+
let offset = 0;
|
|
129
|
+
for (const line of body.split("\n")) {
|
|
130
|
+
const start = offset;
|
|
131
|
+
offset += line.length + 1;
|
|
132
|
+
if (start < budget) continue;
|
|
133
|
+
const l = line.toLowerCase();
|
|
134
|
+
if (terms.some(t => l.includes(t))) beyond.push(line.trim().slice(0, 400));
|
|
135
|
+
if (beyond.length >= 8) break;
|
|
136
|
+
}
|
|
137
|
+
body = head + `\n\n...(truncated — full section: get_section(file: "${id}", heading: "${r.heading}"))`;
|
|
138
|
+
if (beyond.length) {
|
|
139
|
+
body += `\n\nMatching lines beyond the excerpt:\n` + beyond.map(l => `> ${l}`).join("\n");
|
|
140
|
+
}
|
|
141
|
+
}
|
|
95
142
|
text += body + "\n\n---\n\n";
|
|
96
143
|
}
|
|
97
144
|
return { content: [{ type: "text", text }] };
|
|
@@ -101,28 +148,29 @@ export function registerTools(server, content) {
|
|
|
101
148
|
// --- Tool: get_section ---
|
|
102
149
|
server.tool(
|
|
103
150
|
"get_section",
|
|
104
|
-
"Get
|
|
151
|
+
"Get the FULL text of one section of a doc by heading — use it to expand a truncated search_docs / search_all result. `file` accepts the source label exactly as search results print it ('skill/SKILL.md', 'skill/xy', 'extended/charts/xy-chart/cursor', 'reference/xycursor') as well as a bare skill file name ('SKILL', 'xy', 'map').",
|
|
105
152
|
{
|
|
106
|
-
file: z.string().describe("
|
|
107
|
-
heading: z.string().describe("Section heading to retrieve, e.g. 'Core setup pattern', 'Axis types', 'Common pitfalls'"),
|
|
153
|
+
file: z.string().describe("Doc identifier: a skill file ('SKILL', 'xy', 'pie', 'map') or a source label from search results ('skill/SKILL.md', 'extended/concepts/events', 'reference/xycursor'). '.md' and 'skill/' / 'extended/' prefixes are optional."),
|
|
154
|
+
heading: z.string().describe("Section heading to retrieve (case-insensitive substring), e.g. 'Core setup pattern', 'Axis types', 'Common pitfalls', 'Recent API changes'"),
|
|
108
155
|
},
|
|
109
156
|
async ({ file, heading }) => {
|
|
110
|
-
const
|
|
111
|
-
if (!
|
|
112
|
-
|
|
157
|
+
const resolved = resolveDoc(file);
|
|
158
|
+
if (!resolved) {
|
|
159
|
+
const skillFiles = [...docs.keys()].map(k => `skill/${k}`).join(", ");
|
|
160
|
+
return { content: [{ type: "text", text: `File "${file}" not found.\n\nSkill files: ${skillFiles}\n\nExtended docs use their path, e.g. 'charts/xy-chart/cursor', 'concepts/events', 'reference/xycursor' (with or without an 'extended/' prefix). Use search_docs / search_all to find one.` }] };
|
|
113
161
|
}
|
|
162
|
+
const { doc, label } = resolved;
|
|
114
163
|
|
|
115
|
-
const
|
|
116
|
-
|
|
117
|
-
);
|
|
164
|
+
const needle = heading.toLowerCase();
|
|
165
|
+
const section = doc.sections.find(s => s.heading.toLowerCase().includes(needle));
|
|
118
166
|
if (!section) {
|
|
119
167
|
const available = doc.sections.map(s => s.heading).filter(Boolean).join("\n- ");
|
|
120
168
|
return {
|
|
121
|
-
content: [{ type: "text", text: `Section "${heading}" not found in ${
|
|
169
|
+
content: [{ type: "text", text: `Section "${heading}" not found in ${label}.md.\n\nAvailable sections:\n- ${available}` }],
|
|
122
170
|
};
|
|
123
171
|
}
|
|
124
172
|
return {
|
|
125
|
-
content: [{ type: "text", text: `# ${section.heading}\n\n${section.body}` }],
|
|
173
|
+
content: [{ type: "text", text: `# ${section.heading}\n*(source: ${label}.md)*\n\n${section.body}` }],
|
|
126
174
|
};
|
|
127
175
|
}
|
|
128
176
|
);
|
|
@@ -244,22 +292,26 @@ export function registerTools(server, content) {
|
|
|
244
292
|
// --- Tool: get_doc ---
|
|
245
293
|
server.tool(
|
|
246
294
|
"get_doc",
|
|
247
|
-
"Get a full documentation page
|
|
295
|
+
"Get a full documentation page — an extended doc by path, or a skill file by 'skill/<name>'. Accepts the source label exactly as search_docs / search_all print it. Use search_all first to find the right path.",
|
|
248
296
|
{
|
|
249
|
-
path: z.string().describe("Doc path, e.g. 'charts/xy-chart/cursor', 'concepts/events', 'getting-started/integrations/react', 'reference/xycursor' (per-class API). For a class's full settings + defaults prefer get_api_reference."),
|
|
297
|
+
path: z.string().describe("Doc path, e.g. 'charts/xy-chart/cursor', 'concepts/events', 'getting-started/integrations/react', 'reference/xycursor' (per-class API), or a skill file such as 'skill/SKILL.md' / 'skill/xy'. For a class's full settings + defaults prefer get_api_reference."),
|
|
250
298
|
},
|
|
251
299
|
async ({ path: docPath }) => {
|
|
252
|
-
const key = docPath.replace(/^\/|\/$/g, "").replace(/\.md$/, "");
|
|
253
|
-
|
|
254
|
-
|
|
300
|
+
const key = String(docPath || "").replace(/^\/|\/$/g, "").replace(/\.md$/, "");
|
|
301
|
+
// Extended docs take precedence for bare paths; 'skill/…' always means the skill layer.
|
|
302
|
+
const resolved = key.startsWith("skill/")
|
|
303
|
+
? resolveDoc(key)
|
|
304
|
+
: (extendedDocs.has(key) ? { doc: extendedDocs.get(key), label: `extended/${key}` } : resolveDoc(key));
|
|
305
|
+
if (!resolved) {
|
|
255
306
|
// List available top-level paths
|
|
256
307
|
const paths = [...extendedDocs.keys()];
|
|
257
308
|
const topLevel = [...new Set(paths.map(p => p.split("/")[0]))].sort();
|
|
258
309
|
return {
|
|
259
|
-
content: [{ type: "text", text: `Doc "${key}" not found.\n\nAvailable top-level sections: ${topLevel.join(", ")}\n\nUse search_all to find the right path.` }],
|
|
310
|
+
content: [{ type: "text", text: `Doc "${key}" not found.\n\nAvailable top-level sections: skill, ${topLevel.join(", ")}\n\nSkill files: ${[...docs.keys()].map(k => `skill/${k}`).join(", ")}\n\nUse search_all to find the right path.` }],
|
|
260
311
|
};
|
|
261
312
|
}
|
|
262
|
-
|
|
313
|
+
const { doc, label } = resolved;
|
|
314
|
+
return { content: [{ type: "text", text: `# ${doc.title}\n*(source: ${label}.md)*\n\n${doc.content}` }] };
|
|
263
315
|
}
|
|
264
316
|
);
|
|
265
317
|
|