浏览代码

堆积柱预测样式

Karsa 1 年之前
父节点
当前提交
601ac6b096
共有 1 个文件被更改,包括 5 次插入3 次删除
  1. 5 3
      src/views/chartShow/index.vue

+ 5 - 3
src/views/chartShow/index.vue

@@ -727,7 +727,7 @@ export default defineComponent({
         let name :String=language.value == 'ch'?nameCh:nameEn
 
         //预测指标配置
-        let predict_params = item.EdbInfoCategoryType === 1 ? getPredictParams(item) : {};
+        let predict_params = item.EdbInfoCategoryType === 1 ? getPredictParams(item,chartStyle) : {};
 
         let obj = {
           data: [] as any[],
@@ -738,6 +738,8 @@ export default defineComponent({
           lineWidth: (chartInfo.ChartType === 6 && item.ChartStyle === 'spline') ? Number(item.ChartWidth) : 0,
           fillColor: (chartInfo.ChartType === 3 || (chartInfo.ChartType === 6 && item.ChartStyle === 'areaspline')) ? item.ChartColor : undefined,
           zIndex: (chartInfo.ChartType === 6 && item.ChartStyle === 'spline') ? 1 : 0, //防止组合图曲线被遮住
+          borderWidth: 1,
+          borderColor: item.ChartColor,
           ...predict_params
         };
         item.DataList = item.DataList || []
@@ -1423,14 +1425,14 @@ export default defineComponent({
     }
 
      /* 预测配置 分区 */
-    const getPredictParams = ({LatestDate,PredictChartColor}: IDataProps) => {
+    const getPredictParams = ({LatestDate,PredictChartColor,ChartStyle}: IDataProps,chartStyle='') => {
       return {
         zoneAxis: 'x',
         zones: [{
           value: new Date(LatestDate).getTime()+1
         }, {
           dashStyle: 'ShortDot',
-          color: PredictChartColor
+          color:(ChartStyle==='column' || chartStyle==='column') ? 'transparent' : PredictChartColor
         }]
       }
     }