You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@echarts.apache.org by sh...@apache.org on 2021/09/05 03:35:30 UTC
[echarts] branch improve-types created (now 06b33ad)
This is an automated email from the ASF dual-hosted git repository.
shenyi pushed a change to branch improve-types
in repository https://gitbox.apache.org/repos/asf/echarts.git.
at 06b33ad fix(type): improve some types
This branch includes the following new commits:
new 06b33ad fix(type): improve some types
The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org
[echarts] 01/01: fix(type): improve some types
Posted by sh...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
shenyi pushed a commit to branch improve-types
in repository https://gitbox.apache.org/repos/asf/echarts.git
commit 06b33ad9337c5e0583143c07afcc2a3f9fbe9b8d
Author: pissang <bm...@gmail.com>
AuthorDate: Sun Sep 5 11:33:34 2021 +0800
fix(type): improve some types
---
index.d.ts | 5 ++++-
src/chart/candlestick/CandlestickSeries.ts | 6 +++---
src/chart/line/LineSeries.ts | 2 +-
src/chart/lines/LinesSeries.ts | 7 ++++++-
src/coord/radar/RadarModel.ts | 1 +
src/data/helper/transform.ts | 2 +-
src/util/format.ts | 2 +-
7 files changed, 17 insertions(+), 8 deletions(-)
diff --git a/index.d.ts b/index.d.ts
index 20195af..1941965 100644
--- a/index.d.ts
+++ b/index.d.ts
@@ -17,4 +17,7 @@
* under the License.
*/
-export * from './types/dist/echarts';
\ No newline at end of file
+import * as echarts from './types/dist/echarts';
+// Export for UMD module.
+export as namespace echarts
+export = echarts;
\ No newline at end of file
diff --git a/src/chart/candlestick/CandlestickSeries.ts b/src/chart/candlestick/CandlestickSeries.ts
index d71cecd..e9079ca 100644
--- a/src/chart/candlestick/CandlestickSeries.ts
+++ b/src/chart/candlestick/CandlestickSeries.ts
@@ -28,17 +28,17 @@ import {
ColorString,
SeriesLabelOption,
SeriesLargeOptionMixin,
- OptionDataValueNumeric,
StatesOptionMixin,
SeriesEncodeOptionMixin,
- DefaultEmphasisFocus
+ DefaultEmphasisFocus,
+ OptionDataValue
} from '../../util/types';
import SeriesData from '../../data/SeriesData';
import Cartesian2D from '../../coord/cartesian/Cartesian2D';
import { BrushCommonSelectorsForSeries } from '../../component/brush/selector';
import { mixin } from 'zrender/src/core/util';
-type CandlestickDataValue = OptionDataValueNumeric[];
+type CandlestickDataValue = OptionDataValue[];
interface CandlestickItemStyleOption extends ItemStyleOption {
color0?: ZRColor
diff --git a/src/chart/line/LineSeries.ts b/src/chart/line/LineSeries.ts
index a836132..9114ee6 100644
--- a/src/chart/line/LineSeries.ts
+++ b/src/chart/line/LineSeries.ts
@@ -115,7 +115,7 @@ export interface LineSeriesOption extends SeriesOption<LineStateOption, ExtraSta
showSymbol?: boolean
// false | 'auto': follow the label interval strategy.
// true: show all symbols.
- showAllSymbol?: 'auto'
+ showAllSymbol?: 'auto' | boolean
data?: (LineDataValue | LineDataItemOption)[]
}
diff --git a/src/chart/lines/LinesSeries.ts b/src/chart/lines/LinesSeries.ts
index 65355e0..1e3217b 100644
--- a/src/chart/lines/LinesSeries.ts
+++ b/src/chart/lines/LinesSeries.ts
@@ -33,7 +33,8 @@ import {
LineStyleOption,
OptionDataValue,
StatesOptionMixin,
- SeriesLineLabelOption
+ SeriesLineLabelOption,
+ DimensionDefinitionLoose
} from '../../util/types';
import GlobalModel from '../../model/Global';
import type { LineDrawModelOption } from '../helper/LineDraw';
@@ -98,6 +99,10 @@ export interface LinesDataItemOption extends LinesStateOption, StatesOptionMixin
coords?: LinesCoords
value?: LinesValue
+
+ effect?: LineDrawModelOption['effect']
+
+ dimensions?: DimensionDefinitionLoose
}
export interface LinesSeriesOption extends SeriesOption<LinesStateOption>, LinesStateOption,
diff --git a/src/coord/radar/RadarModel.ts b/src/coord/radar/RadarModel.ts
index 070892f..1144ab0 100644
--- a/src/coord/radar/RadarModel.ts
+++ b/src/coord/radar/RadarModel.ts
@@ -42,6 +42,7 @@ function defaultsShow(opt: object, show: boolean) {
}
export interface RadarIndicatorOption {
+ name?: string
text?: string
min?: number
max?: number
diff --git a/src/data/helper/transform.ts b/src/data/helper/transform.ts
index 78c1a70..6e5181f 100644
--- a/src/data/helper/transform.ts
+++ b/src/data/helper/transform.ts
@@ -42,7 +42,7 @@ export type DataTransformConfig = unknown;
export interface DataTransformOption {
type: DataTransformType;
- config: DataTransformConfig;
+ config?: DataTransformConfig;
// Print the result via `console.log` when transform performed. Only work in dev mode for debug.
print?: boolean;
}
diff --git a/src/util/format.ts b/src/util/format.ts
index c495020..1f9749e 100644
--- a/src/util/format.ts
+++ b/src/util/format.ts
@@ -260,7 +260,7 @@ export function getTooltipMarker(inOpt: ColorString | GetTooltipMarkerOpt, extra
* and `module:echarts/util/number#parseDate`.
* @inner
*/
-export function formatTime(tpl: string, value: unknown, isUTC: boolean) {
+export function formatTime(tpl: string, value: unknown, isUTC?: boolean) {
if (__DEV__) {
deprecateReplaceLog('echarts.format.formatTime', 'echarts.time.format');
}
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org