mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-04 06:47:03 +00:00
Add: click event type to range selector button
This commit is contained in:
Vendored
+7
-1
@@ -2,7 +2,8 @@
|
||||
// Project: http://www.highcharts.com/
|
||||
|
||||
// Definitions by: David Deutsch <http://github.com/DavidKDeutsch>
|
||||
// Definitions by: Dave Baumann <https://github.com/route2Dev>
|
||||
// Dave Baumann <https://github.com/route2Dev>
|
||||
// Richard Ison <https://github.com/richardison>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
import * as Highcharts from "highcharts";
|
||||
@@ -31,11 +32,16 @@ declare namespace Highstock {
|
||||
yAxis?: Highcharts.AxisOptions;
|
||||
}
|
||||
|
||||
interface RangeSelectButtonEvent {
|
||||
click?(event: Event): void;
|
||||
}
|
||||
|
||||
interface RangeSelectorButton {
|
||||
type: string; // Defines the timespan, can be one of 'millisecond', 'second', 'minute', 'day', 'week', 'month', 'ytd' (year to date), 'year' and 'all'.
|
||||
count?: number;
|
||||
text: string;
|
||||
dataGrouping?: any; // not sure how this works
|
||||
events?: RangeSelectButtonEvent;
|
||||
}
|
||||
|
||||
interface RangeSelectorOptions {
|
||||
|
||||
@@ -25,6 +25,14 @@ $(() => {
|
||||
rangeSelector: {
|
||||
allButtonsEnabled: true,
|
||||
selected: 1,
|
||||
buttons: [{
|
||||
type: 'month',
|
||||
count: 1,
|
||||
text: '1m',
|
||||
events: {
|
||||
click: () => { }
|
||||
}
|
||||
}],
|
||||
buttonTheme: { // styles for the buttons
|
||||
fill: 'none',
|
||||
stroke: 'none',
|
||||
|
||||
Reference in New Issue
Block a user