how to make line graph - javascript

I want to make line graph with the use of javascript.
Can anyone tell me how I get this?

have a look at this http://www.rgraph.net/

as you have tagged for Android, I guess you want to make charts in Android. Try this
http://code.google.com/apis/chart/
http://www.achartengine.org/
http://androidplot.com/wiki/Home

I've used flot.js - it's very good and well documented. There's also g.Raphael.js, but I don't know if it's still being developed, and there are no docs whatsoever.

Related

D3.js and InnerHtml not showing up [duplicate]

Is there any way to make D3 compatible with IE8?
Many of the posts here and in the documentation suggested using aight.
https://github.com/shawnbot/aight/blob/master/aight.js
However, I added the lines/file mentioned to my html, but this still doesn't work in ie8.
http://matthewpiatetsky.com/jsdemo.html
Does anyone know if there are any additional steps I need to take?
Perhaps use r2d3? Not sure how to do that, but will try to figure out
D3 uses SVGs to graph and since IE8 does not support SVG it won't work.I would give R2D3 a try, it shims SVG via Raphael to be compatible with D3. There are some limitations as some functionality won't be available. Look at https://github.com/mhemesath/r2d3/ for more details
aight.js worked for me, just need to take care importing it before d3.js
Many good demos of R2D3, and Aight demos now exist.
I think that re-coding your question to demo it in one of these libraries is out-of-scope of SE, but hope you find the links useful.

D3 IE8 Compatibility?

Is there any way to make D3 compatible with IE8?
Many of the posts here and in the documentation suggested using aight.
https://github.com/shawnbot/aight/blob/master/aight.js
However, I added the lines/file mentioned to my html, but this still doesn't work in ie8.
http://matthewpiatetsky.com/jsdemo.html
Does anyone know if there are any additional steps I need to take?
Perhaps use r2d3? Not sure how to do that, but will try to figure out
D3 uses SVGs to graph and since IE8 does not support SVG it won't work.I would give R2D3 a try, it shims SVG via Raphael to be compatible with D3. There are some limitations as some functionality won't be available. Look at https://github.com/mhemesath/r2d3/ for more details
aight.js worked for me, just need to take care importing it before d3.js
Many good demos of R2D3, and Aight demos now exist.
I think that re-coding your question to demo it in one of these libraries is out-of-scope of SE, but hope you find the links useful.

drawing charts with the help of javascript and HTML5 in android

I was going on through certain ways and codes to draw charts and graphs, I found many libraries some free some commercial etc.,but at last i draw it on canvas,One thing which I found interesting is to draw with the help of javascript and HTML5.
For reference:
enter link description here
I have no idea how to do this dyanamically(not with the fixed values),I really want to use it,but i don't know javascript or HTML so i am unable to go ahead,It would be a great help if you would be able to tell me, how to do this with dynamic values.(either by accessing the database or any other way if possible).
You can access db in java and inject results to the javascript by using
webView.loadUrl("javascript:refreshData(someDynamicContent)");
Where are you getting your "dynamic values" from (the user or a database)? Regardless you will need to know at least a little html and javascript. Google Charts has some really nice libraries for this.

Advanced animations with Javascript

I'm trying to convert a site from flash to HTML/CSS/JS ( don't ask why, I just have to ) but I'm stuck about the animations that I need.
Please follow the link and look at the site: http://www.sultanahmetkoftesi.com
As you can see, the moving layers are accelerated when you move the mouse. That is exactly what I want to do.
I'd be glad if you can provide an example or snippet.
Pure Javascript or jQuery code is fine for me.
Maybe these two projects can somehow help you...
1. http://css-tricks.com/1660-jquery-robot/
2. http://webdev.stephband.info/parallax.html
Good luck...
You may also want to look at http://spritely.net/

JavaScript Charting library - Google Analytics Style

I'm searching for a Javascript library to create line charts like the ones of Google Analytics. When the mouse is over a point, a box shows you the data.
An example is at http://wikirank.com/en
No Flash or Air, only JS and client-side Canvas...
Better if Free...
Edit: If you want a free library, try Flot.
Emprise Charts is a commercial library that I've seen featured on news sites.
Another option is to use Google's visualization APIs.It's pretty easy to use, and they have a several options for displaying data. One thing to keep in mind is some of the visualizations require you to send your data to their server, though none of the canvas/svg ones have this requirement.
There's JS-Charts which looks pretty awesome.
Or, if you fancy rolling your own you can create your own charting component using this library...
As an alternative to Flot, if you are using Prototype.js as JS framework, you can use Flotr.
Dojo also has something similar, though the example shown doesn't have similar functionalities but can be implemented to behave like the one you want,
http://dojocampus.org/explorer/#Dojox_Charting_2D_Lines,%20Markers,%20No%20Axes,%20Purple%20Theme,%20Custom%20Min%20Max
Raphael.js is pretty good at making graphs with svg/vml, you have to write some custom code though, but you can make some really nice animation with it, next to that it's compatible with ie6+ (only not with android 2 browsers).

Categories