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

Time axis omits ticks if data is missing #4493

Closed
andig opened this issue Jul 13, 2017 · 10 comments
Closed

Time axis omits ticks if data is missing #4493

andig opened this issue Jul 13, 2017 · 10 comments

Comments

@andig
Copy link
Contributor

andig commented Jul 13, 2017

When forcing the time axis with min..max, it only draws ticks and gridlines where data exists. This may be the desired behaviour but should be configurable.

@simonbrunel
Copy link
Member

@andig can you post a fiddle that shows the current behavior and an image of what you expect as result?

@andig
Copy link
Contributor Author

andig commented Jul 13, 2017

Here's an example:

screen shot 2017-07-13 at 21 20 27

Will taka some time to do a fiddle. I'm missing the date ticks between 5...13.

@andig
Copy link
Contributor Author

andig commented Jul 14, 2017

Here https://jsfiddle.net/andig2/xp1Lxk2g/2/ is the fiddle- you'll need to give the chart a bit space so it shows days on the x axis, then the issue becomes transparent.

@simonbrunel
Copy link
Member

That might have been fixed for 2.7.0, can you try with this build?

@andig
Copy link
Contributor Author

andig commented Jul 14, 2017

Seems fixed on quick test, great stuff!

@andig andig closed this as completed Jul 14, 2017
@andig
Copy link
Contributor Author

andig commented Jul 16, 2017

@simonbrunel The generation of missing ticks/ grid lines is indeed fixed. However, 2.7. moves the axis min/max ranges on its own. In my case with time series it adds one month before and after which I don't want. Is this a bug or are there some new settings to control this behaviour?

@andig andig reopened this Jul 16, 2017
@simonbrunel
Copy link
Member

Do you have an example, with input data/labels?

@andig
Copy link
Contributor Author

andig commented Jul 16, 2017

@simonbrunel

See this fiddle: https://jsfiddle.net/andig2/6raazty4/ It should show 1. July 2016 - 1. August 2017. WIth 2.7 it gives Mai ... September. The axis is just used for displaying start/end.

You'll have to update the fiddle to use 2.7, I could only run it locally as the link you've given uses the wrong certificate (or you could share a gh link to the dist version of master)?

@simonbrunel
Copy link
Member

I see that, the min/max calculation seems indeed hazardous. I have been able to get a valid range with the following settings, but don't know why:

time: {
    min: '2017/07/01',
    max: '2017/08/01',
    unit: 'month',
    round: true
}

You can use the http link with http://jsfiddle.net (no https)

@andig
Copy link
Contributor Author

andig commented Jul 16, 2017

I have been able to get a valid range with the following settings, but don't know why:

Ok- so we can close this issue as fixed and I'll open a new one for the axis min/max. I need user to be able to zoom into any desired timespan and expect min/max to be honored.

You can use the http link with http://jsfiddle.net (no https)

Good to know, thanks!

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