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

Padding on timeseries #42

Closed
drazik opened this issue Jun 29, 2017 · 4 comments
Closed

Padding on timeseries #42

drazik opened this issue Jun 29, 2017 · 4 comments
Labels

Comments

@drazik
Copy link

drazik commented Jun 29, 2017

Hello,

Description

I am trying to add a padding on a chart that use a timeseries based x axis. But nothing happens. What I'm trying to achieve is to prevent my points to be cut on left and right when they are on the edges of my chart (see below).

screenshot_5

Steps to check or reproduce

You can see this codepen to reproduce.

Thank you very much.

EDIT : I found a workaround by using min/max and substracting/adding some days on my boundaries. It works, but I think it would be better if we could use padding since it is made for that purpose I guess.

@netil netil added the question label Jul 3, 2017
@netil
Copy link
Member

netil commented Jul 3, 2017

@drazik, in that case padding values should be set in numeric time value.

For example, if you want give left padding as one day's width, set time value as 1000*60*60*24 which is corresponding the numeric time values of 24hs.

axis: {
	x: {
		padding: {
			// set left padding as the width of one day
			left: 1000*60*60*24
		}

image

I think on API isn't fully detailed described that. I'll be clarifying that on docs.

@drazik
Copy link
Author

drazik commented Jul 3, 2017

Oh yeah OK thank you very much @netil. Should I close the issue then ? Or you want to keep it opened to remind yourself to clarify the docs ? Maybe I can help by writing this part of the doc and make a PR ?

@netil
Copy link
Member

netil commented Jul 3, 2017

I'll close after the PR merge. :)

@drazik
Copy link
Author

drazik commented Jul 3, 2017

I didn't see that you already made a PR 👍 nice work !

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

No branches or pull requests

2 participants