Billboard.js: Padding on timeseries

Created on 29 Jun 2017  路  4Comments  路  Source: naver/billboard.js

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.

question

Most helpful comment

@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.

All 4 comments

@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.

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 ?

I'll close after the PR merge. :)

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

Was this page helpful?
0 / 5 - 0 ratings

Related issues

stevenmusumeche picture stevenmusumeche  路  3Comments

elielr01 picture elielr01  路  3Comments

bogdan-iuga picture bogdan-iuga  路  3Comments

imbyungjun picture imbyungjun  路  5Comments

flipcode1973 picture flipcode1973  路  5Comments