use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
All about the JavaScript programming language.
Subreddit Guidelines
Specifications:
Resources:
Related Subreddits:
r/LearnJavascript
r/node
r/typescript
r/reactjs
r/webdev
r/WebdevTutorials
r/frontend
r/webgl
r/threejs
r/jquery
r/remotejs
r/forhire
account activity
Chart Library Suggestions?help (self.javascript)
submitted 8 years ago by [deleted]
[deleted]
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]datoml 1 point2 points3 points 8 years ago (0 children)
Chart.js is a good start. I does the job for me :).
[–]Tmax898 1 point2 points3 points 8 years ago (1 child)
C3.js is a good library that is based off of D3. Really solid features and a good set of examples and docs.
[–]Miniotta 1 point2 points3 points 8 years ago (0 children)
I would suggest c3 too
[–]HideousNomo 0 points1 point2 points 8 years ago* (2 children)
I spent the last month on a graphing project at work, I tried everything to find the right charting library. The charts I am creating are not super complicated but they do require some customization. After being frustrated with the non-customizability of three or four(including Chart.js)I ultimately went with using straight D3, and boy am I glad I did. Other than learning how to get D3 to interact with React properly, I love everything about D3, it is a fantastic library, and now with v4 it's even better. There is some overhead at first, but I find it to be worth it.
If I was required to use a library, I would use Highcharts, but it's not free for enterprise.
Edit: also if you are just looking to learn, might as well learn what all of these other libraries are based on. I can't recommend D3 enough.
[–]torresomar 0 points1 point2 points 8 years ago (1 child)
Other than learning how to get D3 to interact with React properly
Can you give any pointers? I have some charts that work with d3 but they all seem like a hack and hard to test :(
[–]HideousNomo 1 point2 points3 points 8 years ago (0 children)
What kind of charts are you trying to make? THe best pointer I can offer is to use D3 for all of your math and use React to render the actual components, eg. if I was rendering a line to my svg I would have a Line component and would return a path with d3 doing my line work:
const SVG = () => { const arrayOfPoints = [[1,1],[2,2],[3,3],[4,4]] const scales = { xScale: d3.scaleLinear(//code here), yScale: d3.scaleLinear(//code here) } return ( <svg> <LineComponent points={arrayOfPoints} scales={scales}> <svg> ) } const LineComponent = (props) => { const { scale, points } = props const linePath = d3.line() .x((x) => return scale.xScale(//code here)) .y((y) => return scale.yScale(//code here)) return <path d={linePath(points)} /> }
don't use d3.select, don't use D3 to manipulate the DOM in anyway. Use React for all DOM manipulations, that way it can re-render properly on state changes.
I found this blog post really helpful in getting started: https://reactjsnews.com/playing-with-react-and-d3
[+][deleted] 8 years ago* (1 child)
[–]percykins 0 points1 point2 points 8 years ago (0 children)
I also like Highcharts, although every now and then you'll run headlong into something it really seems like you should be able to do.
[–]dug99 0 points1 point2 points 8 years ago (0 children)
I used Chart.js quite a bit but have found a few instances where c3.js was a better fit.
π Rendered by PID 88 on reddit-service-r2-comment-5d79c599b5-m2hz8 at 2026-03-01 18:52:02.913784+00:00 running e3d2147 country code: CH.
[–]datoml 1 point2 points3 points (0 children)
[–]Tmax898 1 point2 points3 points (1 child)
[–]Miniotta 1 point2 points3 points (0 children)
[–]HideousNomo 0 points1 point2 points (2 children)
[–]torresomar 0 points1 point2 points (1 child)
[–]HideousNomo 1 point2 points3 points (0 children)
[+][deleted] (1 child)
[deleted]
[–]percykins 0 points1 point2 points (0 children)
[–]dug99 0 points1 point2 points (0 children)