鍍金池/ 問答/HTML/ echarts折線圖最后一個(gè)拐點(diǎn)顯示問題

echarts折線圖最后一個(gè)拐點(diǎn)顯示問題

折線圖的最后一個(gè)點(diǎn)只有在鼠標(biāo)一上去才顯示。怎么才能默認(rèn)就能顯示原點(diǎn)和數(shù)據(jù)呢?
圖片描述

setOption({
            //標(biāo)題
            title: {
              text: 'Job執(zhí)行次數(shù)效能',
              left: '30',
              textStyle: {
                fontSize: 18,
                fontWeight: 500
              },
              subtext:'Job副標(biāo)題',
              subtextStyle:{
                fontSize:14,
                color:'#666'
              }
            },
            tooltip: {

              enterable: true,
              trigger: 'axis',
              axisPointer: {
                type: 'cross',
                label: {
                  backgroundColor: '#6a7985'
                }
              },
              formatter: function (params, ticket, callback) {//數(shù)據(jù)格式

                let dataIndex = params[0].dataIndex;

                let normalValue,
                  errorValue;
                errorValue = _this.countResultStatusData.monthBuildErrorNums[dataIndex];
                normalValue = _this.countResultStatusData.monthBuildSuccNums[dataIndex];

                let relVal = params[0].name + "<br/>";

                relVal += '<span style="display:inline-block;margin-right:5px;border-radius:10px;width:9px;height:9px;background-color:#31c263"></span>' + "正常 : " + normalValue + "<br/>";
                relVal +=  '<span style="display:inline-block;margin-right:5px;border-radius:10px;width:9px;height:9px;background-color:#f77448"></span>' + "錯(cuò)誤 : " + errorValue + "<br/>";
                return relVal;
              }
            },
            legend: {
              data: ['執(zhí)行總次數(shù)'],
              right:20
            },
            toolbox: {},
            grid: {
              left: '6%',
              right: '10%',
              bottom: '10%',
              containLabel: true
            },
            xAxis: [
              {
                alignWithLabel:true,
                type: 'category',
                boundaryGap: false,
                data: _this.countResultStatusData.months,
                name: '年/月',
                nameTextStyle:{
                  color:'#333',
                },

              }
            ],
            yAxis: [
              {
                type: 'value',
                name: 'Job次數(shù)',
                nameLocation:'center',
                nameTextStyle:{
                  color:'#888',
                  padding: [10, 40]
                },
                minInterval:1,
                maxInterval:10
              },
              {
                type: 'value',
                nameLocation:'center',
                nameTextStyle:{
                  color:'#888',
                  padding: [10, 40]
                },
                minInterval:1,
                maxInterval:10
              }
            ],
            series: [
              {
                name: '執(zhí)行總次數(shù)',
                type: 'line',
                showAllSymbol: true,
                stack: '總量',
                label: {
                  normal: {
                    show: true,
                    position: 'top',
                  }
                },
                symbolSize: 10,
                itemStyle:{
                  borderWidth:2
                },
                areaStyle: {
                  normal: {
                    color: {
                      type: 'linear',
                      x: 0,
                      y: 0,
                      x2: 0,
                      y2: 1,
                      colorStops: [{
                        offset: 0, color: '#ffba9b' // 0% 處的顏色
                      }, {
                        offset: 1, color: '#ffffff' // 100% 處的顏色
                      }],
                      globalCoord: false // 缺省為 false
                    }
                  }
                },
                data: _this.countResultStatusData.monthBuildNums
              }
            ]
          })`
          
          ![圖片描述][2]
回答
編輯回答
誮惜顏

是版本的原因,我把版本降到3.幾就可以了

2017年1月2日 11:47