问题
i am using morris line chart in my application,
Here everything is complete but on x axis i wrote 1 then it display 1910 but i want there current month and date not year. means i want date in place of list of year.
Here is my code:
Morris.Line({
element: 'line-example',
data: [
{ time: '1', a: 0, b: 0 },
{ time: '2', a: 0, b: 0 },
{ time: '3', a: 0, b: 0 },
{ time: '4', a: 0, b: 0 },
{ time: '5', a: 0, b: 0 },
{ time: '6', a: 0, b: 0 },
{ time: '7', a: 0, b: 0 },
{ time: '8', a: 0, b: 0 },
{ time: '9', a: 0, b: 0 },
{ time: '10', a: 0, b: 0 },
{ time: '11', a: 0, b: 0 },
{ time: '12', a: 0, b: 0 },
{ time: '13', a: 0, b: 0 },
{ time: '14', a: 0, b: 0 },
{ time: '15', a: 0, b: 0 },
{ time: '16', a: 0, b: 0 },
{ time: '17', a: 0, b: 0 },
{ time: '18', a: 0, b: 0 },
{ time: '19', a: 0, b: 0 },
{ time: '20', a: 0, b: 0 },
{ time: '21', a: 0, b: 1 },
{ time: '22', a: 0, b: 0 },
{ time: '23', a: 1, b: 0 },
{ time: '24', a: 0, b: 0 },
{ time: '25', a: 0, b: 0 },
{ time: '26', a: 0, b: 0 },
{ time: '27', a: 0, b: 0 },
{ time: '28', a: 0, b: 0 },
{ time: '29', a: 0, b: 0 },
{ time: '30', a: 0, b: 0 },
{ time: '31', a: 0, b: 0 },
],
xkey: 'time',
ykeys: ['a', 'b'],
labels: ['Subscriptions', 'Unsubscriptions'],
lineColors:['#0176CC','#FF9701'],
});
来源:https://stackoverflow.com/questions/22778675/morris-line-chart