{"_id":"@ariefsn/svelte-apexcharts","name":"@ariefsn/svelte-apexcharts","dist-tags":{"latest":"1.0.0"},"versions":{"1.0.0":{"name":"@ariefsn/svelte-apexcharts","description":"A lightweight Svelte 5 wrapper for ApexCharts with reactive options support.","version":"1.0.0","scripts":{"dev":"vite dev","build":"vite build && npm run prepack","preview":"vite preview","prepare":"svelte-kit sync || echo ''","prepack":"svelte-kit sync && svelte-package && publint","check":"svelte-kit sync && svelte-check --tsconfig ./tsconfig.json","check:watch":"svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch","lint":"prettier --check . && eslint .","format":"prettier --write .","test:unit":"vitest","test":"npm run test:unit -- --run","storybook":"storybook dev -p 6006","build-storybook":"storybook build"},"sideEffects":["**/*.css"],"svelte":"./dist/index.js","types":"./dist/index.d.ts","type":"module","exports":{".":{"types":"./dist/index.d.ts","svelte":"./dist/index.js"}},"peerDependencies":{"svelte":"^5.0.0"},"devDependencies":{"@chromatic-com/storybook":"^5.0.1","@eslint/compat":"^2.0.2","@eslint/js":"^9.39.2","@storybook/addon-a11y":"^10.2.15","@storybook/addon-docs":"^10.2.15","@storybook/addon-svelte-csf":"^5.0.11","@storybook/addon-vitest":"^10.2.15","@storybook/sveltekit":"^10.2.15","@sveltejs/adapter-auto":"^7.0.0","@sveltejs/adapter-static":"^3.0.10","@sveltejs/kit":"^2.50.2","@sveltejs/package":"^2.5.7","@sveltejs/vite-plugin-svelte":"^6.2.4","@types/node":"^22","@vitest/browser-playwright":"^4.0.18","@vitest/coverage-v8":"^4.0.18","eslint":"^9.39.2","eslint-config-prettier":"^10.1.8","eslint-plugin-storybook":"^10.2.15","eslint-plugin-svelte":"^3.14.0","globals":"^17.3.0","playwright":"^1.58.2","prettier":"^3.8.1","prettier-plugin-svelte":"^3.4.1","publint":"^0.3.17","storybook":"^10.2.15","svelte":"^5.51.0","svelte-check":"^4.4.2","typescript":"^5.9.3","typescript-eslint":"^8.54.0","vite":"^7.3.1","vitest":"^4.0.18","vitest-browser-svelte":"^2.0.2"},"homepage":"https://github.com/ariefsn/svelte-apexcharts#readme","repository":{"type":"git","url":"git+https://github.com/ariefsn/svelte-apexcharts.git"},"bugs":{"url":"https://github.com/ariefsn/svelte-apexcharts/issues"},"license":"MIT","author":{"name":"Arief Setiyo Nugroho"},"keywords":["svelte","apexcharts","chart","svelte5","data-visualization","line-chart","bar-chart","area-chart","pie-chart","donut-chart","reactive","typescript","wrapper","visualization","svelte-component","runes"],"dependencies":{"apexcharts":"^5.10.1"},"_id":"@ariefsn/svelte-apexcharts@1.0.0","gitHead":"1ac938de2fcada88c87e2d00c1f145a473359856","_nodeVersion":"22.20.0","_npmVersion":"10.9.3","dist":{"integrity":"sha512-m0KtBUtjjdnWP8NJOoBr7a2JDNBNfgHagsnG2zTLHNpz4Ax+xb7wm73C4jU9h84MN7JxnKYuUqL7DAk7ukfcGw==","shasum":"cff1e4b5821f43843eb180359923296000d87b6d","tarball":"https://registry.npmjs.org/@ariefsn/svelte-apexcharts/-/svelte-apexcharts-1.0.0.tgz","fileCount":19,"unpackedSize":15616,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCICSg6VXRcm0GmOQimxLijQaBrAMK0bg5sDVf5NTk4jxAAiEAveJop2cnnnpNCUsw0WayFYizkUSR0FeDlGu4VxjsvQ4="}]},"_npmUser":{"name":"ariefsn","email":"ayiexz22@gmail.com"},"directories":{},"maintainers":[{"name":"ariefsn","email":"ayiexz22@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/svelte-apexcharts_1.0.0_1772779695664_0.8107860165050431"},"_hasShrinkwrap":false}},"time":{"created":"2026-03-06T06:48:15.550Z","1.0.0":"2026-03-06T06:48:15.807Z","modified":"2026-03-06T06:48:16.035Z"},"maintainers":[{"name":"ariefsn","email":"ayiexz22@gmail.com"}],"description":"A lightweight Svelte 5 wrapper for ApexCharts with reactive options support.","homepage":"https://github.com/ariefsn/svelte-apexcharts#readme","keywords":["svelte","apexcharts","chart","svelte5","data-visualization","line-chart","bar-chart","area-chart","pie-chart","donut-chart","reactive","typescript","wrapper","visualization","svelte-component","runes"],"repository":{"type":"git","url":"git+https://github.com/ariefsn/svelte-apexcharts.git"},"author":{"name":"Arief Setiyo Nugroho"},"bugs":{"url":"https://github.com/ariefsn/svelte-apexcharts/issues"},"license":"MIT","readme":"<p align=\"center\">\n  <img src=\"./static/logo.svg\" alt=\"@ariefsn/svelte-apexcharts\" width=\"120\" height=\"120\"/>\n</p>\n\n<h1 align=\"center\">@ariefsn/svelte-apexcharts</h1>\n\n<p align=\"center\">\n  A lightweight Svelte 5 wrapper for <a href=\"https://apexcharts.com/\">ApexCharts</a> with reactive options support.\n</p>\n\n<p align=\"center\">\n  <a href=\"https://github.com/ariefsn/svelte-apexcharts\"><img src=\"https://img.shields.io/github/stars/ariefsn/svelte-apexcharts?style=flat-square\" alt=\"GitHub Stars\"/></a>\n  <a href=\"https://www.npmjs.com/package/@ariefsn/svelte-apexcharts\"><img src=\"https://img.shields.io/npm/v/@ariefsn/svelte-apexcharts?style=flat-square\" alt=\"npm version\"/></a>\n  <a href=\"https://github.com/ariefsn/svelte-apexcharts/blob/main/LICENSE\"><img src=\"https://img.shields.io/github/license/ariefsn/svelte-apexcharts?style=flat-square\" alt=\"License MIT\"/></a>\n</p>\n\n---\n\n## Installation\n\n```sh\nnpm install @ariefsn/svelte-apexcharts apexcharts\n# or\nbun add @ariefsn/svelte-apexcharts apexcharts\n```\n\n## Usage\n\n```svelte\n<script lang=\"ts\">\n  import { Chart } from '@ariefsn/svelte-apexcharts';\n  import type { ApexOptions } from 'apexcharts';\n\n  const options: ApexOptions = {\n    chart: { type: 'line' },\n    series: [{ name: 'Sales', data: [30, 40, 35, 50, 49, 60] }],\n    xaxis: { categories: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun'] }\n  };\n</script>\n\n<Chart {options} />\n```\n\n## Props\n\n| Prop      | Type                        | Required | Default     | Description                          |\n|-----------|-----------------------------|----------|-------------|--------------------------------------|\n| `options` | `ApexOptions`               | Yes      | —           | ApexCharts configuration object      |\n| `id`      | `string`                    | No       | —           | HTML id attribute for the chart div  |\n| `class`   | `string`                    | No       | `''`        | CSS class(es) for the chart div      |\n| `node`    | `HTMLDivElement` (bindable) | No       | `undefined` | Bindable reference to the chart div  |\n\n## Reactive Options\n\nOptions changes are automatically reflected in the chart:\n\n```svelte\n<script lang=\"ts\">\n  import { Chart } from '@ariefsn/svelte-apexcharts';\n  import type { ApexOptions } from 'apexcharts';\n\n  let darkMode = $state(false);\n\n  const options = $derived<ApexOptions>({\n    chart: { type: 'bar', background: darkMode ? '#1a1a2e' : '#fff' },\n    series: [{ name: 'Revenue', data: [44, 55, 57, 56, 61, 58] }],\n    xaxis: { categories: ['Q1', 'Q2', 'Q3', 'Q4', 'Q5', 'Q6'] },\n    theme: { mode: darkMode ? 'dark' : 'light' }\n  });\n</script>\n\n<button onclick={() => (darkMode = !darkMode)}>Toggle Theme</button>\n<Chart {options} />\n```\n\n## Accessing the Node\n\nBind to `node` to get the underlying DOM element:\n\n```svelte\n<script lang=\"ts\">\n  import { Chart } from '@ariefsn/svelte-apexcharts';\n\n  let chartNode = $state<HTMLDivElement | undefined>(undefined);\n</script>\n\n<Chart options={...} bind:node={chartNode} />\n```\n\n## Chart Types\n\nSupports all ApexCharts chart types: Line, Area, Bar, Column, Pie, Donut, RadialBar, Scatter, Bubble, Heatmap, Candlestick, BoxPlot, Treemap, Radar, PolarArea, RangeBar, RangeArea.\n\n## Links\n\n- [GitHub](https://github.com/ariefsn/svelte-apexcharts)\n- [npm](https://www.npmjs.com/package/@ariefsn/svelte-apexcharts)\n- [ApexCharts Docs](https://apexcharts.com/docs/options/)\n- [Changelog](./CHANGELOG.md)\n\n## License\n\nMIT License — Copyright (c) 2026 [Arief Setiyo Nugroho](https://github.com/ariefsn)\n","readmeFilename":"README.md","_rev":"1-5de797ada80c16bbc0fc3ce104442043"}