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/04/29 05:43:23 UTC

[GitHub] [echarts] zhuang010203 opened a new issue, #16964: [Bug] geo,dispatchAction—highlight

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

   ### Version
   
   5.2.2
   
   ### Link to Minimal Reproduction
   
   https://echarts.apache.org/examples/zh/editor.html?c=geo-organ
   
   ### Steps to Reproduce
   
   $.get(
     ROOT_PATH + '/data/asset/geo/Veins_Medical_Diagram_clip_art.svg',
     function (svg) {
       echarts.registerMap('organ_diagram', { svg: svg });
       option = {
         tooltip: {},
         geo: {
           left: 10,
           right: '50%',
           map: 'organ_diagram',
           selectedMode: 'multiple',
           emphasis: {
             focus: 'self',
             itemStyle: {
               color: null
             },
             label: {
               position: 'bottom',
               distance: 0,
               textBorderColor: '#fff',
               textBorderWidth: 2
             }
           },
           blur: {},
           select: {
             itemStyle: {
               color: '#b50205'
             },
             label: {
               show: false,
               textBorderColor: '#fff',
               textBorderWidth: 2
             }
           }
         },
         grid: {
           left: '60%',
           top: '20%',
           bottom: '20%'
         },
         xAxis: {},
         yAxis: {
           data: [
             'heart',
             'large-intestine',
             'small-intestine',
             'spleen',
             'kidney',
             'lung',
             'liver'
           ]
         },
         series: [
           {
             type: 'bar',
             emphasis: {
               focus: 'self'
             },
             data: [121, 321, 141, 52, 198, 289, 139]
           }
         ]
       };
       myChart.setOption(option);
       myChart.on('mouseover', { seriesIndex: 0 }, function (event) {
         myChart.dispatchAction({
           type: 'highlight',
           geoIndex: 0,
           name: event.name
         });
       });
       myChart.on('mouseout', { seriesIndex: 0 }, function (event) {
         myChart.dispatchAction({
           type: 'downplay',
           geoIndex: 0,
           name: event.name
         });
       });
       myChart.dispatchAction({
         type: 'highlight',
         geoIndex:0,
         name:['lung','liver'], //OK
         // Use no name to unselect.
       });
     }
   );
   
   ### Current Behavior
   
   // 如果要高亮 geo 组件(从 `v5.1.0` 开始支持):
   dispatchAction({
       type: 'highlight',
   
       // 用 index 或 id 或 name 来指定 geo 组件。
       // 可以用数组指定多个 geo 组件。
       geoIndex?: number | number[],
       geoId?: string | string[],
       geoName?: string | string[],
   
       // geo 组件中 region 名称。
       **// 可以是一个数组指定多个名称。
       name?: string | string[],**
   });
   
   ### Expected Behavior
   
   myChart.dispatchAction({
         type: 'highlight',
         geoIndex:0,
         **name:['lung','liver'], //Here, I pass in name: ['lung '] is OK, and the function of passing in name: ['lung','lever '] is invalid**
         // Use no name to unselect.
       });
   
   ### Environment
   
   ```markdown
   - OS:window11
   - Browser:97.0.4692.99 (正式版本) (64 位) (cohort: Stable)
   - Framework:echarts.apache.org
   ```
   
   
   ### 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] zhuang010203 commented on issue #16964: [Bug] geo,dispatchAction—highlight

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

   @jiawulin001 name 传递string[]就会导致功能失效


-- 
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] zhuang010203 commented on issue #16964: [Bug] geo,dispatchAction—highlight

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

   myChart.dispatchAction({
   type: 'highlight',
   geoIndex:0,
   **name:['lung','liver'], **
   // 不使用名称取消选择。
   });
   Passing parameters has no effect


-- 
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] zhuang010203 commented on issue #16964: [Bug] geo,dispatchAction—highlight

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

   @jiawulin001 help


-- 
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] zhuang010203 commented on issue #16964: [Bug] geo,dispatchAction—highlight

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

   @jiawulin001 help


-- 
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] zhuang010203 closed issue #16964: [Bug] geo,dispatchAction—highlight

Posted by GitBox <gi...@apache.org>.
zhuang010203 closed issue #16964: [Bug] geo,dispatchAction—highlight
URL: https://github.com/apache/echarts/issues/16964


-- 
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] zhuang010203 commented on issue #16964: [Bug] geo,dispatchAction—highlight

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

   @bantic @kant @leeight @BrianGilbert  SOS


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


Re: [I] [Bug] geo,dispatchAction—highlight [echarts]

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

   This issue has been automatically marked as stale because it did not have recent activity. It will be closed in 7 days if no further activity occurs. If you wish not to mark it as stale, please leave a comment in this 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