Skip to content

Commit

Permalink
refact(data): compatibility with exists echarts-gl code.
Browse files Browse the repository at this point in the history
pissang committed Jul 27, 2021
1 parent 40e9590 commit ae9226e
Showing 3 changed files with 26 additions and 2 deletions.
22 changes: 22 additions & 0 deletions src/data/helper/linkList.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/

// TODO: this module is only for compatibility with echarts-gl
import linkSeriesData from './linkSeriesData';
export default linkSeriesData;
2 changes: 1 addition & 1 deletion src/echarts.ts
Original file line number Diff line number Diff line change
@@ -27,7 +27,7 @@ import {install as DatasetComponent} from './component/dataset/install';
// Default to have canvas renderer and dataset for compitatble reason.
use([CanvasRenderer, DatasetComponent]);

// Compatitable with the following code
// TODO: Compatitable with the following code
// import echarts from 'echarts/lib/echarts'
export default {
init() {
4 changes: 3 additions & 1 deletion src/export/api.ts
Original file line number Diff line number Diff line change
@@ -24,6 +24,7 @@ import ComponentView, { ComponentViewConstructor } from '../view/Component';
import SeriesModel, { SeriesModelConstructor } from '../model/Series';
import ChartView, { ChartViewConstructor } from '../view/Chart';

import SeriesData from '../data/SeriesData';

// Provide utilities API in echarts. It will be in echarts namespace.
// Like echarts.util, echarts.graphic
@@ -53,7 +54,8 @@ export * as util from './api/util';
export {default as env} from 'zrender/src/core/env';

//////////////// Export for Exension Usage ////////////////
export {default as SeriesData} from '../data/SeriesData';
// export {SeriesData};
export {SeriesData as List}; // TODO: Compatitable with exists echarts-gl code
export {default as Model} from '../model/Model';
export {default as Axis} from '../coord/Axis';

0 comments on commit ae9226e

Please sign in to comment.