Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:
- name: Collect changed files
run: |
mkdir ~/tmp/
git diff ${{ github.event.pull_request.base.sha }} ${{ github.sha }} --name-only --relative '*src/**/*.ts' > ~/tmp/changed_files
git diff ${{ github.event.pull_request.base.sha }} ${{ github.sha }} --diff-filter=ACM --name-only --relative '*src/**/*.ts' > ~/tmp/changed_files
echo -e "Changed files: \n$(cat ~/tmp/changed_files)"

- name: Lint
Expand Down
2 changes: 1 addition & 1 deletion .huskyrc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"hooks": {
"pre-commit": "npm run lint && npm run checktype",
"pre-commit": "npm run lint && npm run checktype"
}
}
4 changes: 2 additions & 2 deletions src/chart/bar/BaseBarSeries.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,11 +92,11 @@ class BaseBarSeriesModel<Opts extends BaseBarSeriesOption<unknown> = BaseBarSeri
const pt = coordSys.dataToPoint(coordSys.clampData(value));
if (startingAtTick) {
each(coordSys.getAxes(), function (axis: Axis2D, idx: number) {
//If axis type is category, use tick coords instead
// If axis type is category, use tick coords instead
if (axis.type === 'category') {
const tickCoords = axis.getTicksCoords();
let tickIdx = coordSys.clampData(value)[idx];
//The index of rightmost tick of markArea is 1 larger than x1/y1 index
// The index of rightmost tick of markArea is 1 larger than x1/y1 index
if (dims && (dims[idx] === 'x1' || dims[idx] === 'y1')) {
tickIdx += 1;
}
Expand Down
26 changes: 0 additions & 26 deletions src/chart/boxplot/boxplotVisual.ts

This file was deleted.

4 changes: 1 addition & 3 deletions src/chart/boxplot/install.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,12 @@
import { EChartsExtensionInstallRegisters } from '../../extension';
import BoxplotSeriesModel from './BoxplotSeries';
import BoxplotView from './BoxplotView';
import boxplotVisual from './boxplotVisual';
import boxplotLayout from './boxplotLayout';
import { boxplotTransform } from './boxplotTransform';

export function install(registers: EChartsExtensionInstallRegisters) {
registers.registerSeriesModel(BoxplotSeriesModel);
registers.registerChartView(BoxplotView);
registers.registerVisual(boxplotVisual);
registers.registerLayout(boxplotLayout);
registers.registerTransform(boxplotTransform);
}
}
3 changes: 1 addition & 2 deletions src/chart/graph/GraphView.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
* under the License.
*/

import * as zrUtil from 'zrender/src/core/util';
import SymbolDraw, { ListForSymbolDraw } from '../helper/SymbolDraw';
import LineDraw from '../helper/LineDraw';
import RoamController, { RoamControllerHost } from '../../component/helper/RoamController';
Expand Down Expand Up @@ -307,4 +306,4 @@ class GraphView extends ChartView {
}
}

export default GraphView;
export default GraphView;
4 changes: 2 additions & 2 deletions src/chart/line/helper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,11 @@ export function prepareDataCoordInfo(

let stacked = false;
const stackResultDim = data.getCalculationInfo('stackResultDimension');
if (isDimensionStacked(data, dims[0] /*, dims[1]*/)) { // jshint ignore:line
if (isDimensionStacked(data, dims[0] /* , dims[1] */)) { // jshint ignore:line
stacked = true;
dims[0] = stackResultDim;
}
if (isDimensionStacked(data, dims[1] /*, dims[0]*/)) { // jshint ignore:line
if (isDimensionStacked(data, dims[1] /* , dims[0] */)) { // jshint ignore:line
stacked = true;
dims[1] = stackResultDim;
}
Expand Down
2 changes: 1 addition & 1 deletion src/chart/map/MapSeries.ts
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ class MapSeries extends SeriesModel<MapSeriesOption> {
// for geoJSON source: 0.75.
aspectScale: null,

///// Layout with center and size
// Layout with center and size
// If you wan't to put map in a fixed size box with right aspect ratio
// This two properties may more conveninet
// layoutCenter: [50%, 50%]
Expand Down
2 changes: 1 addition & 1 deletion src/chart/sankey/sankeyLayout.ts
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ function computeNodeBreadths(
const remainEdges = [];
// Storage each node's indegree.
const indegreeArr = [];
//Used to storage the node with indegree is equal to 0.
// Used to storage the node with indegree is equal to 0.
let zeroIndegrees: GraphNode[] = [];
let nextTargetNode: GraphNode[] = [];
let x = 0;
Expand Down
3 changes: 1 addition & 2 deletions src/chart/sunburst/sunburstLayout.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,8 @@ import { parsePercent } from '../../util/number';
import * as zrUtil from 'zrender/src/core/util';
import GlobalModel from '../../model/Global';
import ExtensionAPI from '../../core/ExtensionAPI';
import SunburstSeriesModel, { SunburstSeriesNodeItemOption, SunburstSeriesOption } from './SunburstSeries';
import SunburstSeriesModel, { SunburstSeriesOption } from './SunburstSeries';
import { TreeNode } from '../../data/Tree';
import SeriesModel from '../../model/Series';

// let PI2 = Math.PI * 2;
const RADIAN = Math.PI / 180;
Expand Down
2 changes: 1 addition & 1 deletion src/chart/tree/TreeSeries.ts
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ class TreeSeriesModel extends SeriesModel<TreeSeriesOption> {
*/
getInitialData(option: TreeSeriesOption): SeriesData {

//create an virtual root
// create a virtual root
const root: TreeSeriesNodeItemOption = {
name: option.name,
children: option.data
Expand Down
4 changes: 2 additions & 2 deletions src/chart/treemap/TreemapSeries.ts
Original file line number Diff line number Diff line change
Expand Up @@ -265,14 +265,14 @@ class TreemapSeriesModel extends SeriesModel<TreemapSeriesOption> {
// bottom
emptyItemWidth: 25, // Width of empty node.
itemStyle: {
color: 'rgba(0,0,0,0.7)', //'#5793f3',
color: 'rgba(0,0,0,0.7)', // '#5793f3',
textStyle: {
color: '#fff'
}
},
emphasis: {
itemStyle: {
color: 'rgba(0,0,0,0.9)' //'#5793f3',
color: 'rgba(0,0,0,0.9)' // '#5793f3',
}
}
},
Expand Down
2 changes: 1 addition & 1 deletion src/component/dataZoom/DataZoomModel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ class DataZoomModel<Opts extends DataZoomOption = DataZoomOption> extends Compon
mergeOption(newOption: Opts): void {
const inputRawOption = retrieveRawOption(newOption);

//FIX #2591
// FIX #2591
merge(this.option, newOption, true);
merge(this.settledOption, inputRawOption, true);

Expand Down
2 changes: 1 addition & 1 deletion src/component/legend/LegendView.ts
Original file line number Diff line number Diff line change
Expand Up @@ -510,7 +510,7 @@ class LegendView extends ComponentView {
contentPos[orientIdx] += selectorRect[wh] + selectorButtonGap;
}

//Always align selector to content as 'middle'
// Always align selector to content as 'middle'
selectorPos[1 - orientIdx] += contentRect[hw] / 2 - selectorRect[hw] / 2;
selectorGroup.x = selectorPos[0];
selectorGroup.y = selectorPos[1];
Expand Down
14 changes: 7 additions & 7 deletions src/component/marker/MarkAreaView.ts
Original file line number Diff line number Diff line change
Expand Up @@ -133,11 +133,11 @@ function markAreaFilter(coordSys: CoordinateSystem, item: MarkAreaMergedItemOpti
) {
return true;
}
//Directly returning true may also do the work,
//because markArea will not be shown automatically
//when it's not included in coordinate system.
//But filtering ahead can avoid keeping rendering markArea
//when there are too many of them.
// Directly returning true may also do the work,
// because markArea will not be shown automatically
// when it's not included in coordinate system.
// But filtering ahead can avoid keeping rendering markArea
// when there are too many of them.
return markerHelper.zoneFilter(coordSys, item0, item1);
}
return markerHelper.dataFilter(coordSys, item0)
Expand All @@ -164,8 +164,8 @@ function getSingleMarkerEndPoint(
else {
// Chart like bar may have there own marker positioning logic
if (seriesModel.getMarkerPosition) {
//Consider the case that user input the right-bottom point first
//Pick the larger x and y as 'x1' and 'y1'
// Consider the case that user input the right-bottom point first
// Pick the larger x and y as 'x1' and 'y1'
const pointValue0 = data.getValues(['x0', 'y0'], idx);
const pointValue1 = data.getValues(['x1', 'y1'], idx);
const clampPointValue0 = coordSys.clampData(pointValue0);
Expand Down
2 changes: 1 addition & 1 deletion src/component/marker/MarkLineModel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ class MarkLineModel extends MarkerModel<MarkLineOption> {
symbol: ['circle', 'arrow'],
symbolSize: [8, 16],

//symbolRotate: 0,
// symbolRotate: 0,
symbolOffset: 0,

precision: 2,
Expand Down
4 changes: 2 additions & 2 deletions src/component/marker/MarkPointModel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,8 @@ class MarkPointModel extends MarkerModel<MarkPointOption> {
z: 5,
symbol: 'pin',
symbolSize: 50,
//symbolRotate: 0,
//symbolOffset: [0, 0]
// symbolRotate: 0,
// symbolOffset: [0, 0]
tooltip: {
trigger: 'item'
},
Expand Down
2 changes: 1 addition & 1 deletion src/component/marker/markerHelper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ function markerTypeCalculatorWithExtent(
): [ParsedValue[], ParsedValue] {
const coordArr: ParsedValue[] = [];

const stacked = isDimensionStacked(data, targetDataDim /*, otherDataDim*/);
const stacked = isDimensionStacked(data, targetDataDim /* , otherDataDim */);
const calcDataDim = stacked
? data.getCalculationInfo('stackResultDimension')
: targetDataDim;
Expand Down
4 changes: 2 additions & 2 deletions src/coord/cartesian/Grid.ts
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,7 @@ class Grid implements CoordinateSystemMaster {
y: 0
};

/// Create axis
// Create axis
ecModel.eachComponent('xAxis', createAxisCreator('x'), this);
ecModel.eachComponent('yAxis', createAxisCreator('y'), this);

Expand All @@ -382,7 +382,7 @@ class Grid implements CoordinateSystemMaster {

this._axesMap = axesMap;

/// Create cartesian2d
// Create cartesian2d
each(axesMap.x, (xAxis, xAxisIndex) => {
each(axesMap.y, (yAxis, yAxisIndex) => {
const key = 'x' + xAxisIndex + 'y' + yAxisIndex;
Expand Down
4 changes: 2 additions & 2 deletions src/coord/geo/GeoModel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ export interface GeoCommonOptionMixin extends RoamOptionMixin {
// This parameter is used for scale this aspect
aspectScale?: number;

///// Layout with center and size
// Layout with center and size
// If you wan't to put map in a fixed size box with right aspect ratio
// This two properties may more conveninet
// Like: `40` or `'50%'`.
Expand Down Expand Up @@ -156,7 +156,7 @@ class GeoModel extends ComponentModel<GeoOption> {
// for geoJSON source: 0.75.
aspectScale: null,

///// Layout with center and size
// /// Layout with center and size
// If you wan't to put map in a fixed size box with right aspect ratio
// This two properties may more conveninet
// layoutCenter: [50%, 50%]
Expand Down
2 changes: 1 addition & 1 deletion src/coord/geo/GeoSVGResource.ts
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ export class GeoSVGResource implements GeoResource {
* So we maintain graphic elements in this module, and enables `view` to use/return these
* graphics from/to the pool with it's uid.
*/
useGraphic(hostKey: string /*, nameMap: NameMap */): GeoSVGGraphicRecord {
useGraphic(hostKey: string /* , nameMap: NameMap */): GeoSVGGraphicRecord {
const usedRootMap = this._usedGraphicMap;

let svgGraphic = usedRootMap.get(hostKey);
Expand Down
2 changes: 1 addition & 1 deletion src/coord/geo/fix/textCoord.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ const coordsOffsetMap = {
'广东': [0, -10],
'香港': [10, 5],
'澳门': [-10, 10],
//'北京': [-10, 0],
// '北京': [-10, 0],
'天津': [5, 5]
} as Dictionary<number[]>;

Expand Down