Coder Social home page Coder Social logo

neo-oli / chart2music Goto Github PK

View Code? Open in Web Editor NEW

This project forked from julianna-langston/chart2music

0.0 0.0 0.0 3.15 MB

Turns charts into music so the blind can hear data

License: MIT License

Shell 0.06% JavaScript 0.67% TypeScript 99.28%

chart2music's Introduction

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.

chart2music's People

Contributors

julianna-ciq avatar dependabot[bot] avatar julianna-langston avatar spmealin avatar ayjayt avatar ploperav avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.