GithubHelp home page GithubHelp logo

ffoodd / chaarts Goto Github PK

View Code? Open in Web Editor NEW
100.0 8.0 6.0 2.87 MB

Charts with HTML & CSS

Home Page: https://ffoodd.github.io/chaarts

License: MIT License

JavaScript 1.79% SCSS 23.90% Nunjucks 53.06% CSS 21.25%
css charts html markup accessibility a11y progressive-enhancement

chaarts's People

Contributors

dependabot[bot] avatar ffoodd avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

chaarts's Issues

Chartability audit

Chartability is a kind of WCAG 2.1 extension dedicated to data visualization. From the site:

Chartability is a methodology for ensuring that data visualizations, systems, and interfaces are accessible. Chartability is organized into principles with testable criteria and focused on creating an outcome that is an inclusive data experience for people with disabilities.

It's basically an evaluation tool, so I guess anyone in the topic might want to audit chaarts following the distributed workbook.

Animation

Bonjour,

Peut-on animer les Column charts?

Merci.

Scroll-snap to handle pagination

Keeping progressive enhancement in mind, we might be able to use scrollable charts and improve it with scroll-snap CSS module.

Pie chart padding too short for upper tooltips

The pie chart has a padding calculated like this padding-top: calc(var(--radius) - 2rem); which looks fine but when you have a tooltip on the upper side of the chart, it is cropped.
No issue with tooltips on the other sides though.

CleanShot 2021-02-10 at 11 05 31

I fixed it with a padding-top: calc(var(--radius) + 2rem); and it looks fine.
I don't know what was the idea behind your math (why the - 2rem) so I'll let you with this :p

Proof read content

  • There's some spelling errors in EN homepage,
  • a mention to .table-chart class in JS code block (which should be .chaarts),
  • document default styles for tables w/o .chaarts,
  • drop or reword outdated content (mostly regarding support).

Can't completely use decimal value with pie chart

If you use a decimal value (e.g. 23.33) to get a 23.33% percentage, the size of the share is well rendered but the content of the "tooltip" is wrong.

For my example, I had 3 values:

  • 20
  • 56.67
  • 23.33

And it's rendering like this (Chrome and Firefox had the same result).

CleanShot.2021-02-08.at.17.29.07.mp4

I think it's because the counter-reset property just accepts integer.

I'm not sure there's any way to fix this or any workaround possible but It's good to know. I guess I'll just round the numbers then.

Use cases for filter / blend-modes

filter allows a lot of things. The first idea stepping in my mind is using grayscale() function on other parts when hovering a chart, to improve the overall contrast between highlighted part and the others.

Wrong grid cell calculation with a value of 100 in column chart

It's easily reproducible with your online example.

On the multiple columns chart, when a column has a value of 100, it's placement turns wrong and shift the other columns' placement after it.

See the video below.

CleanShot.2021-02-11.at.15.08.22.mp4

I guess something is wrong in this declaration…

.chaarts[class*="column"] td {
  grid-row: calc( 100 - var(--value) )/-3;
}

… but I'm not sure what the -3 is for, although I can confirm that without it the 99 other values won't work 😅

make chaarts an installable library

FWIW, chaarts is very close to be usable as a library, after #9.

Dist files to package:

  • CSS compiled + minified files
  • Sourcemaps
  • Sass sources
  • JS files for the style toggles (optional)

Anything else?

Handle transition + animation

Most properties in charts are animatable — clip-path, I'm staring at you.

There shouldn't be any issue with transition handling (on value change, for example, or on intersectionning viewport).

So I think it should be tried :)

Inspiration feeds

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.