Merge pull request #12836 from nmykhailova/types-2.0

Added LegendObject and legend property to ChartObject
This commit is contained in:
Nathan Shively-Sanders
2016-11-26 08:57:43 -08:00
committed by GitHub
2 changed files with 18 additions and 0 deletions
+6
View File
@@ -2212,6 +2212,7 @@ function test_ChartObject() {
chart.showLoading("Loading label");
var firstXAxis = chart.xAxis[0];
var firstYAxis = chart.yAxis[0];
var legend = chart.legend;
}
function test_ElementObject() {
@@ -2338,3 +2339,8 @@ function test_SeriesObject() {
var xAxis = series.xAxis;
var yAxis = series.yAxis;
}
function test_LegendObject() {
var legend = $('#container').highcharts().legend;
legend.update({});
legend.update({}, false);
}
+12
View File
@@ -5977,6 +5977,8 @@ declare namespace Highcharts {
yAxis: AxisObject[];
renderer: RendererObject;
legend: LegendObject;
}
interface Chart {
@@ -6456,6 +6458,16 @@ declare namespace Highcharts {
*/
yAxis: AxisObject;
}
interface LegendObject {
/**
* Update the legend with new options.
* @param {LegendOptions} options New options that will be merged into the legend's existing options.
* @param [boolean] redraw - Whether to redraw the chart. Defaults to true.
* @since 5.0.0
*/
update(options: LegendOptions, redraw?: boolean): void;
}
}
declare global {