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

Document new time options #4592

Merged
merged 1 commit into from
Aug 8, 2017
Merged

Document new time options #4592

merged 1 commit into from
Aug 8, 2017

Conversation

benmccann
Copy link
Contributor

@benmccann benmccann commented Jul 31, 2017

This PR includes the updates introduced in #4595

Copy link
Member

@simonbrunel simonbrunel left a comment

Choose a reason for hiding this comment

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

Thanks, just a few adjustments :)

| `unit` | `String` | `false` | If defined, will force the unit to be a certain type. See [Time Units](#time-units) section below for details.
| `stepSize` | `Number` | `1` | The number of units between grid lines.
| `minUnit` | `String` | `'millisecond'` | The minimum display format to be used for a time unit.
| `scales.distribution` | `String` | `linear` | How data is plotted. Valid options are `linear` and `series`. [more...](#scale-distribution)
Copy link
Member

Choose a reason for hiding this comment

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

It's confusing to prefix root options with scale., it looks like scale.*, ticks.* and time.* are all at the same level.

Copy link
Member

Choose a reason for hiding this comment

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

I would remove Valid options are linear and series. to keep the table shorter: it's detailed in the more link.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

| `stepSize` | `Number` | `1` | The number of units between grid lines.
| `minUnit` | `String` | `'millisecond'` | The minimum display format to be used for a time unit.
| `scales.distribution` | `String` | `linear` | How data is plotted. Valid options are `linear` and `series`. [more...](#scale-distribution)
| `scale.bounds` | `String` | `data` | Determines the scale bounds. Valid options are `data` and `ticks`. [more...](#scale-bounds)
Copy link
Member

Choose a reason for hiding this comment

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

I would remove Valid options are data and ticks., it's detailed in the more link.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

| `minUnit` | `String` | `'millisecond'` | The minimum display format to be used for a time unit.
| `scales.distribution` | `String` | `linear` | How data is plotted. Valid options are `linear` and `series`. [more...](#scale-distribution)
| `scale.bounds` | `String` | `data` | Determines the scale bounds. Valid options are `data` and `ticks`. [more...](#scale-bounds)
| `ticks.source` | `String` | `auto` | How ticks are generated. Valid options are `auto`, `data, and `labels`. [more...](#ticks-source)
Copy link
Member

Choose a reason for hiding this comment

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

Same

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done


This property controls the data distribution along the scale:

* 'linear': data are spread according to their time (distances can vary)
Copy link
Member

Choose a reason for hiding this comment

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

I would format values as code:

`'linear'`

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done


This property controls the scale boundary strategy (bypassed by min/max time options)

* `data`: make sure data are fully visible, labels outside are removed
Copy link
Member

@simonbrunel simonbrunel Aug 3, 2017

Choose a reason for hiding this comment

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

Values are strings:

`'data'`

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

@benmccann
Copy link
Contributor Author

@etimberg could you give this one a look? thanks!

@etimberg etimberg merged commit 4697226 into chartjs:master Aug 8, 2017
@simonbrunel simonbrunel added this to the Version 2.7 milestone Aug 14, 2017
yofreke pushed a commit to yofreke/Chart.js that referenced this pull request Dec 30, 2017
exwm pushed a commit to exwm/Chart.js that referenced this pull request Apr 30, 2021
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.

None yet

3 participants