Skip to content

Allow time scale to offset using skipped ticks - #10278

Merged
etimberg merged 1 commit into
chartjs:masterfrom
etimberg:recompute-time-offset-after-skipping
Apr 3, 2022
Merged

etimberg merged 1 commit into
chartjs:masterfrom
etimberg:recompute-time-offset-after-skipping

Conversation

@etimberg

@etimberg etimberg commented Apr 3, 2022

Copy link
Copy Markdown
Member

Resolves #10215 using a new option for time scales called offsetAfterAutoskip.

If there are better option names, we can use that too. Perhaps an offsetTicks setting with two options: 'all' and 'skipped'

@kurkle

kurkle commented Apr 3, 2022

Copy link
Copy Markdown
Member

Could be also a new value for the existing offset option. offset: true // === 'all', offset: 'skipped'.
But I'm not really a fan of that :)

@kurkle kurkle left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does it break many fixtures if this would be default? Just wondering if the option could be avoided.
In case the option is needed, the suggested one is fine by me.

@etimberg

etimberg commented Apr 3, 2022

Copy link
Copy Markdown
Member Author

Setting this as the default breaks 2 fixtures

@etimberg

etimberg commented Apr 3, 2022

Copy link
Copy Markdown
Member Author

One of those changes is pretty big
changed fixture
though

@kurkle

kurkle commented Apr 3, 2022

Copy link
Copy Markdown
Member

That one does not have any ticks, so could maybe be worked around.. But anyway, I think its safer to have the new option.

@etimberg

etimberg commented Apr 3, 2022

Copy link
Copy Markdown
Member Author

I agree, a new option makes more sense. We can change the default at v4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bar Chart offset property Does not work with time axis type

2 participants