http://jsfiddle.net/wb6jz/
I have problem with x axis, I want to display dates, not year, where do I define this?
Morris.Area({
element: 'area-example',
data: [
{ y: '1.1.', a: 100, b: 90 },
{ y: '2.1.', a: 75, b: 65 },
{ y: '3.1.', a: 50, b: 40 },
{ y: '4.1.', a: 75, b: 65 },
{ y: '5.1.', a: 50, b: 40 },
{ y: '6.1.', a: 75, b: 65 },
{ y: '7.1.', a: 100, b: 90 }
],
xkey: 'y',
ykeys: ['a', 'b'],
labels: ['Series A', 'Series B']
});
I don't think your y
is formated correctly, but if you want to see dates instead of years add xLabels: "day"
See http://jsfiddle.net/wb6jz/1/
Documentation: http://www.oesmith.co.uk/morris.js/lines.html
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With