npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@macroui/charts

v2.1.8

Published

JavaScript Chart Library for MacroUI

Readme

@macroui/charts

JavaScript chart library for the MacroUI component system.

@macroui/charts is a fork of ApexCharts maintained by the MacroUI project, with first-class support for the DaisyUI / MacroUI design system via the bundled macroui-themes.css theme bridge.

Features

  • 20 chart types — line, area, bar, column, pie, donut, scatter, bubble, heatmap, radar, radialBar, candlestick, boxPlot, rangeBar, rangeArea, polarArea, treemap, violin, timeline, funnel/gauge
  • Per-entry bundles — import only the chart type you need (@macroui/charts/line, @macroui/charts/bar, …)
  • UMD / ESM / CJS / SSR — works in browsers, Node, edge runtimes, and bundlers
  • Tree-shakable — every chart type ships as its own ESM and CJS entry
  • macroUI / DaisyUI themes — auto-adapts to your DaisyUI theme tokens via CSS variables
  • Server-side rendering — render to static HTML for hydration (e.g. Nuxt, Next)
  • TypeScript — full .d.ts shipped, IntelliSense for all options

Install

npm install @macroui/charts

or with pnpm / yarn / bun.

Quick start

import Charts from '@macroui/charts'

const chart = new Charts(document.querySelector('#chart'), {
  chart: { type: 'line', height: 350 },
  series: [
    { name: 'sales', data: [30, 40, 35, 50, 49, 60, 70, 91, 125] }
  ],
  xaxis: { categories: [1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999] },
})

chart.render()

Per-entry (smaller bundle)

import Charts from '@macroui/charts/line'   // only the line chart code

Available entries: line, area, bar, column, pie, donut, scatter, bubble, heatmap, radar, radialBar, candlestick, boxPlot, rangeBar, rangeArea, polarArea, treemap, violin. Plus features: features/exports, features/legend, features/toolbar, features/annotations, features/keyboard, features/morph, features/drilldown, features/all.

Themes (DaisyUI / macroUI)

Import the theme bridge to make every chart color pick up your DaisyUI / macroUI theme tokens:

import '@macroui/charts/macroui-themes.css'

This swaps the chart's color palette to follow --p, --s, --a, --n, --b1, --b2, --b3, etc. — so a chart in a <div class="dark"> block automatically renders with the dark theme.

Browser script tag (UMD)

<script src="https://cdn.jsdelivr.net/npm/@macroui/charts"></script>
<script>
  const chart = new Charts(document.querySelector('#chart'), { /* ... */ })
  chart.render()
</script>

UMD global name: Charts (note: previously ApexCharts on the upstream project).

TypeScript

import Charts, { type ApexOptions } from '@macroui/charts'

const opts: ApexOptions = { /* ... */ }  // public type alias retained for ecosystem compat

Migration from apexcharts

If you're migrating from the upstream apexcharts package, the main changes in @macroui/[email protected] are:

| Upstream | This package | |---------------------------------|-------------------------------| | import ApexCharts from 'apexcharts' | import Charts from '@macroui/charts' | | new ApexCharts(el, options) | new Charts(el, options) | | window.ApexCharts | window.Charts | | .apexcharts-canvas | .charts-canvas | | data-apexcharts | data-charts | | dist/apexcharts.js | dist/charts.js | | apexcharts / Apex global | Charts (the chart class is also the runtime registry) |

The public type aliases (ApexOptions, ApexAxis, …) are intentionally unchanged so existing TS code continues to compile.

Vue 3 wrapper

If you use Vue 3, install the wrapper:

npm install @macroui/charts-vue

See macroui/macroui-charts-vue.

Demo

A full demo collection lives in macroui/macroui-charts-demo (vanilla JS, React, Vue, and source XML examples).

License

Apache-2.0. See LICENSE. Derived from apexcharts/apexcharts.js — see the NOTICE section at the bottom of the LICENSE file for attribution.

Repositories