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/11/10 05:12:47 UTC

[GitHub] [echarts] Dradows opened a new issue #16041: legend. inactiveBorderColor and legend. inactiveBorderWidth not work

Dradows opened a new issue #16041:
URL: https://github.com/apache/echarts/issues/16041


   ### Version
   5.2.1
   
   ### Steps to reproduce
   legend. inactiveBorderColor and legend. inactiveBorderWidth not work
   
   ### What is expected?
   legend has border after being clicked
   
   ### What is actually happening?
   nothing happend. In contrast, legend.inactiveColor works well, so there should be no problem with my configuration.
   
   <!-- 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.

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 #16041: legend. inactiveBorderColor and legend. inactiveBorderWidth not work

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


   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](https://echarts.apache.org/api.html) and [chart option](https://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 to our [mailing list](https://echarts.apache.org/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.

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] Dradows commented on issue #16041: legend. inactiveBorderColor and legend. inactiveBorderWidth not work

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


   ```
   import * as echarts from 'echarts';
   
   var chartDom = document.getElementById('main');
   var myChart = echarts.init(chartDom);
   var option;
   
   var data = [];
   var dataCount = 10;
   var startTime = +new Date();
   var categories = ['categoryA', 'categoryB', 'categoryC'];
   var types = [
     { name: 'JS Heap', color: '#7b9ce1' },
     { name: 'Documents', color: '#bd6d6c' },
     { name: 'Nodes', color: '#75d874' },
     { name: 'Listeners', color: '#e0bc78' },
     { name: 'GPU Memory', color: '#dc77dc' },
     { name: 'GPU', color: '#72b362' }
   ];
   // Generate mock data
   categories.forEach(function (category, index) {
     var baseTime = startTime;
     for (var i = 0; i < dataCount; i++) {
       var typeItem = types[Math.round(Math.random() * (types.length - 1))];
       var duration = Math.round(Math.random() * 10000);
       data.push({
         name: typeItem.name,
         value: [index, baseTime, (baseTime += duration), duration],
         itemStyle: {
           normal: {
             color: typeItem.color
           }
         }
       });
       baseTime += Math.round(Math.random() * 2000);
     }
   });
   function renderItem(params, api) {
     var categoryIndex = api.value(0);
     var start = api.coord([api.value(1), categoryIndex]);
     var end = api.coord([api.value(2), categoryIndex]);
     var height = api.size([0, 1])[1] * 0.6;
     var rectShape = echarts.graphic.clipRectByRect(
       {
         x: start[0],
         y: start[1] - height / 2,
         width: end[0] - start[0],
         height: height
       },
       {
         x: params.coordSys.x,
         y: params.coordSys.y,
         width: params.coordSys.width,
         height: params.coordSys.height
       }
     );
     return (
       rectShape && {
         type: 'rect',
         transition: ['shape'],
         shape: rectShape,
         style: api.style()
       }
     );
   }
   option = {
     tooltip: {
       formatter: function (params) {
         return params.marker + params.name + ': ' + params.value[3] + ' ms';
       }
     },
     legend: {
       show: true,
       inactiveColor: '#222',
       inactiveBorderColor: '#555',
       inactiveBorderWidth: 3
     },
     dataZoom: [
       {
         type: 'slider',
         filterMode: 'weakFilter',
         showDataShadow: false,
         top: 400,
         labelFormatter: ''
       },
       {
         type: 'inside',
         filterMode: 'weakFilter'
       }
     ],
     grid: {
       height: 300
     },
     xAxis: {
       min: startTime,
       scale: true,
       axisLabel: {
         formatter: function (val) {
           return Math.max(0, val - startTime) + ' ms';
         }
       }
     },
     yAxis: {
       data: categories
     },
     series: [
       {
         type: 'custom',
         name: 'custom',
         renderItem: renderItem,
         itemStyle: {
           opacity: 0.8
         },
         encode: {
           x: [1, 2],
           y: 0
         },
         data: data
       }
     ]
   };
   
   option && myChart.setOption(option);
   ```


-- 
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] whj768702 commented on issue #16041: legend. inactiveBorderColor and legend. inactiveBorderWidth not work

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


   I have tried this approach a few times and it will work. I suspect that there may be a problem with the judgment logic.
   `legend: {
       show: true,
       inactiveColor: '#222',
       inactiveBorderColor: '#555',
       inactiveBorderWidth: 3,
      itemStyle: {
        borderWidth: 3
      }
     },`


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