for a certain data statistical chart, you can choose a time range of 24 hours, 7 days or 30 days.
you can see from the chart that there is no problem with the 24-hour and 7-day charts, but at 30 days, because the x-axis coordinate type is "category", part of it will be automatically hidden, resulting in the date of the last day is not displayed on the coordinate axis. Now the need is to add a date at the end.
option = {
tooltip : {
trigger: "axis",
textStyle:{
align:"left"
}
},
smooth:true,
color:self.colorData,
legend: {
data: self.legendData,
type:"scroll",
},
grid:{
...
},
toolbox: {
...
},
calculable : true,
xAxis : [
{
type : "category",
boundaryGap : false,
data : self.xAxisData
}
],
yAxis : [
{
type : "value",
minInterval : 1,
boundaryGap : [ 0, 0.1 ],
}
],
series : self.seriesData
};
The data obtained by xAxis is xAxisData [], where there are several data sources, each with data [] and name attributes, and data [] has corresponding ordinate statistics count:number and Abscissa time fieldValue:str.
how do you modify the code if you want to add xAxisdata [index] .data [29] .fieldValue to the 30-day chart as the last Abscissa annotation?