apexcharts-skill 1.0.0 → 1.2.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 CHANGED
@@ -2,6 +2,16 @@
2
2
 
3
3
  AI coding skill for building [ApexCharts.js](https://apexcharts.com/) charts and data visualizations. Works with Claude Code, Cursor, GitHub Copilot, and any AI coding assistant.
4
4
 
5
+ > **ApexCharts ecosystem — make sure this is the skill you want.** `apexcharts-skill` covers the core **ApexCharts.js charting** library only. Every other product in the ecosystem is a **separate npm library with its own dedicated skill package and repo** — grab the one that matches your library:
6
+ >
7
+ > | Product | npm library | Skill package & repo |
8
+ > |---|---|---|
9
+ > | **ApexCharts** — charts · *this skill* | `apexcharts` | `apexcharts-skill` |
10
+ > | **ApexGantt** — Gantt / timeline | `apexgantt` | [`apexgantt-skill`](https://github.com/apexcharts/apexgantt-skill) |
11
+ > | **ApexTree** — hierarchy / org charts | `apextree` | [`apextree-skill`](https://github.com/apexcharts/apextree-skill) |
12
+ > | **ApexSankey** — flow / Sankey | `apexsankey` | [`apexsankey-skill`](https://github.com/apexcharts/apexsankey-skill) |
13
+ > | **Apex Grid** — data grid | `apex-grid` | [`apexgrid-skill`](https://github.com/apexcharts/apexgrid-skill) |
14
+
5
15
  ## What This Does
6
16
 
7
17
  AI models frequently generate incorrect ApexCharts code — wrong series data formats, missing `render()` calls, broken formatter signatures, etc. This skill provides structured reference files that help AI assistants generate correct ApexCharts code on the first try.
package/SKILL.md CHANGED
@@ -5,11 +5,13 @@ description: >
5
5
  Use when the user asks to create, configure, or troubleshoot any chart using ApexCharts
6
6
  (line, area, bar, pie, donut, radialBar, scatter, bubble, heatmap, candlestick, boxPlot,
7
7
  radar, polarArea, rangeBar, rangeArea, treemap). Covers correct data formats, lifecycle,
8
- formatters, tree-shaking, SSR, and framework integration.
8
+ formatters, tree-shaking, SSR, and framework integration. In React /
9
+ Vue / Angular projects, prefer the framework wrapper packages
10
+ (`react-apexcharts`, `vue3-apexcharts`, `ng-apexcharts`) over the core API.
9
11
  metadata:
10
12
  author: ApexCharts
11
- version: "1.0.0"
12
- library_version: ">=5.0.0"
13
+ version: "1.2.0"
14
+ library_version: "5.15.0"
13
15
  category: data-visualization
14
16
  tags: [charts, visualization, javascript, typescript, svg, apexcharts]
15
17
  docs: https://apexcharts.com/docs/
@@ -19,6 +21,13 @@ metadata:
19
21
 
20
22
  # ApexCharts AI Skill
21
23
 
24
+ > **Framework wrapper detection — check `package.json` before generating code.**
25
+ > - `react` → use **`react-apexcharts`** instead of the core API.
26
+ > - `vue` (Vue 3) → use **`vue3-apexcharts`**. Vue 2 → **`vue-apexcharts`**.
27
+ > - `@angular/core` → use **`ng-apexcharts`**.
28
+ >
29
+ > Wrappers handle `destroy()` automatically on unmount, accept reactive props, and forward events as idiomatic framework events. Use the core API directly only when no framework is detected, or when the user explicitly asks for vanilla. See `references/framework-wrappers.md`.
30
+
22
31
  ## 1. Critical Rules
23
32
 
24
33
  1. **Always call `chart.render()`** after `new ApexCharts(el, options)`. The constructor does not render.
@@ -46,7 +55,7 @@ This is the most critical reference. Using the wrong data format is the #1 cause
46
55
  |---|---|---|---|
47
56
  | Line | `'line'` | `[{ name, data: [number \| null] }]` or `[{ name, data: [{ x, y }] }]` | `series: [{ name: 'Sales', data: [30, 40, null, 50] }]` |
48
57
  | Area | `'area'` | Same as line | `series: [{ name: 'Views', data: [10, 20, 30] }]` |
49
- | Bar / Column | `'bar'` | Same as line. Use `plotOptions.bar.horizontal: true` for horizontal bars (default). Set `horizontal: false` for vertical columns. | `series: [{ name: 'Revenue', data: [44, 55, 41] }]` |
58
+ | Bar / Column | `'bar'` | Same as line. Defaults to **vertical columns**; set `plotOptions.bar.horizontal: true` for horizontal bars. | `series: [{ name: 'Revenue', data: [44, 55, 41] }]` |
50
59
  | Scatter | `'scatter'` | `[{ name, data: [{ x, y }] }]` — always use XY format | `series: [{ name: 'Points', data: [{ x: 1, y: 5 }, { x: 2, y: 10 }] }]` |
51
60
  | Bubble | `'bubble'` | `[{ name, data: [{ x, y, z }] }]` — **z is required** (bubble size) | `series: [{ name: 'Data', data: [{ x: 1, y: 30, z: 10 }] }]` |
52
61
  | Range Area | `'rangeArea'` | `[{ name, data: [{ x, y: [low, high] }] }]` | `series: [{ name: 'Temp', data: [{ x: 'Jan', y: [5, 15] }] }]` |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "apexcharts-skill",
3
- "version": "1.0.0",
3
+ "version": "1.2.0",
4
4
  "description": "AI coding skill for ApexCharts.js — structured reference docs that help AI assistants (Claude, Cursor, Copilot, etc.) generate correct ApexCharts code.",
5
5
  "keywords": [
6
6
  "apexcharts",
@@ -43,4 +43,4 @@
43
43
  "publishConfig": {
44
44
  "access": "public"
45
45
  }
46
- }
46
+ }
@@ -2,8 +2,8 @@
2
2
 
3
3
  ## Chart Types Covered
4
4
 
5
- - **Bar** (`'bar'`) — Horizontal bar chart (default orientation)
6
- - **Column** (`'bar'` + `plotOptions.bar.horizontal: false`) — Vertical bar/column chart
5
+ - **Column** (`'bar'`) — Vertical column chart (the default for `type: 'bar'`)
6
+ - **Bar** (`'bar'` + `plotOptions.bar.horizontal: true`) — Horizontal bar chart
7
7
  - **Range Bar** (`'rangeBar'`) — Bars with start/end values (used for timelines, Gantt charts)
8
8
 
9
9
  ## Tree-Shakeable Import
@@ -32,8 +32,8 @@ import ApexCharts from 'apexcharts/bar'
32
32
  },
33
33
  plotOptions: {
34
34
  bar: {
35
- horizontal: true // true = horizontal bars (default)
36
- // false = vertical columns
35
+ horizontal: true // true = horizontal bars
36
+ // false = vertical columns (default)
37
37
  }
38
38
  }
39
39
  }
@@ -237,7 +237,7 @@ series: [{
237
237
 
238
238
  ## Family-Specific Pitfalls
239
239
 
240
- 1. **Forgetting `plotOptions.bar.horizontal: false` for column charts** — ApexCharts defaults to horizontal bars. Set `horizontal: false` explicitly for vertical columns.
240
+ 1. **Assuming `type: 'bar'` renders horizontal bars** — it defaults to **vertical columns** (`horizontal: false`). Set `plotOptions.bar.horizontal: true` when you actually want horizontal bars.
241
241
  2. **Stacking with `chart.stacked: true` but missing on bar type** — stacking only works on `type: 'bar'` (and `'area'`). It does NOT work on line, scatter, etc.
242
242
  3. **Range Bar with single value instead of array** — `y` must be `[start, end]`, not a single number.
243
243
  4. **Timeline without `xaxis.type: 'datetime'`** — date-based range bars need `xaxis: { type: 'datetime' }` to render correctly.