Sfoglia il codice sorgente

fix:ETA2.4.2修改平滑及悬浮框

ldong 2 mesi fa
parent
commit
7f0f14493f
1 ha cambiato i file con 13 aggiunte e 4 eliminazioni
  1. 13 4
      src/hooks/chart/render.js

+ 13 - 4
src/hooks/chart/render.js

@@ -1402,7 +1402,7 @@ function setStackOrCombinChart(e){
             dataGrouping:{
                 enabled:false
             },
-            type: chartStyle || item.ChartStyle,
+            type: e.ChartInfo.ChartType !== 3?(chartStyle || item.ChartStyle):ExtraConfig.IsHeap==1?'area':((chartTheme && chartTheme.lineOptionList[lineIndex].lineType) || item.ChartStyle),
             yAxis:serie_yIndex,
             name:temName,
             nameZh:temName,
@@ -1565,9 +1565,18 @@ function setStackOrCombinChart(e){
     //面积图百分比tooltip
     if(e.ChartInfo.ChartType===3&&ExtraConfig.HeapWay == 2) {
         options.tooltip = {
-            pointFormat: '<span>{series.name}</span>' +
-            ': <b>{point.percentage:.1f}%</b> ({point.y:,.1f})<br/>',
-            split: true
+            split: false,
+            shared: true,
+            dateTimeLabelFormats: {
+                // 时间格式化字符
+                day: '%Y/%m/%d',
+                week: "%Y/%m",
+                month: '%Y/%m',
+                year: '%Y/%m',
+            },
+            xDateFormat:'%Y/%m/%d',
+            className:'chart-tooltips-box',
+            pointFormat: '<span style=\"color:{point.color}\">●</span><span>{series.name}</span>' +':<b>{point.percentage:.1f}%</b> ({point.y:,.1f})<br/>'
         }
     }