I am using morriz line chart . But it is displaying years in years in x-axis I thought it is string I Tried to modify it but it is not happening. Here is the image how it is displaying now.
Here is the code that I am using now
new Morris.Line({
// ID of the element in which to draw the chart.
element: 'kt_morris_1',
// Chart data records -- each entry in this array corresponds to a point on
// the chart.
data: [{
y: `${invoice_date0}`,
a: invoice_income0,
},
{
y: `${invoice_date1}`,
a: 75,
},
{
y: `${invoice_date2}`,
a: 50,
},
{
y: `${invoice_date3}`,
a: 75,
},
],
// The name of the data record attribute that contains x-values.
xkey: 'y',
// A list of names of data record attributes that contain y-values.
ykeys: ['a'],
// Labels for the ykeys -- will be displayed when you hover over the
// chart.
labels: ['Total Invoice'],
lineColors: ['#6e4ff5', '#f6aa33']
});
in invoice_date0 variable is date in this formate dd-mm-Year
I want to display in x-axis How I can do that?

According to the library documentation morris.js expects dates formatted as 'yyyy-mm-dd'.
So you can simply use a conversion function to change the format you use from 'dd-mm-Year' to 'yyyy-mm-dd'