You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@echarts.apache.org by GitBox <gi...@apache.org> on 2022/03/30 08:12:33 UTC

[GitHub] [echarts] emyly opened a new issue #16773: 柱状图点击以后,点中的柱子的shadow一直不消失直到点中下根柱子再消失应该怎么实现?

emyly opened a new issue #16773:
URL: https://github.com/apache/echarts/issues/16773


   ### What problem does this feature solve?
   
   ![image](https://user-images.githubusercontent.com/26674260/160783700-15b9114c-cbc0-490e-9640-ac129b2fba39.png)
   
   
   ### What does the proposed API look like?
   
   tooltip: {
   		trigger: "axis",
   		axisPointer: {
   			type: "shadow",
   			shadowStyle: {
   				color:’blue‘;,
   				opacity: 0.1,
   			},
   		},
   },


-- 
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] emyly commented on issue #16773: 柱状图点击以后,点中的柱子的shadow一直不消失直到点中下根柱子再消失应该怎么实现?

Posted by GitBox <gi...@apache.org>.
emyly commented on issue #16773:
URL: https://github.com/apache/echarts/issues/16773#issuecomment-1085303532


   > 
   
   @jiawulin001 我还想问下echarts柱状图,柱子太短应该怎么实现点击


-- 
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] emyly commented on issue #16773: 柱状图点击以后,点中的柱子的shadow一直不消失直到点中下根柱子再消失应该怎么实现?

Posted by GitBox <gi...@apache.org>.
emyly commented on issue #16773:
URL: https://github.com/apache/echarts/issues/16773#issuecomment-1085817369


   > @emyly 另外你最初说的那个效果可以用on添加监听'click'事件实现,这里给出一个示例,具体数据可能需要你自己调。 To achieve the effect you mentioned at the beginning, the other way is to use `on` to add event listener. Here's an example, and you might need to adjust the data by yourself.
   > 
   > Code Example
   
   好的,感谢,很好的方法


-- 
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] emyly commented on issue #16773: 柱状图点击以后,点中的柱子的shadow一直不消失直到点中下根柱子再消失应该怎么实现?

Posted by GitBox <gi...@apache.org>.
emyly commented on issue #16773:
URL: https://github.com/apache/echarts/issues/16773#issuecomment-1082767813


   > After clicking on the echarts histogram, the shadow of the column in the point does not disappear until the next column in the point disappears again. How do I do this?
   
   @[echarts-bot](https://github.com/apps/echarts-bot)


-- 
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] emyly removed a comment on issue #16773: 柱状图点击以后,点中的柱子的shadow一直不消失直到点中下根柱子再消失应该怎么实现?

Posted by GitBox <gi...@apache.org>.
emyly removed a comment on issue #16773:
URL: https://github.com/apache/echarts/issues/16773#issuecomment-1082767813


   > After clicking on the echarts histogram, the shadow of the column in the point does not disappear until the next column in the point disappears again. How do I do this?
   
   @[echarts-bot](https://github.com/apps/echarts-bot)


-- 
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] jiawulin001 commented on issue #16773: 柱状图点击以后,点中的柱子的shadow一直不消失直到点中下根柱子再消失应该怎么实现?

