SaltyfishLeavesyoung opened a new issue #10166: 关于华为手机微信小程序上字体显示问题
URL: https://github.com/apache/incubator-echarts/issues/10166
 
 
   ### Version
   4.2.1
   
   ### Steps to reproduce
   首先在小程序页面的js文件中用以下方法初始化图表:
   
   let chart = null;
   
   function initChart(canvas, width, height) {
     chart = echarts.init(canvas, null, {
       width: width,
       height: height
     });
     canvas.setChart(chart);
   
     var option = {
       color: ['#37a2da'],
       tooltip: {
         trigger: 'axis',
         axisPointer: {
           type: 'shadow'
         },
         confine: true
       },
       grid: {
         left: 130,
         right: 20,
         bottom: 30,
         top: 40,
         containLabel: false
       },
       xAxis: [
         {
           type: 'value',
           axisLine: {
             lineStyle: {
               color: '#999'
             }
           },
           axisLabel: {
             color: '#666'
           }
         }
       ],
       yAxis: [
         {
           type: 'category',
           axisTick: { show: false },
           data: [],
           axisLine: {
             lineStyle: {
               color: '#999'
             }
           },
           axisLabel: {
             color: '#666'
           }
         }
       ],
       series: [
         {
           name: '机构指数',
           type: 'bar',
           label: {
             normal: {
               show: true,
               position: 'inside'
             }
           },
           data: [],
           itemStyle: {
   
           }
         }
       ]
     };
   
     chart.setOption(option);
     return chart;
   }
   
   再根据用户输入用以下函数设置数据:(data为后端返回的json)
   
   setValue: function (data){
       var that = this
       this.selectComponent('#mychart-dom-bar')['chart'].setOption(
         {
           yAxis: [
             {
               data: that.json2list(data, 'orgname', true),
               textStyle: {
                 fontSize: 16
               }
             }
           ],
           series: [
             {
               data: that.json2list(data, 'orgnum', true),
             }
           ]
         }
       )
       return this.selectComponent('#mychart-dom-bar')
     }
   
   ### What is expected?
   在setValue函数中设置yAxis的fontSize时,在真机(华为手机)上预览时纵轴字体大小会随fontSize变化而变化
   
   ### What is actually happening?
   无论怎么设置fontSize,真机上的纵轴字体大小均是默认大小(但是,在点击图表时,文字可能会突然变成原来大小一段时间再变回去)
   
   <!-- 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:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to