I'm using morris.js
line chart in order to display different series values.
I would like to format my X axis so instead of the year I can place a 3 chacarter day of week.
Example:
- 2016-05-10 should be THU-05-10
This is my actual code:
Morris.Line({
element: 'linechart',
data: data,
lineColors: ['#819C79', '#fc8710', '#FF6541', '#A4ADD3', '#766B56'],
xkey: 'period',
ykeys: ['park1','park2','park3','park4','park5'],
labels: ['PARK 1', ''PARK 2', ''PARK 3', ''PARK 4', ''PARK 5'],
xLabels: 'day',
xLabelAngle: 45,
resize: true
});
Any clue?
Add
xLabelFormat
to convert the date to the desired format. Try thexLabelFormat
function in the following code snippet: