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

The pointIntervalUnit option should cover days to be used on DST crossover #4958

Closed
TorsteinHonsi opened this issue Jan 26, 2016 · 4 comments
Closed
Labels

Comments

@TorsteinHonsi
Copy link
Collaborator

@TorsteinHonsi TorsteinHonsi commented Jan 26, 2016

Otherwise, there is no way to put daily points.

Demo: http://jsbin.com/togajuguwa/edit?html,js,output.

Expected this to work:

series: {
    pointStart: 1445641200000,
    pointInterval: 1,
    pointIntervalUnit: 'day'
}
@TorsteinHonsi
Copy link
Collaborator Author

@TorsteinHonsi TorsteinHonsi commented Jan 26, 2016

Work in progress

In the autoIncrement function, I replaced the block handling pointIntervalUnit with the following. It then supports day, but we're only half way to the solution because it doesn't take getTimezoneOffset into account:

        if (pointIntervalUnit) {
            date = new Date(xIncrement);
            if (pointIntervalUnit === 'day') {
                date = +date[setDate](date[getDate]() + pointInterval);
            } else if (pointIntervalUnit === 'month') {
                date = +date[setMonth](date[getMonth]() + pointInterval);
            } else if (pointIntervalUnit === 'year') {
                date = +date[setFullYear](date[getFullYear]() + pointInterval)
            }
            pointInterval = date - xIncrement - getTZOffset(xIncrement);
        }
@PaulDalek
Copy link
Contributor

@PaulDalek PaulDalek commented Nov 9, 2017

+1

2 similar comments
@Denyllon
Copy link
Contributor

@Denyllon Denyllon commented Nov 9, 2017

+1

@droiddk
Copy link

@droiddk droiddk commented Nov 13, 2017

+1

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

Successfully merging a pull request may close this issue.

None yet
4 participants