@jop-software/hx-chart
TypeScript icon, indicating that this package has built-in type declarations

1.0.2 • Public • Published

@jop-software/hx-chart - chart.js as an htmx.org plugin

Use chart.js as an extension in HTMX.

Installation

# npm
npm install @jop-software/hx-chart

# pnpm
pnpm add @jop-software/hx-chart

Make sure to include chart.js as well as htmx.org separately.

Usage

import "@jop-software/hx-chart";
<canvas
    hx-ext="hx-chart"
    hx-chart="true"
    hx-chart-type="pie"
    hx-chart-labels='["40%", "60%"]'
    hx-chart-datasets='[{"data": ["40","60"], "backgroundColor": ["#dc3545", "#28a745"]}]'
></canvas>

[!NOTE]
All attributes can be prefixed with data-, so you can use data-hx-chart-type instead of hx-chart-type.

Professional support and Enterprise Licensing

Professional support, as well as enterprise licenses are available. Please contact support@jop-software.de for more information.

/@jop-software/hx-chart/

    Package Sidebar

    Install

    npm i @jop-software/hx-chart

    Weekly Downloads

    0

    Version

    1.0.2

    License

    MIT

    Unpacked Size

    6.48 kB

    Total Files

    8

    Last publish

    Collaborators

    • jojopr