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 2021/04/29 10:49:30 UTC

[GitHub] [echarts] zhangjianrencai opened a new issue #14843: added legendselectchanged event, the legend will auto resotre to status 'true'

zhangjianrencai opened a new issue #14843:
URL: https://github.com/apache/echarts/issues/14843


   ### Version
   5.1.1
   
   ### Steps to reproduce
   1. add the following code
   
   ```
   
   HTML: <div echarts [options]="chart" style="height:400px;width:100%" (chartInit)="onChartInit($event)"></div>
   JS:     
   
   event.on('legendscroll', function (params){
         this.scrollDataIndex = params.scrollDataIndex;
       });
   event.on('legendselectchanged', function (params) {
   chart = {
           legend: {
               type: 'scroll',
               orient: 'horizontal',
               scrollDataIndex : !!scrollDataIndex ? scrollDataIndex : 0,
               bottom: '5%',
               selectedMode: true,
           },
    
          
           series: [
               {
                   name: '面积模式',
                   type: 'pie',
                   radius: [50, 250],
                   center: ['50%', '50%'],
                   roseType: 'area',
                   itemStyle: {
                       borderRadius: 8
                   },
                   data: [
                       {value: 40, name: 'rose 1'},
                       {value: 38, name: 'rose 2'},
                       {value: 32, name: 'rose 3'},
                       {value: 30, name: 'rose 4'},
                       {value: 28, name: 'rose 5'},
                       {value: 26, name: 'rose 6'},
                       {value: 22, name: 'rose 7'},
                       {value: 18, name: 'rose 8'},
                       {value: 40, name: 'rose 11'},
                       {value: 38, name: 'rose 12sdfdsf'},
                       {value: 32, name: 'rose 13sdfds'},
                       {value: 30, name: 'rose 14'},
                       {value: 28, name: 'rose 15'},
                       {value: 26, name: 'rose 16'},
                       {value: 22, name: 'rose 17'},
                       {value: 18, name: 'rose 18'}
                   ]
               }
       ]
         };
       });
   
   ```
   
   2. scroll legend to the second page and then click one legend and set to false
   3. then click the legend again. the legend will flashed and the legend will auto set to true
   
   ### What is expected?
   the legend will not flashed and will not auto set to true
   
   ### What is actually happening?
   legend flashed and auto set to true
   
   <!-- This issue is generated by echarts-issue-helper. DO NOT REMOVE -->
   <!-- This issue is in English. DO NOT REMOVE -->


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

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] zhangjianrencai commented on issue #14843: added legendselectchanged event, the legend will auto resotre to status 'true'

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


   > Could we have the full `option`? So that we could know what the original requirement is like.
   
   The full `option` is
   ```
   
   option = {
                   legend: {
                       type: 'scroll',
                       orient: 'horizontal',
                       scrollDataIndex : !!scrollDataIndex ? scrollDataIndex : 0,
                       bottom: '5%',
                       selectedMode: true,
                   },
            
                  
                   series: [
                       {
                           name: '面积模式',
                           type: 'pie',
                           radius: [50, 250],
                           center: ['50%', '50%'],
                           roseType: 'area',
                           itemStyle: {
                               borderRadius: 8
                           },
                           data: [
                               {value: 40, name: 'rose 1'},
                               {value: 38, name: 'rose 2'},
                               {value: 32, name: 'rose 3'},
                               {value: 30, name: 'rose 4'},
                               {value: 28, name: 'rose 5'},
                               {value: 26, name: 'rose 6'},
                               {value: 22, name: 'rose 7'},
                               {value: 18, name: 'rose 8'},
                               {value: 40, name: 'rose 11'},
                               {value: 38, name: 'rose 12sdfdsf'},
                               {value: 32, name: 'rose 13sdfds'},
                               {value: 30, name: 'rose 14'},
                               {value: 28, name: 'rose 15'},
                               {value: 26, name: 'rose 16'},
                               {value: 22, name: 'rose 17'},
                               {value: 18, name: 'rose 18'}
                           ]
                       }
               ]
   }
       
   ```        
   
   The original issue is after I add `legendselectchanged` event, the issue will happen.
   I remove `legendselectchanged` event, the issue will disappear. 
   
   BTW, v4.8.0 is work well


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

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 #14843: added legendselectchanged event, the legend will auto resotre to status 'true'

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


   Hi! We've received your issue and please be patient to get responded. 🎉
   The average response time is expected to be within one day for weekdays.
   
   In the meanwhile, please make sure that it contains **a minimum reproducible demo** and necessary **images** to illustrate. Otherwise, our committers will ask you to do so.
   
   *A minimum reproducible demo* should contain as little data and components as possible but can still illustrate your problem. This is the best way for us to reproduce it and solve the problem faster.
   
   You may also check out the [API](http://echarts.apache.org/api.html) and [chart option](http://echarts.apache.org/option.html) to get the answer.
   
   If you don't get helped for a long time (over a week) or have an urgent question to ask, you may also send an email to dev@echarts.apache.org. Please attach the issue link if it's a technical question.
   
   If you are interested in the project, you may also subscribe our [mailing list](https://echarts.apache.org/en/maillist.html).
   
   Have a nice day! 🍵


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

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] 100pah commented on issue #14843: added legendselectchanged event, the legend will auto resotre to status 'true'

Posted by GitBox <gi...@apache.org>.
100pah commented on issue #14843:
URL: https://github.com/apache/echarts/issues/14843#issuecomment-830712300


   Could we have the full `option`, so that we could know what the original requirement is like.


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

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] 100pah edited a comment on issue #14843: added legendselectchanged event, the legend will auto resotre to status 'true'

Posted by GitBox <gi...@apache.org>.
100pah edited a comment on issue #14843:
URL: https://github.com/apache/echarts/issues/14843#issuecomment-830712300


   Could we have the full `option`? So that we could know what the original requirement is like.


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

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