3 ms·
Why not? It looks very practical to me. Currently when wanting a chart on a webpage I would fetch the data, transform it to the needed javascript array, add th
by onli 6y ago
Why not? It looks very practical to me.
Currently when wanting a chart on a webpage I would fetch the data, transform it to the needed javascript array, add that to the HTML, and then initialize the javascript library painting the chart. With a CSS solution I'd just create a HTML-datatable instead, apply the needed classes and have it be rendered directly. It looks easier, faster and more accessible to me.
The example graphs are a bit flat, but that's just default styling. That's likely changeable with CSS, and animations can also be added that way, there are example for that linked in the docs.
Awesome project.
- layoutIfNeeded 6y agoOr just use SVG? I’d highly doubt there were browsers supporting these CSS hacks but not supporting SVG.
- deleted 6y ago[deleted]
- onli 6y agoThat's not close to the same complexity, is it? With the HTML + CSS solution, all my program has to produce is a HTML table. Very easy. With SVG my program has to create not just a data table, but the custom SVG code to paint the chart, down to each bar. I'm actually doing that on pc-kombo, https://www.pc-kombo.com/us/benchmark/games/cpu/compare?ids%5B%5D=AMD+Ryzen+9+5950X&ids%5B%5D=Intel+Core+i9-10900K#html https://www.pc-kombo.com/us/benchmark/games/cpu/compare?ids%... shows it, the image is SVG. But it's created with https://github.com/DannyBen/victor/ https://github.com/DannyBen/victor/, so my ruby code has to describe all the details of that image, including manually saying how each bar chart should look and where on the coordinate system the text goes. Even with the awesome victor library that wasn't all that easy. Alternative is a JS library that produces the SVG code, but then it's exactly as complicated as with regular JS libraries, it just changes the output.