mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-08-11 20:40:20 +00:00
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.
This commit is contained in:
Vendored
+15
-2
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user