@orbcharts/plugins-basic 3.0.0-alpha.26 → 3.0.0-alpha.28

Sign up to get free protection for your applications and to get access to all the features.
@@ -17,9 +17,14 @@ export function getColor (colorType: ColorType, fullChartParams: ChartParams) {
17
17
  return colors.series[0]
18
18
  }
19
19
  // 對應colorType設定的顏色
20
- return colors[colorType] != null
21
- ? colors[colorType]
22
- : colors.primary
20
+ // return colors[colorType] != null
21
+ // ? colors[colorType]
22
+ // : colors.primary
23
+ return colorType == 'none'
24
+ ? 'none'
25
+ : colors[colorType] != undefined
26
+ ? colors[colorType]
27
+ : colors.primary // 如果比對不到
23
28
  }
24
29
 
25
30
  // 取得Series顏色
@@ -42,9 +47,11 @@ export function getDatumColor ({ datum, colorType, fullChartParams }: { datum: C
42
47
  }
43
48
  }
44
49
  // 對應colorType設定的顏色
45
- return fullChartParams.colors[fullChartParams.colorScheme][colorType] != null
46
- ? fullChartParams.colors[fullChartParams.colorScheme][colorType]
47
- : fullChartParams.colors[fullChartParams.colorScheme].primary
50
+ return colorType == 'none'
51
+ ? 'none'
52
+ : fullChartParams.colors[fullChartParams.colorScheme][colorType] != undefined
53
+ ? fullChartParams.colors[fullChartParams.colorScheme][colorType]
54
+ : fullChartParams.colors[fullChartParams.colorScheme].primary
48
55
  }
49
56
 
50
57
  export function getClassName (pluginName: string, elementName: string, modifier?: string) {