Change ChartAxisXOptions (#11449)

Change the type for minimum and maximum options in ChartAxisXOptions to
support both number and Date.
This commit is contained in:
Francis Béliveau
2016-10-04 14:39:59 -04:00
committed by Mohamed Hegazy
parent 7f2cfbd0ff
commit debb3797cd

View File

@@ -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 {