Posted by GitBox <gi...@apache.org>.
jiawulin001 commented on issue #16773:
URL: https://github.com/apache/echarts/issues/16773#issuecomment-1085580559


   可加入dataZoom选项来加入缩放功能,具体可参考[文档](https://echarts.apache.org/zh/option.html#dataZoom)。
   You can add `dataZoom` to enable zooming on data. Please refer to [documentation](https://echarts.apache.org/zh/option.html#dataZoom).
   <details>
   <summary>Code Example</summary>
   
   ```
   option = {
     xAxis: {
       type: 'category',
       data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
     },
     yAxis: {
       type: 'value'
     },
     dataZoom:[{
       type:'slider'
     }],
     series: [
       {
         data: [120, 100000, 150, 80, 70, 110, 130],
         type: 'bar',
         selectedMode: true,
         select:{
           label:{
             show:true
           }
         }
       }
     ]
   };
   ```
   </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] jiawulin001 commented on issue #16773: 柱状图点击以后,点中的柱子的shadow一直不消失直到点中下根柱子再消失应该怎么实现?

Posted by GitBox <gi...@apache.org>.
jiawulin001 commented on issue #16773:
URL: https://github.com/apache/echarts/issues/16773#issuecomment-1084217974


   @emyly 你好,目前提供选中图形的方法有两种,一种是`select`方法,参见[select文档](https://echarts.apache.org/zh/option.html#series-bar.select)。 第二种是用on监听'click'事件,然后监测到click之后对option进行改变,参考[鼠标事件](https://echarts.apache.org/handbook/zh/concepts/event)。
   Hi, currently there are two ways to highlight the column. The first one is to use `select`, referring to [documentation](https://echarts.apache.org/zh/option.html#series-bar.select). The second one is to use 'on' to add listener for 'click' event, and alter `option` when 'click' is dispatched, referring to [mouse event](https://echarts.apache.org/handbook/zh/concepts/event).
   
   以下提供一种select的方案,可供参考
   The following example using `select` can be referred to:
   <details>
   <summary>Code Sample</summary>
   
   ```
   option = {
     xAxis: {
       type: 'category',
       data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
     },
     yAxis: {
       type: 'value'
     },
     series: [
       {
         data: [120, {value: 200,name:'data'}, 150, 80, 70, 110, 130],
         type: 'bar',
         name: 'but',
         selectedMode: 'single',
         select: {
           itemStyle: {
             shadowBlur: 30,
             shadowColor: 'rgba(255,0,0,0.8)'
           }
         }
       }
     ],
     legend: {},
   
     tooltip: {
       trigger:'axis',
       axisPointer: {
         type: 'shadow',
         shadowStyle: {
           color: 'blue',
           opacity: 0.1
         }
       }
     }
   };
   ```
   </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] emyly removed a comment on issue #16773: 柱状图点击以后,点中的柱子的shadow一直不消失直到点中下根柱子再消失应该怎么实现?

Posted by GitBox <gi...@apache.org>.
emyly removed a comment on issue #16773:
URL: https://github.com/apache/echarts/issues/16773#issuecomment-1082766790


   > @emyly 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. 🤗
   > 
   > TRANSLATED
   After clicking on the echarts histogram, the shadow of the column in the point does not disappear until the next column in the point disappears again. How do I do this


-- 
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] emyly commented on issue #16773: 柱状图点击以后,点中的柱子的shadow一直不消失直到点中下根柱子再消失应该怎么实现?

Posted by GitBox <gi...@apache.org>.
emyly commented on issue #16773:
URL: https://github.com/apache/echarts/issues/16773#issuecomment-1085368062


   ![image](https://user-images.githubusercontent.com/26674260/161186957-742af22c-b45d-495d-b6d1-e36f08f9bf93.png)
   像这种数据很小的柱子会有点不中的情况


-- 
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] jiawulin001 commented on issue #16773: 柱状图点击以后,点中的柱子的shadow一直不消失直到点中下根柱子再消失应该怎么实现?

Posted by GitBox <gi...@apache.org>.
jiawulin001 commented on issue #16773:
URL: https://github.com/apache/echarts/issues/16773#issuecomment-1085631388


   @emyly 另外你最初说的那个效果可以用on添加监听'click'事件实现,这里给出一个示例,具体数据可能需要你自己调。
   To achieve the effect you mentioned at the beginning, the other way is to use `on` to add event listener. Here's an example, and you might need to adjust the data by yourself.
   <details>
   <summary>Code Example</summary>
   
   ```
   let backShadow =[
     [
       {
         name: 'Mon',
         x: '10%'
       },
       {
         x: '21.5%'
       }
     ],
     [
       {
         name: 'Tue',
         x: '21.5%'
       },
       {
         x: '33%'
   
       }
     ],
     [
       {
         name: 'Wed',
         x: '33%'
       },
       {
         x: '44.5%'
   
       }
     ],
     [
       {
         name: 'Thu',
         x: '44.5%'
       },
       {
         x: '55.7%'
   
       }
     ],
     [
       {
         name: 'Fri',
         x: '55.7%'
       },
       {
         x: '67.2%'
   
       }
     ],
     [
       {
         name: 'Sat',
         x: '67.2%'
       },
       {
         x: '78.7%'
   
       }
     ],
     [
       {
         name: 'Sun',
         x: '78.7%'
       },
       {
         x: '90%'
   
       }
     ],
   ];
   option = {
   xAxis: {
   type: 'category',
   data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
   },
   yAxis: {
   type: 'value'
   },
   series: [
   {
   data: [120, 200, 150, 80, 70, 110, 130],
   type: 'bar',
   markArea: {
   itemStyle: {
     color: 'rgba(0,0,255,0.1)'
   },
   
   }
   }
   ]
   };
   myChart.on('click',function(params){
     for (let i = 0; i<backShadow.length;i++){
     if (params.name == backShadow[i][0].name){
       let temp = [];
       temp.push(backShadow[i]);
     option.series[0].markArea.data = temp;
     }
     }
     myChart.setOption(option);
     });
   ```
   </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] jiawulin001 commented on issue #16773: 柱状图点击以后,点中的柱子的shadow一直不消失直到点中下根柱子再消失应该怎么实现?

Posted by GitBox <gi...@apache.org>.
jiawulin001 commented on issue #16773:
URL: https://github.com/apache/echarts/issues/16773#issuecomment-1085353650


   有没有示例或者截图让我更快了解你的情况?
   Can you provide an example or screenshot to help me better understand your issue?


-- 
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] emyly commented on issue #16773: 柱状图点击以后,点中的柱子的shadow一直不消失直到点中下根柱子再消失应该怎么实现?

Posted by GitBox <gi...@apache.org>.
emyly commented on issue #16773:
URL: https://github.com/apache/echarts/issues/16773#issuecomment-1082767224


   After clicking on the echarts histogram, the shadow of the column in the point does not disappear until the next column in the point disappears again. How do I do this?


-- 
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 #16773: 柱状图点击以后,点中的柱子的shadow一直不消失直到点中下根柱子再消失应该怎么实现?

Posted by GitBox <gi...@apache.org>.
echarts-bot[bot] commented on issue #16773:
URL: https://github.com/apache/echarts/issues/16773#issuecomment-1082764268


   @emyly 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**
   
   After the histogram is clicked, the shadow of the column in the point does not disappear until the next column in the point disappears. How to achieve it?
   </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] emyly commented on issue #16773: 柱状图点击以后,点中的柱子的shadow一直不消失直到点中下根柱子再消失应该怎么实现?

Posted by GitBox <gi...@apache.org>.
emyly commented on issue #16773:
URL: https://github.com/apache/echarts/issues/16773#issuecomment-1082766790


   > @emyly 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. 🤗
   > 
   > TRANSLATED
   After clicking on the echarts histogram, the shadow of the column in the point does not disappear until the next column in the point disappears again. How do I do this


-- 
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] emyly closed issue #16773: 柱状图点击以后,点中的柱子的shadow一直不消失直到点中下根柱子再消失应该怎么实现?

Posted by GitBox <gi...@apache.org>.
emyly closed issue #16773:
URL: https://github.com/apache/echarts/issues/16773


   


-- 
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