|
@@ -843,6 +843,8 @@ function setSeasonOpt(e){
|
|
|
data.DataList
|
|
|
// 跟颜色对应
|
|
|
chartTheme && (chartTheme.lineOptionList=chartTheme.lineOptionList.reverse().slice(-chartDataHandle.length))
|
|
|
+
|
|
|
+ let maxDateRange=0
|
|
|
// if(calendarType==='公历'){
|
|
|
//常规左轴
|
|
|
chartDataHandle.forEach((item,index)=>{
|
|
@@ -871,6 +873,11 @@ function setSeasonOpt(e){
|
|
|
...predict_params
|
|
|
}
|
|
|
item.DataList=item.DataList||[]
|
|
|
+
|
|
|
+ let dateRange = item.DataList[item.DataList.length-1].DataTimestamp - item.DataList[0].DataTimestamp
|
|
|
+ // 时间范围
|
|
|
+ maxDateRange=Math.max(maxDateRange,dateRange)
|
|
|
+
|
|
|
for(let i of item.DataList){
|
|
|
seriesItem.data.push([i.DataTimestamp, i.Value])
|
|
|
}
|
|
@@ -1083,7 +1090,7 @@ function setSeasonOpt(e){
|
|
|
...chartTheme&&chartTheme.xAxisOptions.style
|
|
|
}
|
|
|
},
|
|
|
- tickInterval:screen.value === 'phone'?24*3600*1000*60:undefined,//季节图
|
|
|
+ tickInterval:screen.value === 'phone'?maxDateRange/6:undefined,//季节图
|
|
|
plotBands: setAxisPlotAreas(3,'datetime'),
|
|
|
plotLines: setAxisPlotLines(3,'datetime')
|
|
|
}
|