mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-02-03 23:42:50 +00:00
Move rich definition to text-stlyle.d.ts (#38733)
This commit is contained in:
parent
3e9be25146
commit
e142547579
58
types/echarts/index.d.ts
vendored
58
types/echarts/index.d.ts
vendored
@ -778,7 +778,7 @@ declare namespace echarts {
|
||||
*
|
||||
* @see https://ecomfe.github.io/echarts-doc/public/en/option.html#textStyle
|
||||
*/
|
||||
textStyle?: EChartOption.TextStyle,
|
||||
textStyle?: EChartOption.BaseTextStyle,
|
||||
|
||||
/**
|
||||
* Whether to enable animation.
|
||||
@ -968,11 +968,11 @@ declare namespace echarts {
|
||||
text?: string;
|
||||
link?: string,
|
||||
target?: string,
|
||||
textStyle?: object,
|
||||
textStyle?: EChartOption.TextStyleWithRich,
|
||||
subtext?: string,
|
||||
sublink?: string,
|
||||
subtarget?: string,
|
||||
subtextStyle?: object,
|
||||
subtextStyle?: EChartOption.TextStyleWithRich,
|
||||
textAlign?: string,
|
||||
textVerticalAlign?: string,
|
||||
triggerEvent?: boolean,
|
||||
@ -1114,7 +1114,7 @@ declare namespace echarts {
|
||||
*
|
||||
* @see https://ecomfe.github.io/echarts-doc/public/en/option.html#yAxis.nameTextStyle
|
||||
*/
|
||||
nameTextStyle?: CartesianAxis.TextStyle;
|
||||
nameTextStyle?: TextStyleWithRich;
|
||||
|
||||
/**
|
||||
* Gap between axis name and axis line.
|
||||
@ -1390,52 +1390,6 @@ declare namespace echarts {
|
||||
namespace CartesianAxis {
|
||||
type Type = 'value' | 'category' | 'time' | 'log';
|
||||
|
||||
/**
|
||||
* @todo describe
|
||||
*/
|
||||
interface Style {
|
||||
color?: string;
|
||||
fontStyle?: 'normal' | 'italic' | 'oblique';
|
||||
fontWeight?: 'normal' | 'bold' | 'bolder' | 'lighter'
|
||||
| '100' | '200' | '300' | '400';
|
||||
fontFamily?: string;
|
||||
fontSize?: number;
|
||||
align?: string;
|
||||
verticalAlign?: string;
|
||||
lineHeight?: number;
|
||||
backgroundColor?: string | object;
|
||||
borderColor?: string;
|
||||
borderWidth?: number;
|
||||
borderRadius?: number;
|
||||
padding?: number | number[];
|
||||
shadowColor?: string;
|
||||
shadowBlur?: number;
|
||||
shadowOffsetX?: number;
|
||||
shadowOffsetY?: number;
|
||||
width?: number | string;
|
||||
height?: number | string;
|
||||
textBorderColor?: string;
|
||||
textBorderWidth?: number;
|
||||
textShadowColor?: string;
|
||||
textShadowBlur?: number;
|
||||
textShadowOffsetX?: number;
|
||||
textShadowOffsetY?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* @todo describe
|
||||
*/
|
||||
interface RichStyle {
|
||||
[userStyleName: string]: Style;
|
||||
}
|
||||
|
||||
interface TextStyle extends Style {
|
||||
/**
|
||||
* @see https://ecomfe.github.io/echarts-doc/public/en/option.html#yAxis.data.textStyle.rich
|
||||
*/
|
||||
rich?: RichStyle;
|
||||
}
|
||||
|
||||
/**
|
||||
* @todo describe
|
||||
*/
|
||||
@ -1451,7 +1405,7 @@ declare namespace echarts {
|
||||
/**
|
||||
* @todo describe
|
||||
*/
|
||||
interface Label extends TextStyle {
|
||||
interface Label extends TextStyleWithRich {
|
||||
show?: boolean;
|
||||
interval?: number | Function;
|
||||
inside?: boolean;
|
||||
@ -1492,7 +1446,7 @@ declare namespace echarts {
|
||||
*/
|
||||
interface DataObject {
|
||||
value?: string | number;
|
||||
textStyle?: TextStyle;
|
||||
textStyle?: TextStyleWithRich;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
2
types/echarts/options/calendar.d.ts
vendored
2
types/echarts/options/calendar.d.ts
vendored
@ -155,7 +155,7 @@ declare namespace echarts {
|
||||
silent?: boolean;
|
||||
}
|
||||
namespace Calendar {
|
||||
interface Label extends BasicComponents.CartesianAxis.TextStyle {
|
||||
interface Label extends TextStyleWithRich {
|
||||
/**
|
||||
* Set this to false to prevent label from showing.
|
||||
*
|
||||
|
||||
2
types/echarts/options/data-zoom.d.ts
vendored
2
types/echarts/options/data-zoom.d.ts
vendored
@ -77,7 +77,7 @@ declare namespace echarts {
|
||||
showDetail?: boolean;
|
||||
showDataShadow?: string;
|
||||
realtime?: boolean;
|
||||
textStyle?: object;
|
||||
textStyle?: BaseTextStyle;
|
||||
xAxisIndex?: number | number[];
|
||||
yAxisIndex?: number | number[];
|
||||
radiusAxisIndex?: number | number[];
|
||||
|
||||
2
types/echarts/options/legend.d.ts
vendored
2
types/echarts/options/legend.d.ts
vendored
@ -198,7 +198,7 @@ declare namespace echarts {
|
||||
/**
|
||||
* Legend text style.
|
||||
*/
|
||||
textStyle?: TextStyle;
|
||||
textStyle?: TextStyleWithRich;
|
||||
/**
|
||||
* Tooltip configuration for legend tooltip, which is similar to tooltip.
|
||||
*
|
||||
|
||||
34
types/echarts/options/text-style.d.ts
vendored
34
types/echarts/options/text-style.d.ts
vendored
@ -1,9 +1,10 @@
|
||||
declare namespace echarts {
|
||||
namespace EChartOption {
|
||||
|
||||
/**
|
||||
* @todo describe
|
||||
* @see https://echarts.apache.org/en/option.html#textStyle
|
||||
*/
|
||||
interface TextStyle {
|
||||
interface BaseTextStyle {
|
||||
color?: string;
|
||||
fontStyle?: 'normal' | 'italic' | 'oblique';
|
||||
fontWeight?: 'normal' | 'bold' | 'bolder' | 'lighter'
|
||||
@ -20,5 +21,34 @@ declare namespace echarts {
|
||||
textShadowOffsetX?: number;
|
||||
textShadowOffsetY?: number;
|
||||
}
|
||||
|
||||
interface TextStyle extends BaseTextStyle {
|
||||
align?: string;
|
||||
verticalAlign?: string;
|
||||
backgroundColor?: string | object;
|
||||
borderColor?: string;
|
||||
borderWidth?: number;
|
||||
borderRadius?: number;
|
||||
padding?: number | number[];
|
||||
shadowColor?: string;
|
||||
shadowBlur?: number;
|
||||
shadowOffsetX?: number;
|
||||
shadowOffsetY?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see https://echarts.apache.org/en/tutorial.html#Rich%20Text
|
||||
*/
|
||||
interface RichStyle {
|
||||
[userStyleName: string]: TextStyle;
|
||||
}
|
||||
|
||||
interface BaseTextStyleWithRich {
|
||||
rich?: RichStyle;
|
||||
}
|
||||
|
||||
interface TextStyleWithRich extends TextStyle {
|
||||
rich?: RichStyle;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
2
types/echarts/options/tooltip.d.ts
vendored
2
types/echarts/options/tooltip.d.ts
vendored
@ -300,7 +300,7 @@ declare namespace echarts {
|
||||
/**
|
||||
* The text style of tooltip's floating layer.
|
||||
*/
|
||||
textStyle?: {};
|
||||
textStyle?: BaseTextStyle;
|
||||
|
||||
/**
|
||||
* Extra CSS style for floating layer.
|
||||
|
||||
2
types/echarts/options/visual-map.d.ts
vendored
2
types/echarts/options/visual-map.d.ts
vendored
@ -40,7 +40,7 @@ declare namespace echarts {
|
||||
borderColor?: string;
|
||||
borderWidth?: number;
|
||||
color?: string[];
|
||||
textStyle?: EChartOption.TextStyle;
|
||||
textStyle?: EChartOption.BaseTextStyleWithRich;
|
||||
formatter?: string | Function;
|
||||
}
|
||||
interface Piecewise {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user