Copilot commented on code in PR #21727:
URL: https://github.com/apache/echarts/pull/21727#discussion_r3772737762


##########
test/ut/spec/series/whiskerBoxCommon.test.ts:
##########
@@ -0,0 +1,105 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*   http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*/
+
+import { createChart } from '../../core/utHelper';
+
+describe('whiskerBoxCommon (candlestick/boxplot)', function () {
+
+    it('should resolve the correct base axis when series refers axis by id', 
function () {
+        const chart = createChart({width: 400, height: 300});
+
+        try {
+            const data = [
+                [0, 317.3413, 327.2178, 317.0466, 328.4467],
+                [1, 327.7224, 332.9728, 326.5084, 334.3916],
+                [2, 331.6939, 333.4524, 328.7171, 334.7013]
+            ];
+
+            chart.setOption({
+                animation: false,
+                xAxis: [
+                    { id: 'main-x', type: 'value', gridIndex: 0 },
+                    { id: 'second-x', type: 'value', gridIndex: 1 }

Review Comment:
   This setup only exercises the `getBaseAxis()` change. Because both x-axes 
are `value` axes, the test still passes if `getInitialData()` incorrectly 
resolves the first x-axis: its inferred layout and dimensions are identical. 
Please give the referred second axis a behaviorally distinct type (for example, 
`category`) and assert the resulting data dimension/layout so the axis-ID 
regression in `getInitialData()` is covered too.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to