var data = {
a: [1,2,3,2,2,3,4,5,6],
b: [5,3,2,3,5,null,2,1,1,2]
};
linechart.create({
container: '#chart',
size: [500,300],
data: data, // lots of numbers
labels: { a: 'Foo', b: 'Bar' }, // give the data rows some meaning
format: function(n) { return n+'%' } // define how numbers look on axis and tooltips
})
Created
March 30, 2012 22:01
-
-
Save gka/2255896 to your computer and use it in GitHub Desktop.
API for dead simple line charts (based on raphael and d3)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment