| `time.round` | `string` | `false` | If defined, dates will be rounded to the start of this unit. See [Time Units](#time-units) below for the allowed units.
| `time.tooltipFormat` | `string` | | The format string to use for the tooltip.
| `time.unit` | `string` | `false` | If defined, will force the unit to be a certain type. See [Time Units](#time-units) section below for details.
-| `time.stepSize` | `number` | `1` | The number of units between grid lines.
| `time.minUnit` | `string` | `'millisecond'` | The minimum display format to be used for a time unit.
!!!include(axes/cartesian/_common.md)!!!
* Linear scales now add and subtracts `5%` of the max value to the range if the min and max are the same instead of `1`.
* If the tooltip callback returns `undefined`, then the default callback will be used.
* `maintainAspectRatio` respects container height.
+* Time and timeseries scales use `ticks.stepSize` instead of `time.stepSize`, which has been removed.
#### Type changes
* The order of the `ChartMeta` parameters have been changed from `<Element, DatasetElement, Type>` to `<Type, Element, DatasetElement>`.
const timeOpts = options.time;
// @ts-ignore
const minor = timeOpts.unit || determineUnitForAutoTicks(timeOpts.minUnit, min, max, this._getLabelCapacity(min));
- const stepSize = valueOrDefault(timeOpts.stepSize, 1);
+ const stepSize = valueOrDefault(options.ticks.stepSize, 1);
const weekday = minor === 'week' ? timeOpts.isoWeekday : false;
const hasWeekday = isNumber(weekday) || weekday === true;
const ticks = {};
bounds: 'ticks',
time: {
unit: 'hour',
+ },
+ ticks: {
stepSize: 2
}
},
* @default false
*/
unit: false | TimeUnit;
-
- /**
- * The number of units between grid lines.
- * @default 1
- */
- stepSize: number;
/**
* The minimum display format to be used for a time unit.
* @default 'millisecond'