};
}
-export type CategoryScaleOptions = CartesianScaleOptions & {
+export type CategoryScaleOptions = Omit<CartesianScaleOptions, 'min' | 'max'> & {
min: string | number;
max: string | number;
labels: string[] | string[][];
* @default true
*/
beginAtZero: boolean;
-
/**
* Adjustment used when calculating the maximum data value.
*/
};
export type LogarithmicScaleOptions = CartesianScaleOptions & {
-
/**
* Adjustment used when calculating the maximum data value.
*/
new <O extends LogarithmicScaleOptions = LogarithmicScaleOptions>(cfg: AnyObject): LogarithmicScale<O>;
};
-export type TimeScaleOptions = CartesianScaleOptions & {
+export type TimeScaleOptions = Omit<CartesianScaleOptions, 'min' | 'max'> & {
min: string | number;
max: string | number;
-
suggestedMin: string | number;
suggestedMax: string | number;
/**
--- /dev/null
+import { Chart } from '../../index.esm';
+
+const chart = new Chart('id', {
+ type: 'line',
+ data: {
+ datasets: [
+ {
+ label: 'Pie',
+ data: [
+ ],
+ borderColor: '#000000',
+ backgroundColor: '#00FF00'
+ }
+ ]
+ },
+ options: {
+ scales: {
+ x: {
+ type: 'time',
+ min: '2021-01-01',
+ max: '2021-12-01'
+ },
+ y: {
+ type: 'linear',
+ min: 0,
+ max: 10
+ }
+ }
+ }
+});