This is an automated email from the ASF dual-hosted git repository.
shenyi pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-echarts.git
The following commit(s) were added to refs/heads/master by this push:
new 19f8465 fix(Markpoint): markPoint position with stack line/bar. Close
#11535
new f2d8e77 Merge pull request #11965 from yikuangli/fix-11535
19f8465 is described below
commit 19f84658ff730831ef8fda4bddd621ad9428e4df
Author: Yiqian Li <[email protected]>
AuthorDate: Thu Jan 2 00:51:55 2020 -0500
fix(Markpoint): markPoint position with stack line/bar. Close #11535
---
src/component/marker/markerHelper.js | 15 +++++++++------
1 file changed, 9 insertions(+), 6 deletions(-)
diff --git a/src/component/marker/markerHelper.js
b/src/component/marker/markerHelper.js
index 6e9caff..01f67ed 100644
--- a/src/component/marker/markerHelper.js
+++ b/src/component/marker/markerHelper.js
@@ -69,8 +69,8 @@ function markerTypeCalculatorWithExtent(
var dataIndex = data.indicesOfNearest(calcDataDim, value)[0];
coordArr[otherCoordIndex] = data.get(otherDataDim, dataIndex);
- coordArr[targetCoordIndex] = data.get(targetDataDim, dataIndex);
-
+ coordArr[targetCoordIndex] = data.get(calcDataDim, dataIndex);
+ var coordArrValue = data.get(targetDataDim, dataIndex);
// Make it simple, do not visit all stacked value to count precision.
var precision = numberUtil.getPrecision(data.get(targetDataDim,
dataIndex));
precision = Math.min(precision, 20);
@@ -78,7 +78,7 @@ function markerTypeCalculatorWithExtent(
coordArr[targetCoordIndex] =
+coordArr[targetCoordIndex].toFixed(precision);
}
- return coordArr;
+ return [coordArr,coordArrValue];
}
var curry = zrUtil.curry;
@@ -141,12 +141,15 @@ export function dataTransform(seriesModel, item) {
var otherCoordIndex = indexOf(dims, axisInfo.baseAxis.dim);
var targetCoordIndex = indexOf(dims, axisInfo.valueAxis.dim);
- item.coord = markerTypeCalculator[item.type](
+ var coordInfo = markerTypeCalculator[item.type](
data, axisInfo.baseDataDim, axisInfo.valueDataDim,
otherCoordIndex, targetCoordIndex
);
- // Force to use the value of calculated value.
- item.value = item.coord[targetCoordIndex];
+ item.coord = coordInfo[0]
+ // Force to use the value of calculated value.
+ // let item use the value without stack.
+ item.value = coordInfo[1]
+
}
else {
// FIXME Only has one of xAxis and yAxis.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]