mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-07-01 15:50:13 +00:00
Merge pull request #10580 from nitoloz/feature/10342
#10342 Added hideNoData/showNoData methods to highcharts
This commit is contained in:
10
highcharts/highcharts-modules-no-data-to-display-tests.ts
Normal file
10
highcharts/highcharts-modules-no-data-to-display-tests.ts
Normal file
@@ -0,0 +1,10 @@
|
||||
/// <reference path="highcharts-modules-no-data-to-display.d.ts" />
|
||||
/// <reference path="highcharts.d.ts" />
|
||||
/// <reference path="../jquery/jquery.d.ts" />
|
||||
|
||||
function test_NoDataToDisplay() {
|
||||
var chart = $("#container").highcharts();
|
||||
var chartHasData = chart.hasData();
|
||||
chart.hideNoData();
|
||||
chart.showNoData("Custom no data message");
|
||||
}
|
||||
26
highcharts/highcharts-modules-no-data-to-display.d.ts
vendored
Normal file
26
highcharts/highcharts-modules-no-data-to-display.d.ts
vendored
Normal file
@@ -0,0 +1,26 @@
|
||||
// Type definitions for Highcharts No Data to Display
|
||||
// Project: http://www.highcharts.com/
|
||||
// Definitions by: Andrey Zolotin <http://github.com/nitoloz>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
/// <reference path="highcharts.d.ts" />
|
||||
interface HighchartsChartObject {
|
||||
/**
|
||||
* Returns true if there are data points within the plot area now
|
||||
* @return {boolean} If chart has any data.
|
||||
* @since 3.0.8
|
||||
*/
|
||||
hasData(): boolean;
|
||||
|
||||
/**
|
||||
* Hide the 'No data to display' message added by the no-data-to-display plugin.
|
||||
* @since 3.0.8
|
||||
*/
|
||||
hideNoData(): void;
|
||||
|
||||
/**
|
||||
* Display a no-data message.
|
||||
* @param {String} message An optional message to show in place of the default one
|
||||
* @since 3.0.8
|
||||
*/
|
||||
showNoData(message?: string): void;
|
||||
}
|
||||
Reference in New Issue
Block a user