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 2020/07/31 10:29:51 UTC
[incubator-echarts] branch next updated: fix(bar): fix bar not
update in polar
This is an automated email from the ASF dual-hosted git repository.
shenyi pushed a commit to branch next
in repository https://gitbox.apache.org/repos/asf/incubator-echarts.git
The following commit(s) were added to refs/heads/next by this push:
new 6f07dc4 fix(bar): fix bar not update in polar
6f07dc4 is described below
commit 6f07dc483c11b79ac2e02369556b465dd066b091
Author: pissang <bm...@gmail.com>
AuthorDate: Fri Jul 31 18:29:29 2020 +0800
fix(bar): fix bar not update in polar
---
src/chart/bar/BarView.ts | 4 +---
src/scale/Time.ts | 54 ++++++++++++++++++++++++------------------------
2 files changed, 28 insertions(+), 30 deletions(-)
diff --git a/src/chart/bar/BarView.ts b/src/chart/bar/BarView.ts
index 0150d48..7ab21c8 100644
--- a/src/chart/bar/BarView.ts
+++ b/src/chart/bar/BarView.ts
@@ -57,8 +57,6 @@ import type Model from '../../model/Model';
import { isCoordinateSystemType } from '../../coord/CoordinateSystem';
import { getDefaultLabel } from '../helper/labelHelper';
import OrdinalScale from '../../scale/Ordinal';
-import AngleAxis from '../../coord/polar/AngleAxis';
-import RadiusAxis from '../../coord/polar/RadiusAxis';
import SeriesModel from '../../model/Series';
import {AngleAxisModel, RadiusAxisModel} from '../../coord/polar/AxisModel';
import CartesianAxisModel from '../../coord/cartesian/AxisModel';
@@ -359,7 +357,7 @@ class BarView extends ChartView {
);
animator && (lastAnimator = animator);
}
- else if (coord.type === 'cartesian2d') {
+ else {
updateProps(el, {shape: layout}, seriesModel, newIndex, null);
}
diff --git a/src/scale/Time.ts b/src/scale/Time.ts
index 4cc0896..3080b67 100644
--- a/src/scale/Time.ts
+++ b/src/scale/Time.ts
@@ -334,33 +334,33 @@ function isUnitValueSame(
// millisecond: millisecondsGetterName(true)
// };
-function moveTick(date: Date, unitName: TimeUnit, step: number, isUTC?: boolean) {
- step = step || 1;
- switch (getPrimaryTimeUnit(unitName)) {
- case 'year':
- date[fullYearSetterName(isUTC)](date[fullYearGetterName(isUTC)]() + step);
- break;
- case 'month':
- date[monthSetterName(isUTC)](date[monthGetterName(isUTC)]() + step);
- break;
- case 'day':
- date[dateSetterName(isUTC)](date[dateGetterName(isUTC)]() + step);
- break;
- case 'hour':
- date[hoursSetterName(isUTC)](date[hoursGetterName(isUTC)]() + step);
- break;
- case 'minute':
- date[minutesSetterName(isUTC)](date[minutesGetterName(isUTC)]() + step);
- break;
- case 'second':
- date[secondsSetterName(isUTC)](date[secondsGetterName(isUTC)]() + step);
- break;
- case 'millisecond':
- date[millisecondsSetterName(isUTC)](date[millisecondsGetterName(isUTC)]() + step);
- break;
- }
- return date.getTime();
-}
+// function moveTick(date: Date, unitName: TimeUnit, step: number, isUTC?: boolean) {
+// step = step || 1;
+// switch (getPrimaryTimeUnit(unitName)) {
+// case 'year':
+// date[fullYearSetterName(isUTC)](date[fullYearGetterName(isUTC)]() + step);
+// break;
+// case 'month':
+// date[monthSetterName(isUTC)](date[monthGetterName(isUTC)]() + step);
+// break;
+// case 'day':
+// date[dateSetterName(isUTC)](date[dateGetterName(isUTC)]() + step);
+// break;
+// case 'hour':
+// date[hoursSetterName(isUTC)](date[hoursGetterName(isUTC)]() + step);
+// break;
+// case 'minute':
+// date[minutesSetterName(isUTC)](date[minutesGetterName(isUTC)]() + step);
+// break;
+// case 'second':
+// date[secondsSetterName(isUTC)](date[secondsGetterName(isUTC)]() + step);
+// break;
+// case 'millisecond':
+// date[millisecondsSetterName(isUTC)](date[millisecondsGetterName(isUTC)]() + step);
+// break;
+// }
+// return date.getTime();
+// }
// const DATE_INTERVALS = [[8, 7.5], [4, 3.5], [2, 1.5]];
// const MONTH_INTERVALS = [[6, 5.5], [3, 2.5], [2, 1.5]];
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org