mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-05-23 04:47:24 +08:00
Merge pull request #7807 from baltie/highcharts-4.2.0
Highcharts: Updated definitions to highcharts 4.2.0
This commit is contained in:
@@ -135,6 +135,51 @@ function originalTests() {
|
||||
var multipleYAxisOptions: HighchartsOptions = {
|
||||
yAxis: [{}, {}]
|
||||
};
|
||||
|
||||
var renderToIdChart = new Highcharts.Chart("container", {
|
||||
xAxis: {},
|
||||
series: [<HighchartsLineChartSeriesOptions>{
|
||||
data: [29.9, 71.5, 106.4, 129.2, 144.0, 176.0, 135.6, 148.5, 216.4, 194.1, 95.6, 54.4],
|
||||
type: "line",
|
||||
allowPointSelect: true
|
||||
}]
|
||||
});
|
||||
|
||||
var renderToElementChart = new Highcharts.Chart(div, {
|
||||
xAxis: {},
|
||||
series: [<HighchartsLineChartSeriesOptions>{
|
||||
data: [29.9, 71.5, 106.4, 129.2, 144.0, 176.0, 135.6, 148.5, 216.4, 194.1, 95.6, 54.4],
|
||||
type: "line",
|
||||
allowPointSelect: true
|
||||
}]
|
||||
});
|
||||
|
||||
var createWithFunction = Highcharts.chart({
|
||||
xAxis: {},
|
||||
series: [<HighchartsLineChartSeriesOptions>{
|
||||
data: [29.9, 71.5, 106.4, 129.2, 144.0, 176.0, 135.6, 148.5, 216.4, 194.1, 95.6, 54.4],
|
||||
type: "line",
|
||||
allowPointSelect: true
|
||||
}]
|
||||
});
|
||||
|
||||
var createWithFunctionRenderToId = Highcharts.chart("container", {
|
||||
xAxis: {},
|
||||
series: [<HighchartsLineChartSeriesOptions>{
|
||||
data: [29.9, 71.5, 106.4, 129.2, 144.0, 176.0, 135.6, 148.5, 216.4, 194.1, 95.6, 54.4],
|
||||
type: "line",
|
||||
allowPointSelect: true
|
||||
}]
|
||||
});
|
||||
|
||||
var createWithFunctionRenderToElement = Highcharts.chart(div, {
|
||||
xAxis: {},
|
||||
series: [<HighchartsLineChartSeriesOptions>{
|
||||
data: [29.9, 71.5, 106.4, 129.2, 144.0, 176.0, 135.6, 148.5, 216.4, 194.1, 95.6, 54.4],
|
||||
type: "line",
|
||||
allowPointSelect: true
|
||||
}]
|
||||
});
|
||||
}
|
||||
|
||||
function test_alldefaults() {
|
||||
@@ -1554,15 +1599,18 @@ function test_Line() {
|
||||
series: [<HighchartsLineChartSeriesOptions>{
|
||||
data: [1, 2, 3, 4, null, 6, 7, null, 9],
|
||||
step: 'right',
|
||||
name: 'Right'
|
||||
name: 'Right',
|
||||
linecap: 'round'
|
||||
}, <HighchartsLineChartSeriesOptions>{
|
||||
data: [5, 6, 7, 8, null, 10, 11, null, 13],
|
||||
step: 'center',
|
||||
name: 'Center'
|
||||
name: 'Center',
|
||||
linecap: 'round'
|
||||
}, <HighchartsLineChartSeriesOptions>{
|
||||
data: [9, 10, 11, 12, null, 14, 15, null, 17],
|
||||
step: 'left',
|
||||
name: 'Left'
|
||||
name: 'Left',
|
||||
linecap: 'round'
|
||||
}]
|
||||
});
|
||||
}
|
||||
|
||||
52
highcharts/highcharts.d.ts
vendored
52
highcharts/highcharts.d.ts
vendored
@@ -117,6 +117,13 @@ interface HighchartsAxisLabels {
|
||||
* @default 5
|
||||
*/
|
||||
padding?: number;
|
||||
/**
|
||||
* Whether to reserve space for the labels. This can be turned off when for example the labels are rendered inside
|
||||
* the plot area instead of outside.
|
||||
* @default true
|
||||
* @since 4.1.10
|
||||
*/
|
||||
reserveSpace?: boolean;
|
||||
/**
|
||||
* Rotation of the labels in degrees.
|
||||
* @default 0
|
||||
@@ -3666,6 +3673,11 @@ interface HighchartsSeriesChart {
|
||||
* @default 2
|
||||
*/
|
||||
lineWidth?: number;
|
||||
/**
|
||||
* The line cap used for line ends and line joins on the graph.
|
||||
* @default 'round'
|
||||
*/
|
||||
linecap?: string;
|
||||
/**
|
||||
* The id of another series to link to. Additionally, the value can be ':previous' to link to the previous series.
|
||||
* When two series are linked, only the first one appears in the legend. Toggling the visibility of this also
|
||||
@@ -4432,12 +4444,6 @@ interface HighchartsLineChart extends HighchartsSeriesChart {
|
||||
* @since 1.2.5
|
||||
*/
|
||||
step?: boolean|string;
|
||||
|
||||
/**
|
||||
* The line cap used for line ends and line joins on the graph.
|
||||
* @default 'round'
|
||||
*/
|
||||
linecap?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -4445,7 +4451,9 @@ interface HighchartsLineChart extends HighchartsSeriesChart {
|
||||
*/
|
||||
interface HighchartsPieChart extends HighchartsSeriesChart {
|
||||
/**
|
||||
* The color of the border surrounding each column or bar.
|
||||
* The color of the border surrounding each slice. When null, the border takes the same color as the slice fill.
|
||||
* This can be used together with a borderWidth to fill drawing gaps created by antialiazing artefacts in
|
||||
* borderless pies.
|
||||
* @default '#FFFFFF'
|
||||
*/
|
||||
borderColor?: string;
|
||||
@@ -4724,6 +4732,11 @@ interface HighchartsTreeMapChart extends HighchartsSeriesChart {
|
||||
* @since 4.1.8
|
||||
*/
|
||||
maxPointWidth?: number;
|
||||
/**
|
||||
* The sort index of the point inside the treemap level.
|
||||
* @since 4.1.10
|
||||
*/
|
||||
sortIndex?: number;
|
||||
/**
|
||||
* A wrapper object for all the series options in specific states.
|
||||
*/
|
||||
@@ -5789,6 +5802,21 @@ interface HighchartsChart {
|
||||
* @return {HighchartsChartObject}
|
||||
*/
|
||||
new (options: HighchartsOptions, callback: (chart: HighchartsChartObject) => void): HighchartsChartObject;
|
||||
/**
|
||||
* This is the constructor for creating a new chart object.
|
||||
* @param {string|HTMLElement} renderTo The id or a reference to a DOM element where the chart should be rendered (since v4.2.0).
|
||||
* @param {HighchartsOptions} options The chart options
|
||||
* @return {HighchartsChartObject}
|
||||
*/
|
||||
new (renderTo: string | HTMLElement, options: HighchartsOptions): HighchartsChartObject;
|
||||
/**
|
||||
* This is the constructor for creating a new chart object.
|
||||
* @param {string|HTMLElement} renderTo The id or a reference to a DOM element where the chart should be rendered (since v4.2.0).
|
||||
* @param {HighchartsOptions} options The chart options
|
||||
* @param callback A function to execute when the chart object is finished loading and rendering. In most cases the chart is built in one thread, but in Internet Explorer version 8 or less the chart is sometimes initiated before the document is ready, and in these cases the chart object will not be finished directly after callingnew Highcharts.Chart(). As a consequence, code that relies on the newly built Chart object should always run in the callback. Defining a chart.event.load handler is equivalent.
|
||||
* @return {HighchartsChartObject}
|
||||
*/
|
||||
new (renderTo: string | HTMLElement, options: HighchartsOptions, callback: (chart: HighchartsChartObject) => void): HighchartsChartObject;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -5970,6 +5998,16 @@ interface HighchartsStatic {
|
||||
Renderer: HighchartsRenderer;
|
||||
Color(color: string | HighchartsGradient): string | HighchartsGradient;
|
||||
|
||||
/**
|
||||
* As Highcharts.Chart, but without need for the new keyword.
|
||||
* @since 4.2.0
|
||||
*/
|
||||
chart(options: HighchartsOptions, callback?: (chart: HighchartsChartObject) => void): HighchartsChartObject;
|
||||
/**
|
||||
* As Highcharts.Chart, but without need for the new keyword.
|
||||
* @since 4.2.0
|
||||
*/
|
||||
chart(renderTo: string | HTMLElement, options: HighchartsOptions, callback?: (chart: HighchartsChartObject) => void): HighchartsChartObject;
|
||||
/**
|
||||
* An array containing the current chart objects in the page. A chart's position in the array is preserved
|
||||
* throughout the page's lifetime. When a chart is destroyed, the array item becomes undefined.
|
||||
|
||||
Reference in New Issue
Block a user