|
|
@@ -88,8 +88,23 @@ Component({
|
|
|
})
|
|
|
},
|
|
|
initChart(data) {
|
|
|
+ console.log(123)
|
|
|
let dividend = wx.getStorageSync('languagecode') == 'ZH' ? 10000 : 1000;
|
|
|
let option = {
|
|
|
+ tooltip: {
|
|
|
+ trigger: 'axis',
|
|
|
+ confine: true, // Ensure tooltip stays within the chart area
|
|
|
+ formatter: function (params) {
|
|
|
+ let tooltipText = '';
|
|
|
+ params.forEach((item, index) => {
|
|
|
+ tooltipText += `${index==0?item.axisValue+'\n':''}${item.marker}${item.seriesName}: ${item.value}\n`;
|
|
|
+ });
|
|
|
+ return tooltipText;
|
|
|
+ },
|
|
|
+ textStyle: {
|
|
|
+ fontSize: 10,
|
|
|
+ }
|
|
|
+ },
|
|
|
xAxis: {
|
|
|
max: 'dataMax'
|
|
|
},
|
|
|
@@ -114,6 +129,13 @@ Component({
|
|
|
legend: {
|
|
|
show: true
|
|
|
},
|
|
|
+ grid: {
|
|
|
+ top: '10%',
|
|
|
+ left: '3%',
|
|
|
+ right: '4%',
|
|
|
+ bottom: '3%',
|
|
|
+ containLabel: true
|
|
|
+ },
|
|
|
animationDuration: 0,
|
|
|
animationDurationUpdate: 3000,
|
|
|
animationEasing: 'linear',
|