Browse Source

优化fix

cxmo 6 months ago
parent
commit
f3fe1136b1
1 changed files with 1 additions and 2 deletions
  1. 1 2
      src/hooks/chart/useChartRender.ts

+ 1 - 2
src/hooks/chart/useChartRender.ts

@@ -13,9 +13,8 @@ import router from '@/router'
 
 //获取RGBA的透明度
 const parseRgbaColor = (color='rgba(51, 51, 51, 1)') => {
-    if(color.includes('#')) return 1
     const arr = color.match(/(\d(\.\d+)?)+/g) || ['','','',1];
-    return parseFloat(arr[3]+''||'1')
+    return parseFloat((arr[3]||1)+'')
 }
 // 散点x
 const scatterXAxis = {