yingchy1996 opened a new issue #12442: canvas渲染在页面上
URL: https://github.com/apache/incubator-echarts/issues/12442
 
 
   我本地可以渲染echarts 但CI CD跑过之后没法显示echarts 页面上canvas也没渲染出来 找了半天也没找到原因 才来这提问 
是用angular开发的 module也引入了
   `<div class="content-bottom-echarts" style="width: 100%; height: 400px;" 
echarts [options]="chartOption">
   
         </div>`
   `private _initEcharts(): void {
       const mockList = {
         xData: ['1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月', '9月', '10月', 
'11月', '12月'],
         yData: [11, 24, 8, 44, 18, 22, 66, 55, 11, 5, 68, 33, 22, 55, 88, 77]
       };
       setTimeout(() => {
         this.chartOption = {
           xAxis: {
             type: 'category',
             data: mockList.xData
           },
           yAxis: {
             type: 'value',
             splitLine: {
               show: true,
               lineStyle: {
                 type: 'dashed'
               }
             }
           },
           series: [{
             data: mockList.yData,
             type: 'line',
             lineStyle: {
               color: '#009FFF',
             },
             itemStyle: {
               opacity: 0,
             },
           }]
         };
         console.log(this.chartOption)
       }, 100);
       this.chartOption2 =  {
         tooltip: {
             trigger: 'item',
             formatter: '{a} <br/>{b}: {c} ({d}%)'
         },
         legend: {
             orient: 'vertical',
             left: 10,
             data: ['直接访问', '邮件营销', '联盟广告', '视频广告', '搜索引擎']
         },
         series: [
             {
                 name: '访问来源',
                 type: 'pie',
                 radius: ['50%', '70%'],
                 avoidLabelOverlap: false,
                 label: {
                     show: false,
                     position: 'center'
                 },
                 emphasis: {
                     label: {
                         show: true,
                         fontSize: '30',
                         fontWeight: 'bold'
                     }
                 },
                 labelLine: {
                     show: false
                 },
                 data: [
                     {value: 335, name: '直接访问'},
                     {value: 310, name: '邮件营销'},
                     {value: 234, name: '联盟广告'},
                     {value: 135, name: '视频广告'},
                     {value: 1548, name: '搜索引擎'}
                 ]
             }
         ]
     };
     }`

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