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 2020/07/31 04:04:51 UTC

[GitHub] [incubator-echarts] ChenJiaH opened a new issue #13058: Legend中的字体大小设置失效

ChenJiaH opened a new issue #13058:
URL: https://github.com/apache/incubator-echarts/issues/13058


   ### Version
   4.8.0
   
   ### Steps to reproduce
   1. 打开示例链接: https://echarts.apache.org/examples/zh/editor.html?c=line-stack
   2. 修改 option 如下
   
   ```javascript
   option = {
             legend: {
               show: true,
               left: 0,
               top: 0,
               icon: 'circle',
               padding: 0,
               itemGap: 30,
               itemWidth: 6,
               textStyle: {
                 lineHeight: 20,
                 fontSize: 20
               },
               borderWidth: 0,
               inactiveColor: 'rgba(0,0,0,0.25)'
             },
             grid: {
               containLabel: true,
               left: 0,
               top: 48,
               right: 0,
               bottom: 8,
             },
             textStyle: {
               fontFamily: 'inherit',
               fontSize: 12,
               color: 'rgba(0,0,0,0.45)'
             },
             yAxis: {
               type: 'value',
               splitNumber : 4,
               axisLine: {
                 show: false
               },
               axisLabel: {
                 color: 'rgba(0,0,0,0.45)',
                 align: 'right',
                 margin: 8
               },
               axisTick: {
                 show: false
               },
               splitLine: {
                 lineStyle: {
                   color: 'rgba(0,0,0,0.06)'
                 }
               }
             },
             xAxis: {
               data: ['5月25日', '5月26日', '5月27日', '5月28日', '5月29日', '5月30日', '5月31日'],
               axisLabel: {
                 color: 'rgba(0,0,0,0.45)',
                 align: 'center',
               },
               axisTick: {
                 length: 2,
                 alignWithLabel: true,
                 lineStyle: {
                   color: 'rgba(0,0,0,0.06)'
                 }
               },
               axisLine: {     // x 轴
                 onZero: false,
                 lineStyle: {
                   color: 'transparent'
                 }
               },
               axisPointer: {
                 label: {
                   show: false
                 }
               }
             },
             series: [{
               smooth: true,
               type: 'line',
               showSymbol: false,
               symbolSize: 2,
               name: "活动花费",
               data: [1500.9,14200.9,24000.9,13500.9,5267.9,17200.9, 6400.9]
             }, {
               smooth: true,
               type: 'line',
               showSymbol: false,
               symbolSize: 2,
               name: "其它花费",
               data: [500.9,4200.9,4000.9,3500.9,15267.9,7200.9, 16400.9]
             }]
           };
   ```
   
   ### What is expected?
   legend 的 fontSize 应被设为 20
   
   ### What is actually happening?
   legend 的 fontSize 为 12
   
   ---
   如果全局设置了textStyle,Legend中的字体大小设置将失效。
   
   <!-- This issue is generated by echarts-issue-helper. 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] [incubator-echarts] plainheart commented on issue #13058: Legend中的字体大小设置失效

Posted by GitBox <gi...@apache.org>.
plainheart commented on issue #13058:
URL: https://github.com/apache/incubator-echarts/issues/13058#issuecomment-666921009


   应该是个bug。似乎是全局的 `textStyle` 影响了 `legend` 的 `textStyle`,暂时可以先去掉全局的 `textStyle` 配置来规避这个问题。


----------------------------------------------------------------
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] [incubator-echarts] ChenJiaH commented on issue #13058: Legend中的字体大小设置失效

Posted by GitBox <gi...@apache.org>.
ChenJiaH commented on issue #13058:
URL: https://github.com/apache/incubator-echarts/issues/13058#issuecomment-667540947


   > 应该是个bug。似乎是全局的 `textStyle` 影响了 `legend` 的 `textStyle`,暂时可以先去掉全局的 `textStyle` 配置来规避这个问题。
   
   嗯,还发现了一个全局影响的问题。等忙完这几天我提个pr处理下~


----------------------------------------------------------------
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] [incubator-echarts] ChenJiaH commented on issue #13058: Legend中的字体大小设置失效

Posted by GitBox <gi...@apache.org>.
ChenJiaH commented on issue #13058:
URL: https://github.com/apache/incubator-echarts/issues/13058#issuecomment-667823068


   `canvas` 中 `fontFamily` 不可设置为 `inherit`


----------------------------------------------------------------
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] [incubator-echarts] ChenJiaH closed issue #13058: Legend中的字体大小设置失效

Posted by GitBox <gi...@apache.org>.
ChenJiaH closed issue #13058:
URL: https://github.com/apache/incubator-echarts/issues/13058


   


----------------------------------------------------------------
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] [incubator-echarts] echarts-bot[bot] commented on issue #13058: Legend中的字体大小设置失效

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


   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 **you have posted enough image to demo your request**. 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 questions.
   
   If you are interested in the project, you may also subscribe our [mail 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