You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@echarts.apache.org by "LBJDJW (via GitHub)" <gi...@apache.org> on 2023/06/30 10:22:02 UTC

[GitHub] [echarts] LBJDJW opened a new issue, #18833: 各位大佬们,echarts中 ,当我修改横纵坐标标题的时候(拖拽功能),我修改了dom中transform,但是点击事情的点击区域没有更新, 点击区域如何实时更新啊,有大佬遇到过嘛?[Bug]

LBJDJW opened a new issue, #18833:
URL: https://github.com/apache/echarts/issues/18833

   ### Version
   
   5.0
   
   ### Link to Minimal Reproduction
   
   none
   
   ### Steps to Reproduce
   
   ![image](https://github.com/apache/echarts/assets/26969731/0c3e7d22-d601-4f86-b4a5-c92a01892955)
   
   
   ### Current Behavior
   
   	if (clickType === 'font') {
   			myChart.on('click', params => {
   				var event = params.event; // 获取事件对象
   				var target = event.target; // 获取点击的目标元素
   				var x = event.clientX; // 获取点击事件在页面上的横坐标
   				var y = event.clientY; // 获取点击事件在页面上的纵坐标
   
   				console.log('点击区域:', target);
   				console.log(x, y, 7777);
   				onClick(params);
   			});
   		}
   
   ### Expected Behavior
   
   	if (clickType === 'font') {
   			myChart.on('click', params => {
   				var event = params.event; // 获取事件对象
   				var target = event.target; // 获取点击的目标元素
   				var x = event.clientX; // 获取点击事件在页面上的横坐标
   				var y = event.clientY; // 获取点击事件在页面上的纵坐标
   
   				console.log('点击区域:', target);
   				console.log(x, y, 7777);
   				onClick(params);
   			});
   		}
   
   ### Environment
   
   ```markdown
   - OS:
   - Browser:
   - Framework:
   ```
   
   
   ### Any additional comments?
   
   _No response_


-- 
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: commits-unsubscribe@echarts.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org


[GitHub] [echarts] echarts-bot[bot] commented on issue #18833: [Bug] 各位大佬们,echarts中 ,当我修改横纵坐标标题的时候(拖拽功能),我修改了dom中transform,但是点击事情的点击区域没有更新, 点击区域如何实时更新啊,有大佬遇到过嘛?

Posted by "echarts-bot[bot] (via GitHub)" <gi...@apache.org>.
echarts-bot[bot] commented on issue #18833:
URL: https://github.com/apache/echarts/issues/18833#issuecomment-1614452771

   @LBJDJW It seems you are not using English, I've helped translate the content automatically. To make your issue understood by more people and get helped, we'd like to suggest using English next time. 🤗
   <details><summary><b>TRANSLATED</b></summary><br>
   
   **TITLE**
   
   [Bug] Guys, in echarts, when I modify the horizontal and vertical coordinate title (drag function), I modified the transform in the dom, but the click area of ​​the click thing is not updated. How to update the click area in real time? Have you met the boss?
   
   **BODY**
   
   ### Version
   
   5.0
   
   ### Link to Minimal Reproduction
   
   none
   
   ### Steps to Reproduce
   
   ![image](https://github.com/apache/echarts/assets/26969731/0c3e7d22-d601-4f86-b4a5-c92a01892955)
   
   
   ### Current Behavior
   
   if (clickType === 'font') {
   myChart.on('click', params => {
   var event = params.event; // get the event object
   var target = event.target; // get the clicked target element
   var x = event.clientX; // Get the abscissa of the click event on the page
   var y = event.clientY; // Get the vertical coordinate of the click event on the page
   
   console.log('Click area:', target);
   console. log(x, y, 7777);
   onClick(params);
   });
   }
   
   ### Expected Behavior
   
   if (clickType === 'font') {
   myChart.on('click', params => {
   var event = params.event; // get the event object
   var target = event.target; // get the clicked target element
   var x = event.clientX; // Get the abscissa of the click event on the page
   var y = event.clientY; // Get the vertical coordinate of the click event on the page
   
   console.log('Click area:', target);
   console. log(x, y, 7777);
   onClick(params);
   });
   }
   
   ### Environment
   
   ```markdown
   - OS:
   -Browser:
   - Framework:
   ```
   
   
   ### Any additional comments?
   
   _No response_
   </details>


-- 
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: commits-unsubscribe@echarts.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org


[GitHub] [echarts] echarts-bot[bot] commented on issue #18833: [Bug] 各位大佬们,echarts中 ,当我修改横纵坐标标题的时候(拖拽功能),我修改了dom中transform,但是点击事情的点击区域没有更新, 点击区域如何实时更新啊,有大佬遇到过嘛?

Posted by "echarts-bot[bot] (via GitHub)" <gi...@apache.org>.
echarts-bot[bot] commented on issue #18833:
URL: https://github.com/apache/echarts/issues/18833#issuecomment-1615585395

   @LBJDJW Please provide a demo for the issue either with [Official Editor](https://echarts.apache.org/examples/editor.html), [CodePen](https://codepen.io/Ovilia/pen/dyYWXWM), [CodeSandbox](https://codesandbox.io/s/echarts-basic-example-template-mpfz1s) or [JSFiddle](https://jsfiddle.net/plainheart/e46ozpqj/7/).


-- 
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: commits-unsubscribe@echarts.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org