Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Simple opensource javascript library for creating (stacked) line graph?

I need a lightweight javascript library to create a stacked line graph (a bit like what is used in financial graphs). The X axis will be dates and the Y axis will be ordinary float values.

There will be two sections of the graph:

  1. Top graph which is a line graph. I want to be able to specify the color of a line segment (i.e. joining two dated points)

  2. The bottom part is just a rectangle/bar which represents the value. Once again, I want to be able to specify the color of the bar for a particular date.

It would be cool if the library used JQuery (since I have used jQuery in the past) - but even plain old JS code library would be equally useful.

like image 605
skyeagle Avatar asked Dec 28 '22 05:12

skyeagle


2 Answers

I recommend Google Chart API / Chart Tools (examples) and Google Visualization API (examples).

The former being less powerful than the latter, but also more low-tech, so possibly easier to use (and more portable across platforms. The basic Chart API generates static images for you).

But you can also use:

  • gRaphael
  • Bluff
  • PlotKit
  • CanvasGraphJS
  • Grafico
  • RGraph
  • Plotr

Or even use a more high-level library like ExtJS (examples).

like image 151
haylem Avatar answered Dec 30 '22 20:12

haylem


look at JQPlot http://www.jqplot.com/

like image 29
John Hartsock Avatar answered Dec 30 '22 18:12

John Hartsock