Reputation: 2845
I want to run a simple chart, say e.g bar chart both on a pc and mobile. They should look the same and should be svg based. I did some research and found may be d3.js with node.js is the way to go. Say I am ok with running node.js in the server side. How can use the same javascript code on both server and client side? The graph needs to be interactive, say when I have 2 simple graphs together, so the value I click on one graph is passed on to other graph. I am new to both javascript and node.js.
If the client is a pc with an advanced browser like chrome, I want the graph to be render the graph in the client, where as if the client is a mobile client android/iphone the server should should do the heavy lifting.
Any pointers to other charting library options, tutorials are also welcome.Thanks in advance.
(Note: It will be nice, if the library is open source and the licence is not restrictive and allows commercial usage. )
Upvotes: 0
Views: 826
Reputation: 47993
d3.js
is one of the best JavaScript libraries for data visualization. Take a look at d3.js
workshop and wiki tutorial for pointers on how to use d3.js
node.js
is JavaScript-based web server framework. You have some good FAQ's about node.js on StackOverflow itself :
Advance Usage
Since both node and d3 are in JavaScript. You can use d3.js
and dc.js
from node itself. This allows you to do heavy compute/rendering on server, and send the graphics to client. You should attempt these only if you are familiar with both node.js
and d3.js
.
Upvotes: 2
Reputation: 19093
I'm a big fan of highcharts for javascript charting. Very easy to use and powerful.
Upvotes: 0