From b6e9f64018e2d3c42543f77daf985686cf7fcb23 Mon Sep 17 00:00:00 2001 From: DanielM Date: Fri, 30 Sep 2016 14:27:31 +0200 Subject: [PATCH] Complete HighchartsBarStates interface. Add Color interface (#11505) - HighchartsBarStates interfaces didn't include `borderColor` and `color` properties, as documented in http://api.highcharts.com/highcharts/plotOptions.bar.states.hover - A Color interface was added, since the documentation refers many times to `Color` as a type. This colors can be either a string or a gradient, as stated in http://www.highcharts.com/docs/chart-design-and-style/colors. The introduction of this type should help alleviating the errors currently present where certain "color" properties are only allowed to be strings. --- highcharts/highcharts.d.ts | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/highcharts/highcharts.d.ts b/highcharts/highcharts.d.ts index bfe5a70235..2274e221d0 100644 --- a/highcharts/highcharts.d.ts +++ b/highcharts/highcharts.d.ts @@ -240,7 +240,7 @@ interface HighchartsPlotBands { * Border color for the plot band. Also requires borderWidth to be set. * @default null */ - borderColor?: string | HighchartsGradient; + borderColor?: Color; /** * Border width for the plot band. Also requires borderColor to be set. * @default 0 @@ -249,7 +249,7 @@ interface HighchartsPlotBands { /** * The color of the plot band. */ - color?: string | HighchartsGradient; + color?: Color; /** * An object defining mouse events for the plot band. Supported properties are click, mouseover, mouseout, * mousemove. @@ -1309,6 +1309,11 @@ interface HighchartsGradient { setOpacity?(alpha: number): HighchartsGradient; } +/** + * Type equivalent to the 'Color' type mentioned throughout the documentation. + */ +type Color = string | HighchartsGradient; + interface HighchartsChartOptions3dFrame { /** * The color of the panel. @@ -3248,11 +3253,19 @@ interface HighchartsLineStates { } interface HighchartsBarStates { + /** + * A specific border color for the hovered point. Defaults to inherit the normal state border color. + */ + borderColor?: string | HighchartsGradient; /** * How much to brighten the point on interaction. Requires the main color to be defined in hex or rgb(a) format. * @default 0.1 */ brightness?: number; + /** + * + */ + color?: string | HighchartsGradient; /** * Enable separate styles for the hovered series to visualize that the user hovers either the series itself or the * legend.