Live data from Hacker News

Chartist – Simple responsive charts

gionkunz.github.io

11–20 of 51 posts

Re: Chartist – Simple responsive charts

#12
post #6

Looks very pretty, but doesn't seem to offer hover states or actions / tooltips. I think this is a dealbreaker for a lot of users who wish to add contextual information to their charts.

When I think responsive it's in a mobile first paradigm. There is no hover on mobile.

Re: Chartist – Simple responsive charts

#13

Can I send these charts as images in emails? Google Charts is killing that features and we use it at work. SendGrid does the same thing.

It's generating SVG charts, which would probably work, but it uses JS to generate them, which certainly won't.

If you pre-generated them with something like node.js, you might be able to.

Re: Chartist – Simple responsive charts

#14
XSLT can create client-side charts without JavaScript. For example:

http://davidjarvis.ca/world-politics/xml/resources.xml

The source code is hosted on BitBucket:

https://bitbucket.org/djarvis/world-politics/src/master/xml/

Without JavaScript, the interactivity of the charts is limited.

Re: Chartist – Simple responsive charts

#15
post #5

Why prefer this over Chart.js [1] which is responsive as well? [1] https://github.com/nnnick/Chart.js/

I've run into some serious performance issues with chart.js on Firefox with moderately sized datasets.

SVG in general falls over with very large datasets, I find html canvas based libraries such as maybe Flot better for thousands upon thousands of datapoints. I love d3 as much as anyone and all of it's offspring, but SVG is too slow in most browsers (especially Firefox) for lots of datapoints.

Re: Chartist – Simple responsive charts

#16

XSLT can create client-side charts without JavaScript. For example: http://davidjarvis.ca/world-politics/xml/resources.xml The source code is hosted on BitBucket: https://bitbucket.org/djarvis/world-politics/src/master/xml/ Without JavaScript, the interactivity of the charts is limited.

Are people still adopting XSLT for new projects? It seems it has fallen out of favor.

Re: Chartist – Simple responsive charts

#17

XSLT can create client-side charts without JavaScript. For example: http://davidjarvis.ca/world-politics/xml/resources.xml The source code is hosted on BitBucket: https://bitbucket.org/djarvis/world-politics/src/master/xml/ Without JavaScript, the interactivity of the charts is limited.

Are people still adopting XSLT for new projects? It seems it has fallen out of favor.

If you have a hammer everything looks like a nail. Or in this case if you already have XML then XSL looks like the solution.

I suspect XSL has fallen out of favor because a lot of people don't have XML anymore, they instead have JSON which is more naturally processed using a JS library (per the OP).

In order to process JSON with XSL you'd have to go through the rigmarole of first converting it to XML and then exporting that as an iFrame which can then be rendered into HTML/CSS/JS via XSL. And nobody has got time for all of that, least of all when we care about creating "mobile first" properties which XLS was just never designed for (and, yes, the underlying HTML/CSS which it outputs CAN be designed for mobile-first, but XSL itself offers no functionality there).

TL;DR: I'd never go XSL in 2014 unless I already had XML. It offers little or nothing if your data source is either straight from the database or JSON (just adds an additional intermediate layer, you'll still ultimately outputting to JS/HTML/CSS). It does remain useful for generating CSV however (as you can set the output encoding type to text, strip XML headers, and so on). Which is not true for JavaScript.

Re: Chartist – Simple responsive charts

#18
post #15

Earlier quoted context omitted.

I've run into some serious performance issues with chart.js on Firefox with moderately sized datasets.

SVG in general falls over with very large datasets, I find html canvas based libraries such as maybe Flot better for thousands upon thousands of datapoints. I love d3 as much as anyone and all of it's offspring, but SVG is too slow in most browsers (especially Firefox) for lots of datapoints.

It is interesting that you cannot copy SVG out of your browser. When I visit the page in Chrome, mouse over the graph and "copy," it doesn't copy either the BMP buffer OR the raw SVG (XML).

I was going to try and copy/paste into Outlook, but that's obviously no-go if you cannot copy at all. Interesting limitation of SVG that I wasn't aware existed until now.

Post reply on HN