morris.js area chart not show x-axis labels

1.4k Views Asked by At

This is my code

Morris.Area({
  element: 'k-line-morris',
  data: [
    { y: '2006', a: 100, b: 90, c:  Math.floor(Math.random() * 200) + 1 , d: Math.floor(Math.random() * 200) + 1 },
    { y: '2007', a: 75,  b: 65 , c:  Math.floor(Math.random() * 200) + 1 , d: Math.floor(Math.random() * 200) + 1},
    { y: '2008', a: 50,  b: 70 , c:  Math.floor(Math.random() * 200) + 1, d: Math.floor(Math.random() * 200) + 1},
    { y: '2009', a: 115,  b: 25 , c:  Math.floor(Math.random() * 200) + 1, d: Math.floor(Math.random() * 200) + 1},
    { y: '2010', a: 50,  b: -20 , c:  Math.floor(Math.random() * 200) + 1, d: Math.floor(Math.random() * 20) + 1},
    { y: '2011', a: 75,  b: 65, c:  Math.floor(Math.random() * 200) + 1, d: Math.floor(Math.random() * 200) + 1},
    { y: '2012', a: 100, b: 90 , c:  Math.floor(Math.random() * 200) + 1, d: Math.floor(Math.random() * 60) + 1},
  ],
  xkey: 'y',
  ykeys: ['a', 'b','c','d'],
  labels: ['Branch #54', 'Branch #89B', 'Branch #34C','Branch #12'],
 lineColors:['#111567','#222897','#765432','#CCDDFF']

});

Have somebody know how to solve this problem?Thank you!

0

There are 0 best solutions below