Hacker News new | past | comments | ask | show | jobs | submit login
Dear HN: I wrote an SVG charting library. What do you think? (kilianvalkhof.com)
52 points by kilian on Feb 8, 2010 | hide | past | favorite | 26 comments



I've wondered when an opinionated charting library would appear and gently guide people away from pie charts.

Apple dropped a couple of notches in my estimation when they brought out iWork and 3-D woodgrain pie-charts were proudly displayed.


What's wrong with pie charts? For certain datasets and views they are perfect. What's more, people understand them.


People think they understand them, but piecharts are hard to understand because you can't differentiate between a 24% and a 25% slice. Read a far better explanation here: http://www.perceptualedge.com/articles/visual_business_intel...

They are perfect for a very, very limited set of datasets: if you have a very large slice and a number of small slices and want to show the obvious difference.


Ummm... I think you can make that argument for ANY chart type. I can't differentiate between 25% and 24% in a bar graph either.

In fact, IMO, bar charts (normally) have the far worse problem of being relative to the largest value. In a percentage situation, you want the size of the bars to be relative to the whole, otherwise its misleading to say the least...

So the take away fact is that all visualisations have weaknesses under certain conditions.

But to offer graphing library that does not offer pie charts is, well, a bit silly in my opinion.


As an analyst, I find that the difference between 24% and 25% rarely matters in practice. Pie charts are useful for showing that big differences are big, and that unimportant things are unimportant. Most other uses require a notion of absolute size of the pie in addition to breakdown, which can be communicated in a pie chart, but it's harder.


It looks really nice and I've been looking for a while for something like this. However, until it supports IE properly are things like this useful? IE (combined) is still 62% of browsers. Don't get me wrong - it's a great concept. But it has to work on the most common browser.


This works in IE, it uses Raphael ( http://www.raphaeljs.com ) so IE gets VML :) IE is noticeably slower though.


Take a look at http://code.google.com/p/svgweb/ - it renders SVG inside a Flash widget, providing compatibility with IE without the need for a separate plugin.


There are plugins for SVG that IE users can install, that would make this work, and be useful. That said, it IS a plugin that a lot of people aren't likely to have already installed.


My main problem with javascript graphing libraries in general is that there's no way to copy & paste the graph into facebook, forums, etc. And if you're a data orientated site then visitors from shared graphs, etc. are going to make up a significant percentage of your traffic. If it's not easy for people to share your graphs then you're just giving away a lot of free traffic.


http://www.jqplot.com/ makes use of canvas and every browser that support canvas has a function to export them to bmp.


Very nice, but I don't see any way to generate a legend. I'll probably need to cut the graphs from a screenshot for my less technically oriented superiors, so a legend is mandatory. I love the sparkline support, btw.


That looks cool. I'd use it more if you could export the SVG file once it's rendered. Oh, and a gantt chart layout would be cool too!


Your spark____ examples need retooling. The point of a spark is information density. In the sparkline example(s) you have 7 data points across 75+ horizontal pixels (i.e. very low information density).


check the sparkarea example, it has a lot more. You control the datapoints and the width, so it's all up to the person implementing it.


The 'available graph types' need to be linked to examples.


Good idea, just did so :)


Hey Killian, that looks nice. How do you get this to work in IE? I tried to look at the examples in IE7, but it just froze.


The example page has 25 graphs it tries to generate all onload, IE can't handle that at once. It could be fixed using a queueing function but I haven't written one yet.

IE can handle it fine (slower, but fine) if you use just a couple of graphs.


Yes, it did load finally. That's great, so are you generating VML or using excanvas?


It's built on Raphael ( http://www.raphaeljs.com ) so VML :)


very nice.


Great job killian, I was looking for something exactly like this. =)


Very nice! This will be perfect to use in my project. Thanks!


I like it. though wish it was one written for Jquery


Nice documentation, and nice looking graphs.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: