This is an automated email from the ASF dual-hosted git repository. ovilia pushed a commit to branch feat/k in repository https://gitbox.apache.org/repos/asf/echarts.git
commit 9766e2f4c1e964fbc108b0f1370c4e6f547d89f1 Author: Ovilia <[email protected]> AuthorDate: Tue Jul 16 19:07:37 2024 +0800 test(marker): relative to coordinate --- src/component/marker/MarkPointView.ts | 1 - src/component/marker/markerHelper.ts | 3 ++- src/coord/polar/Polar.ts | 1 - test/markPoint-stock.html | 25 ++++++++++++++++++++----- 4 files changed, 22 insertions(+), 8 deletions(-) diff --git a/src/component/marker/MarkPointView.ts b/src/component/marker/MarkPointView.ts index 054c0a5d9..0f8de138b 100644 --- a/src/component/marker/MarkPointView.ts +++ b/src/component/marker/MarkPointView.ts @@ -44,7 +44,6 @@ function updateMarkerLayout( const apiWidth = api.getWidth(); const apiHeight = api.getHeight(); const coordRect = coordSys.getArea && coordSys.getArea(); - console.log(coordSys) mpData.each(function (idx: number) { const itemModel = mpData.getItemModel<MarkPointDataItemOption>(idx); const relativeTo = itemModel.get('relativeTo'); diff --git a/src/component/marker/markerHelper.ts b/src/component/marker/markerHelper.ts index 61acfd4d6..fdc6aedf0 100644 --- a/src/component/marker/markerHelper.ts +++ b/src/component/marker/markerHelper.ts @@ -144,8 +144,9 @@ export function dataTransform( } } // x y is provided - if ((item.coord == null || !isArray(dims)) && item.relativeTo === 'screen') { + if (item.coord == null || !isArray(dims)) { item.coord = []; + item.value = numCalculate(data, data.mapDimension(dims[1]), item.type); } else { // Each coord support max, min, average diff --git a/src/coord/polar/Polar.ts b/src/coord/polar/Polar.ts index 9ff3fb0e4..c70e1e81c 100644 --- a/src/coord/polar/Polar.ts +++ b/src/coord/polar/Polar.ts @@ -25,7 +25,6 @@ import GlobalModel from '../../model/Global'; import { ParsedModelFinder, ParsedModelFinderKnown } from '../../util/model'; import { ScaleDataValue } from '../../util/types'; import ExtensionAPI from '../../core/ExtensionAPI'; -import { BoundingRect } from 'zrender'; export const polarDimensions = ['radius', 'angle']; diff --git a/test/markPoint-stock.html b/test/markPoint-stock.html index e91d9344f..e831e3f6a 100644 --- a/test/markPoint-stock.html +++ b/test/markPoint-stock.html @@ -79,7 +79,7 @@ under the License. }, yAxis: { axisLabel: { - show: false, + // show: false, }, min: 'dataMin', max: 'dataMax' @@ -91,15 +91,30 @@ under the License. markPoint: { data: [{ type: 'min', - // x: 0, - // y: 0, - // relativeTo: 'coordinate' + x: 0, + y: 0, + relativeTo: 'coordinate' }, { type: 'max', x: 0, y: '100%', + relativeTo: 'coordinate' + }, { + type: 'min', + x: '100%', + y: 0, + name: 'abcd', + relativeTo: 'coordinate' + }, { + type: 'max', + // x: '100%', + // y: '100%', // relativeTo: 'coordinate' - }] + }], + // label: { + // show: true, + // formatter: 'x: {c}' + // } } } }; --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
