Alen
Alen

Reputation: 31

How to show y axis values on line points in a morris line graph

I want to show a y-axis value on a line point in a Morris line graph. I was not able to make that work in Morris.

HTML

<body>
    <div id="line-example"></div>
</body>

Script

var morris = Morris.Line({
    element: 'line-example',
    data: data,
    xkey: 'date',
    ykeys: ['Data_Error','Data_Success'],
    labels: ['Data_Error','Data_Success'],
    colors: ['yellow',"blue","Green"],
    smooth:false,
    parseTime:false,
    hideHover:'auto'
});

Current Working Graph in fiddle

Expected sample Graph Image

How to implement this in Morris line graph?

Upvotes: 3

Views: 739

Answers (1)

krlzlx
krlzlx

Reputation: 5822

Well, that would be a great feature. Unfortunately, this feature does not exists in the latest version of Morris.js (v.0.5.1).

You can try to modify Morris to add this feature, but this will be not be easy to achieve.

Upvotes: 1

Related Questions