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

@eonui/charts-canvas

v0.1.1

Published

`@eonui/charts-canvas` is the canvas renderer layer for the EonUI Mystique chart system. It draws chart families directly onto a `CanvasRenderingContext2D`, which makes it a good fit for dense charts, animation-heavy payloads, or surfaces where a single b

Downloads

221

Readme

@eonui/charts-canvas

@eonui/charts-canvas is the canvas renderer layer for the EonUI Mystique chart system. It draws chart families directly onto a CanvasRenderingContext2D, which makes it a good fit for dense charts, animation-heavy payloads, or surfaces where a single bitmap-backed chart is preferable to a large SVG tree.

Workspace Note

This folder currently documents the published package surface. The implementation source for @eonui/charts-canvas is consumed from npm in the EonUI app and is not mirrored into revamp/eonui/packages/charts-canvas yet.

Docs And Live Reference

Use this README for renderer-specific notes about the canvas path. For broader EonUI examples and product-level chart direction, refer to https://eonui.com.

Purpose

Use this package when you need:

  • direct 2D canvas rendering
  • large or dense data displays
  • renderer control without the higher-level chart orchestration package
  • a lower-level draw API that can be called inside an existing canvas lifecycle

What The Package Exposes Today

The current renderer includes:

  • drawMystiqueChart()
  • chart-family-specific draw functions such as line, bar, pie, heatmap, treemap, network, sankey, and funnel renderers
  • shared palette and variant-overlay logic

It depends on @eonui/charts-core for type resolution, scales, and sample or manifest logic.

Install

npm install @eonui/charts-canvas

When To Reach For Canvas

Choose the canvas renderer when your chart surface values throughput, dense point rendering, and lightweight repaint cycles more than raw DOM inspectability. This is often the better option for:

  • high-volume time-series views
  • streaming dashboards
  • compact sparkline-heavy interfaces
  • cases where SVG node counts would become expensive

If you need exportable markup, richer DOM inspection, or easier static embedding, the SVG renderer may be a better fit.

Example 1: Draw a simple chart on a canvas

import { drawMystiqueChart } from '@eonui/charts-canvas';

const canvas = document.querySelector('canvas');
const ctx = canvas?.getContext('2d');

if (ctx) {
  drawMystiqueChart(
    ctx,
    'line',
    [
      { x: 1, y: 14, label: 'Jan' },
      { x: 2, y: 20, label: 'Feb' },
      { x: 3, y: 17, label: 'Mar' }
    ],
    720,
    320,
    'Revenue trend'
  );
}

Use this when:

  • the host application already owns a canvas element
  • you want chart drawing inside a custom dashboard shell
  • you need deterministic drawing from plain data

Example 2: Draw a dense renderer variant

import { drawMystiqueChart } from '@eonui/charts-canvas';

drawMystiqueChart(
  ctx,
  'heatmap-drilldown-workbench',
  [
    { x: 0, y: 0, value: 32 },
    { x: 1, y: 0, value: 48 },
    { x: 0, y: 1, value: 61 },
    { x: 1, y: 1, value: 22 }
  ],
  720,
  360,
  'Signal density'
);

Use this when:

  • a chart variant is better expressed on canvas than as SVG
  • you need compact rendering for a dashboard card
  • you want to prototype dense chart states quickly

Example 3: Use canvas as the dedicated renderer path

import { drawMystiqueChart } from '@eonui/charts-canvas';

function renderFrame(ctx: CanvasRenderingContext2D, data: Array<Record<string, unknown>>) {
  drawMystiqueChart(ctx, 'network-topology-health', data, 880, 460, 'Topology health');
}

Use this when:

  • the surrounding app manages its own redraw cycle
  • you need custom animation or scheduling on top of the Eon renderer
  • you are embedding charts inside a larger canvas scene

Troubleshooting

  • If the output looks blurry, scale the backing canvas for devicePixelRatio rather than drawing at CSS pixel size only.
  • If labels clip at the edges, reserve enough internal padding before the draw call.
  • If resize behavior is inconsistent, clear and redraw after the new dimensions are committed.
  • If teams need DOM-level accessibility or easier snapshot testing, keep canvas as a selective renderer instead of the only chart output path.

Where This Package Fits

Start with @eonui/charts unless you specifically need renderer control. Reach for @eonui/charts-canvas when:

  • the application already owns the canvas lifecycle
  • you want a lower-level render function
  • SVG markup generation is unnecessary overhead for the target surface

Current Limitations

  • canvas output is not as inspectable as SVG markup
  • accessibility and DOM-level introspection need higher-level wrappers or companion overlays
  • consumer code still owns the canvas creation and sizing lifecycle

Future Prospects

The most valuable next steps are:

  • exported bitmap helpers
  • tighter animation presets
  • offscreen-canvas and worker-friendly rendering paths
  • renderer parity tooling against the SVG package