echarts折线图最后一个拐点显示问题

折线图的最后一个点只有在鼠标一上去才显示。怎么才能默认就能显示原点和数据呢?
图片描述

setOption({
            //标题
            title: {
              text: 'Job执行次数效能',
              left: '30',
              textStyle: {
                fontSize: 18,
                fontWeight: 500
              },
              subtext:'Job副标题',
              subtextStyle:{
                fontSize:14,
                color:'#666'
              }
            },
            tooltip: {

              enterable: true,
              trigger: 'axis',
              axisPointer: {
                type: 'cross',
                label: {
                  backgroundColor: '#6a7985'
                }
              },
              formatter: function (params, ticket, callback) {//数据格式

                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>' + "错误 : " + errorValue + "<br/>";
                return relVal;
              }
            },
            legend: {
              data: ['执行总次数'],
              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次数',
                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: '执行总次数',
                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]
阅读 11k
1 个回答

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

撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进