From debb3797cd60df4c7324abb38a0aa47c46d205db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Francis=20B=C3=A9liveau?= Date: Tue, 4 Oct 2016 14:39:59 -0400 Subject: [PATCH] Change ChartAxisXOptions (#11449) Change the type for minimum and maximum options in ChartAxisXOptions to support both number and Date. --- canvasjs/canvasjs.d.ts | 44 ++++++++++++++++++++++++++++-------------- 1 file changed, 30 insertions(+), 14 deletions(-) diff --git a/canvasjs/canvasjs.d.ts b/canvasjs/canvasjs.d.ts index 75ea058e3e..bfb4dd03cd 100644 --- a/canvasjs/canvasjs.d.ts +++ b/canvasjs/canvasjs.d.ts @@ -376,7 +376,7 @@ declare namespace CanvasJS { dataSeriesIndex: number; } - interface ChartAxisXOptions { + interface ChartAxisOptions { /** * Sets the Axis Title. * Default: null @@ -472,18 +472,6 @@ declare namespace CanvasJS { */ valueFormatString?: string; /** - * Sets the minimum value of Axis. Values smaller than minimum are clipped. - * Default: Automatically Calculated based on the data - * Example: 100, 350.. - */ - minimum?: number; - /** - * Sets the maximum value permitted on Axis. Values greater than maximum are clipped. - * Default: Automatically Calculated based on the data - * Example: 100, 350.. - */ - maximum?: number; - /** * Sets the distance between Tick Marks, Grid Lines and Interlaced Colors. * Default: Automatically Calculated * Example: 50, 75.. @@ -638,13 +626,41 @@ declare namespace CanvasJS { labelFontStyle?: string; } - interface ChartAxisYOptions extends ChartAxisXOptions { + interface ChartAxisXOptions extends ChartAxisOptions { + /** + * Sets the minimum value of Axis. Values smaller than minimum are clipped. + * Default: Automatically Calculated based on the data + * Example: 100, 350.. + */ + minimum?: number | Date; + /** + * Sets the maximum value permitted on Axis. Values greater than maximum are clipped. + * Default: Automatically Calculated based on the data + * Example: 100, 350.. + */ + maximum?: number | Date; + } + + interface ChartAxisYOptions extends ChartAxisOptions { /** * When includeZero is set to true, axisY sets the range in such a way that Zero is a part of it. It is set to true by default. But, whenever y values are very big and difference among dataPoints are hard to judge, setting includeZero to false makes axisY to set a range that makes the differences prominently visible. * Default: true * Example: true, false */ includeZero?: boolean; + + /** + * Sets the minimum value of Axis. Values smaller than minimum are clipped. + * Default: Automatically Calculated based on the data + * Example: 100, 350.. + */ + minimum?: number; + /** + * Sets the maximum value permitted on Axis. Values greater than maximum are clipped. + * Default: Automatically Calculated based on the data + * Example: 100, 350.. + */ + maximum?: number; } interface ChartToolTipOptions {