Hacker News new | ask | show | jobs
by cereallarceny 4307 days ago
C3 looks nice, but it'd be really great if the library didn't demand passing things in object format. Why can't we have something that implements chaining like D3? It seems a bit counter-intuitive...
1 comments

I actually prefer passing a declarative configuration object rather than issuing a series of API calls. It is one of the things that had me switch a project from D3 to C3 + crossfilter a while back.
Really? Perhaps it's just a matter of preference, but this coding style drives me up a fucking wall. Clutters the hell out of your code.
I guess that depends on whether the settings you are passing to the chart are coming from somewhere else (say, an API call). If you can just get a JSON object from a backend and pass it directly to the chart, things become much simpler in your code.
I actually prefer builders,now it doesnt mean it has to be one or the other,a lib can implement such an api under the hood.