提交 750d604d 编写于 作者: 1 100pah

ts: dataset change to ts.

上级 fbdb003f
......@@ -17,8 +17,6 @@
* under the License.
*/
// @ts-nocheck
/**
* This module is imported by echarts directly.
*
......@@ -31,36 +29,41 @@
import ComponentModel from '../model/Component';
import ComponentView from '../view/Component';
import {detectSourceFormat} from '../data/helper/sourceHelper';
import { SERIES_LAYOUT_BY_COLUMN } from '../util/types';
ComponentModel.extend({
import {
SERIES_LAYOUT_BY_COLUMN, ComponentOption, SeriesEncodeOptionMixin, OptionSourceData, SeriesLayoutBy
} from '../util/types';
type: 'dataset',
/**
* @protected
*/
defaultOption: {
interface DatasetOption extends
Pick<ComponentOption, 'type' | 'id' | 'name'>,
Pick<SeriesEncodeOptionMixin, 'dimensions'> {
seriesLayoutBy?: SeriesLayoutBy;
// null/undefined/'auto': auto detect header, see "src/data/helper/sourceHelper".
sourceHeader?: boolean | 'auto';
data?: OptionSourceData;
}
// 'row', 'column'
seriesLayoutBy: SERIES_LAYOUT_BY_COLUMN,
class DatasetModel extends ComponentModel {
// null/'auto': auto detect header, see "module:echarts/data/helper/sourceHelper"
sourceHeader: null,
type = 'dataset';
static type = 'dataset';
dimensions: null,
static defaultOption: DatasetOption = {
seriesLayoutBy: SERIES_LAYOUT_BY_COLUMN
};
source: null
},
optionUpdated: function () {
optionUpdated() {
detectSourceFormat(this);
}
}
ComponentModel.registerClass(DatasetModel);
});
ComponentView.extend({
class DatasetView extends ComponentView {
static type = 'dataset';
type = 'dataset';
}
type: 'dataset'
ComponentView.registerClass(DatasetView);
});
......@@ -1128,6 +1128,6 @@ export interface SeriesSamplingOptionMixin {
export interface SeriesEncodeOptionMixin {
datasetIndex?: number;
seriesLayoutBy?: SeriesLayoutBy;
dimentions?: DimensionName[];
dimensions?: DimensionName[];
encode?: OptionEncode
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册