-
Notifications
You must be signed in to change notification settings - Fork 9
Chart api bar charts
Yuji Takayama edited this page Jul 10, 2013
·
1 revision
If you want to draw a bar chart, use a type
attribute with morris.bar
(or easel.bar
).
$(function(){
var data = [
{
x: '2013-04',
y: '123',
y1: '90'
},
{
x: '2013-05',
y: '235',
y1: '128'
},
{
x: '2013-06',
y: '76',
y1: '283'
}
];
var config = {
data: data,
type: 'morris.bar',
autoResize: true,
yLength: 2
}
var range = {
dataType: 'general',
length: 3
}
new MT.ChartAPI.Graph(config, range).trigger('APPEND_TO', $('#graph'));
})