Skip to content

Commit

Permalink
fix(sankey): rm comment code & import type explicity
Browse files Browse the repository at this point in the history
  • Loading branch information
linghaoSu committed Jul 1, 2023
1 parent a373c6c commit f22ee7e
Showing 1 changed file with 2 additions and 26 deletions.
28 changes: 2 additions & 26 deletions src/chart/sankey/SankeyView.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
import * as graphic from '../../util/graphic';
import { enterEmphasis, leaveEmphasis, toggleHoverEmphasis, setStatesStylesFromModel } from '../../util/states';
import { LayoutOrient, ECElement } from '../../util/types';
import { PathProps, PathStyleProps } from 'zrender/src/graphic/Path';
import type { PathProps, PathStyleProps } from 'zrender/src/graphic/Path';
import SankeySeriesModel, { SankeyEdgeItemOption, SankeyNodeItemOption } from './SankeySeries';
import ChartView from '../../view/Chart';
import GlobalModel from '../../model/Global';
Expand All @@ -30,7 +30,7 @@ import { RectLike } from 'zrender/src/core/BoundingRect';
import { setLabelStyle, getLabelStatesModels } from '../../label/labelStyle';
import { getECData } from '../../util/innerStore';
import { isString, retrieve3 } from 'zrender/src/core/util';
import { GraphEdge } from '../../data/Graph';
import type { GraphEdge } from '../../data/Graph';

class SankeyPathShape {
x1 = 0;
Expand Down Expand Up @@ -197,30 +197,6 @@ class SankeyView extends ChartView {
curve.useStyle(lineStyleModel.getItemStyle());
// Special color, use source node color or target node color
applyCurveStyle(curve.style, orient, edge);
// switch (curve.style.fill) {
// case 'source':
// curve.style.fill = edge.node1.getVisual('color');
// curve.style.decal = edge.node1.getVisual('style').decal;
// break;
// case 'target':
// curve.style.fill = edge.node2.getVisual('color');
// curve.style.decal = edge.node2.getVisual('style').decal;
// break;
// case 'gradient':
// const sourceColor = edge.node1.getVisual('color');
// const targetColor = edge.node2.getVisual('color');
// if (isString(sourceColor) && isString(targetColor)) {
// curve.style.fill = new graphic.LinearGradient(
// 0, 0, +(orient === 'horizontal'), +(orient === 'vertical'), [{
// color: sourceColor,
// offset: 0
// }, {
// color: targetColor,
// offset: 1
// }]
// );
// }
// }


const defaultEdgeLabelText = `${edgeModel.get('value')}`;
Expand Down

0 comments on commit f22ee7e

Please sign in to comment.