@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.
- package/dist/orbcharts-plugins-basic.es.js +5882 -5805
- package/dist/orbcharts-plugins-basic.umd.js +6 -6
- package/dist/src/base/BaseLegend.d.ts +15 -0
- package/dist/src/base/types.d.ts +3 -0
- package/dist/src/grid/defaults.d.ts +3 -2
- package/dist/src/grid/index.d.ts +1 -0
- package/dist/src/grid/plugins/GridLegend.d.ts +1 -0
- package/dist/src/grid/plugins/GroupAxis.d.ts +2 -2
- package/dist/src/grid/types.d.ts +4 -1
- package/dist/src/series/plugins/SeriesLegend.d.ts +1 -3
- package/dist/src/series/types.d.ts +4 -8
- package/package.json +2 -2
- package/src/base/BaseLegend.ts +543 -0
- package/src/base/types.ts +3 -0
- package/src/grid/defaults.ts +19 -4
- package/src/grid/index.ts +1 -0
- package/src/grid/plugins/GridLegend.ts +40 -0
- package/src/grid/plugins/GroupAxis.ts +5 -5
- package/src/grid/types.ts +3 -1
- package/src/series/defaults.ts +7 -2
- package/src/series/plugins/Bubbles.ts +3 -3
- package/src/series/plugins/SeriesLegend.ts +9 -426
- package/src/series/types.ts +4 -11
- package/src/utils/orbchartsUtils.ts +13 -6
@@ -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
|
-
|
22
|
-
|
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
|
46
|
-
?
|
47
|
-
: fullChartParams.colors[fullChartParams.colorScheme]
|
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) {
|