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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -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) {