|
@@ -489,6 +489,60 @@
|
|
|
};
|
|
|
}
|
|
|
|
|
|
+ if (type === 'line_enhance') {
|
|
|
+ return {
|
|
|
+ textStyle,
|
|
|
+ legend: {
|
|
|
+ show: legend.show,
|
|
|
+ top: 10,
|
|
|
+ right: 10,
|
|
|
+ textStyle,
|
|
|
+ },
|
|
|
+ tooltip: {
|
|
|
+ trigger: 'item',
|
|
|
+ },
|
|
|
+ grid: {
|
|
|
+ left: 60,
|
|
|
+ top: 40,
|
|
|
+ right: 60,
|
|
|
+ bottom: dataZoom.length ? 70 : 30,
|
|
|
+ },
|
|
|
+ dataZoom: baseDataZoom,
|
|
|
+ xAxis: xAxis.map((e) => {
|
|
|
+ return {
|
|
|
+ ...e,
|
|
|
+ type: 'category',
|
|
|
+ axisLabel: {
|
|
|
+ width: 100,
|
|
|
+ overflow: 'break',
|
|
|
+ },
|
|
|
+ };
|
|
|
+ }),
|
|
|
+ yAxis: yAxis.map((e, i) => {
|
|
|
+ return {
|
|
|
+ ...e,
|
|
|
+ min: (value) => {
|
|
|
+ return parseInt(value.min * 0.8);
|
|
|
+ },
|
|
|
+ max: (value) => {
|
|
|
+ return parseInt(value.max * 1.2);
|
|
|
+ },
|
|
|
+ splitLine: {
|
|
|
+ lineStyle: {
|
|
|
+ opacity: i === 0 ? 0.1 : 0,
|
|
|
+ },
|
|
|
+ },
|
|
|
+ };
|
|
|
+ }),
|
|
|
+ series: baseSeries.map((serie) => {
|
|
|
+ return {
|
|
|
+ ...serie,
|
|
|
+ type: 'line',
|
|
|
+ };
|
|
|
+ }),
|
|
|
+ };
|
|
|
+ }
|
|
|
+
|
|
|
// 平滑曲线图
|
|
|
if (type === 'line_smooth') {
|
|
|
return {
|