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 🙏

© 2024 – Pkg Stats / Ryan Hefner

chart2music

v1.18.0

Published

Turns charts into music so the blind can hear data

Downloads

8,134

Readme

Chart2Music

Chart2Music turns charts into music so the blind can hear data.

npm version Build verification Known Vulnerabilities codecov

Key features

  • Inclusively designed - The dev team behind C2M includes blind people in the design, development, and testing stages.
  • Accessibility for screen reader users - Enables blind users to quickly absorb information about charts and graphs using sound and exploration.
  • Easier maintenance for accessibility requirements - Traditionally, charts and graphs would be made accessible using alt text, which can be difficult to generate or maintain, or data tables, which provide a poor end user experience. C2M provides an automated solution while enhancing the user experience.
  • Visual agnostic - Use C2M alongside your charts, regardless of how your visuals were created. ChartJS? D3.js? An image? C2M works in parallel with your visuals.
  • Use anywhere, for free - C2M is MIT licensed, so you can integrate into anything - personal, commercial, government, etc.

Getting started

Include the following script tag on your page:

<script src="https://cdn.jsdelivr.net/npm/chart2music"></script>

On your page, you will also need your chart. For the sake of simplicity, here's an example with an image and an element for screen reader text:

<img src="mychart.png" id="MyChart" />
<div id="screenReaderText"></div>

Now, in your javascript, you can start a new instance of Chart2Music. In this example, we will include a simple bar chart, and point it to the img element above.

const {err} = c2mChart({
    type: "bar",
    element: document.getElementById("MyChart"),
    cc: document.getElementById("screenReaderText"),
    data: [1,2,3]
});

// If there was an error in generating the chart, print the error message
if(err){
    console.error(err);
}

What will the user experience be? When the user navigates to the image, a description will be automatically generated, telling the user that there is interaction available. Then, the user can use arrow keys or keyboard shortcuts to interact with the data.

Advanced

For code examples in action, see the Chart2Music Examples collection on Codepen.

Some of the examples you will find there include:

You can also find examples of integrations with other visualization libraries:

Go to chart2music.com for the full tutorial.