Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draw line from 0,0 upto first item data using line graph #774

Open
bumbumpaw07 opened this issue Oct 16, 2018 · 3 comments
Open

Draw line from 0,0 upto first item data using line graph #774

bumbumpaw07 opened this issue Oct 16, 2018 · 3 comments

Comments

@bumbumpaw07
Copy link

Hello, if I only have one item in my data array, how can I draw a line from 0,0 so that may first data will not look like alone dot? See example link below.

Live Chart example

@pierresh
Copy link

Hello,

I am sorry this is not possible, you may just try to prepend one data { day: '-', pushups: 0 }, in your dataset

@bumbumpaw07
Copy link
Author

Hi, thanks for replying. iIn that case. How can I hide the data set label on first dot only? so it will not look like like a displaying record but just as a starting dot line?

Live Chart Example

@pierresh
Copy link

You can try to use the function hoverCallback like this:

hoverCallback: function (index, options, content, row) {
	if (index == 0) { return false; }
	else { return content; }
}

More info about this function here: http://morrisjs.github.io/morris.js/lines.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants