提交 bb68a480 编写于 作者: P pissang

fix(types): fix some type issues

上级 67d6a338
......@@ -131,7 +131,7 @@ export interface GaugeSeriesOption extends SeriesOption<GaugeStateOption>, Gauge
axisLine?: {
show?: boolean
roundCap?: boolean
lineStyle: Omit<LineStyleOption, 'color'> & {
lineStyle?: Omit<LineStyleOption, 'color'> & {
color: GaugeColorStop[]
}
},
......
......@@ -28,7 +28,8 @@ import {
SeriesLabelOption,
OptionDataValue,
StatesOptionMixin,
SeriesEncodeOptionMixin
SeriesEncodeOptionMixin,
SeriesOnCalendarOptionMixin
} from '../../util/types';
import GlobalModel from '../../model/Global';
import List from '../../data/List';
......@@ -49,7 +50,7 @@ export interface HeatmapDataItemOption extends HeatmapStateOption, StatesOptionM
}
export interface HeatmapSeriesOption extends SeriesOption<HeatmapStateOption>, HeatmapStateOption,
SeriesOnCartesianOptionMixin, SeriesOnGeoOptionMixin, SeriesEncodeOptionMixin {
SeriesOnCartesianOptionMixin, SeriesOnGeoOptionMixin, SeriesOnCalendarOptionMixin, SeriesEncodeOptionMixin {
type?: 'heatmap'
coordinateSystem?: 'cartesian2d' | 'geo' | 'calendar'
......
......@@ -115,7 +115,7 @@ export interface SymbolDrawSeriesScope {
blurScope?: BlurScope
symbolRotate?: number
symbolOffset?: number[]
symbolOffset?: (number | string)[]
labelStatesModels: Record<DisplayState, Model<LabelOption>>
......
......@@ -61,7 +61,7 @@ export interface RadarSeriesOption extends SeriesOption<RadarSeriesStateOption>,
radarIndex?: number
radarId?: string
data?: RadarSeriesStateOption[]
data?: (RadarSeriesDataItemOption | RadarSeriesDataValue)[]
}
class RadarSeriesModel extends SeriesModel<RadarSeriesOption> {
......
......@@ -163,12 +163,12 @@ export interface TreemapSeriesOption
*/
clipWindow?: 'origin' | 'fullscreen'
squareRatio: number
squareRatio?: number
/**
* Nodes on depth from root are regarded as leaves.
* Count from zero (zero represents only view root).
*/
leafDepth: number
leafDepth?: number
drillDownIcon?: string
......
......@@ -191,6 +191,8 @@ interface AxisLabelOption extends Omit<TextCommonOption, 'color'> {
// Color can be callback
color?: ColorString | ((value?: string | number, index?: number) => ColorString)
rich?: Dictionary<TextCommonOption>
}
interface MinorTickOption {
......
......@@ -44,7 +44,7 @@ export interface ParallelAxisOption extends AxisBaseOption {
/**
* 0, 1, 2, ...
*/
dim?: number[];
dim?: number | number[];
parallelIndex?: number;
areaSelectStyle?: {
width?: number;
......
......@@ -858,7 +858,7 @@ export interface SymbolOptionMixin<T = unknown> {
symbolKeepAspect?: boolean
symbolOffset?: number[]
symbolOffset?: (string | number)[]
}
/**
......@@ -953,7 +953,7 @@ export interface TextCommonOption extends ShadowOptionMixin {
lineHeight?: number
backgroundColor?: ColorString | {
image: ImageLike
image: ImageLike | string
}
borderColor?: string
borderWidth?: number
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册