@orbcharts/plugins-basic 3.0.0-alpha.39 → 3.0.0-alpha.41

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.
Files changed (56) hide show
  1. package/dist/orbcharts-plugins-basic.es.js +7449 -7078
  2. package/dist/orbcharts-plugins-basic.umd.js +12 -9
  3. package/dist/src/base/BaseBarStack.d.ts +1 -1
  4. package/dist/src/base/BaseBars.d.ts +1 -1
  5. package/dist/src/base/BaseBarsTriangle.d.ts +1 -1
  6. package/dist/src/base/BaseDots.d.ts +1 -1
  7. package/dist/src/base/BaseLegend.d.ts +1 -0
  8. package/dist/src/base/BaseLineAreas.d.ts +30 -0
  9. package/dist/src/base/BaseLines.d.ts +1 -1
  10. package/dist/src/grid/defaults.d.ts +2 -1
  11. package/dist/src/grid/gridObservables.d.ts +2 -2
  12. package/dist/src/grid/index.d.ts +1 -0
  13. package/dist/src/grid/plugins/LineAreas.d.ts +1 -0
  14. package/dist/src/grid/types.d.ts +5 -0
  15. package/dist/src/multiGrid/types.d.ts +1 -0
  16. package/dist/src/series/types.d.ts +1 -0
  17. package/dist/src/tree/types.d.ts +1 -0
  18. package/dist/src/utils/orbchartsUtils.d.ts +7 -2
  19. package/package.json +2 -2
  20. package/src/base/BaseBarStack.ts +7 -3
  21. package/src/base/BaseBars.ts +7 -3
  22. package/src/base/BaseBarsTriangle.ts +52 -135
  23. package/src/base/BaseDots.ts +7 -3
  24. package/src/base/BaseLegend.ts +16 -1
  25. package/src/base/BaseLineAreas.ts +625 -0
  26. package/src/base/BaseLines.ts +12 -12
  27. package/src/base/BaseValueAxis.ts +0 -1
  28. package/src/grid/defaults.ts +7 -0
  29. package/src/grid/gridObservables.ts +5 -5
  30. package/src/grid/index.ts +1 -0
  31. package/src/grid/plugins/BarStack.ts +1 -1
  32. package/src/grid/plugins/Bars.ts +1 -1
  33. package/src/grid/plugins/BarsDiverging.ts +1 -1
  34. package/src/grid/plugins/BarsTriangle.ts +1 -1
  35. package/src/grid/plugins/Dots.ts +1 -1
  36. package/src/grid/plugins/GroupAux.ts +8 -0
  37. package/src/grid/plugins/LineAreas.ts +37 -0
  38. package/src/grid/plugins/Lines.ts +1 -1
  39. package/src/grid/plugins/ScalingArea.ts +11 -7
  40. package/src/grid/types.ts +6 -1
  41. package/src/multiGrid/defaults.ts +2 -1
  42. package/src/multiGrid/multiGridObservables.ts +6 -6
  43. package/src/multiGrid/plugins/MultiBarStack.ts +1 -1
  44. package/src/multiGrid/plugins/MultiBars.ts +1 -1
  45. package/src/multiGrid/plugins/MultiBarsTriangle.ts +1 -1
  46. package/src/multiGrid/plugins/MultiDots.ts +1 -1
  47. package/src/multiGrid/plugins/MultiLines.ts +1 -1
  48. package/src/multiGrid/types.ts +1 -0
  49. package/src/noneData/defaults.ts +21 -7
  50. package/src/series/defaults.ts +1 -0
  51. package/src/series/types.ts +1 -0
  52. package/src/tree/defaults.ts +1 -0
  53. package/src/tree/plugins/TreeMap.ts +6 -4
  54. package/src/tree/types.ts +1 -0
  55. package/src/utils/orbchartsUtils.ts +22 -8
  56. package/tsconfig.json +1 -1
package/src/tree/types.ts CHANGED
@@ -18,5 +18,6 @@ export interface TreeLegendParams {
18
18
  listRectWidth: number
19
19
  listRectHeight: number
20
20
  listRectRadius: number
21
+ textColorType: ColorType
21
22
  }
22
23
 
@@ -1,4 +1,10 @@
1
- import type { AxisPosition, ColorType, ChartParams, ComputedDatumBase, ComputedDatumSeriesValue } from '@orbcharts/core'
1
+ import type {
2
+ AxisPosition,
3
+ ColorType,
4
+ ChartParams,
5
+ ComputedDatumBase,
6
+ ComputedDatumSeriesValue,
7
+ ComputedDatumCategoryValue } from '@orbcharts/core'
2
8
  import { getMinAndMax } from './commonUtils'
3
9
 
4
10
  // 取得最小及最大值 - datum格式陣列資料
@@ -27,15 +33,23 @@ export function getColor (colorType: ColorType, fullChartParams: ChartParams) {
27
33
  : colors.primary // 如果比對不到
28
34
  }
29
35
 
30
- // 取得Series顏色
31
- export function getSeriesColor (seriesIndex: number, fullChartParams: ChartParams) {
32
- const colorIndex = seriesIndex < fullChartParams.colors[fullChartParams.colorScheme].series.length
33
- ? seriesIndex
34
- : seriesIndex % fullChartParams.colors[fullChartParams.colorScheme].series.length
35
- return fullChartParams.colors[fullChartParams.colorScheme].series[colorIndex]
36
+ export function getSeriesValueColor () {
37
+
36
38
  }
37
39
 
38
- // 取得Datum顏色
40
+ export function getCategoryValueColor ({ datum, colorType, fullChartParams }: { datum: ComputedDatumCategoryValue, colorType: ColorType, fullChartParams: ChartParams }) {
41
+
42
+ }
43
+
44
+ // // 取得Series顏色 @Q@ 待重構完後刪除
45
+ // export function getSeriesColor (seriesIndex: number, fullChartParams: ChartParams) {
46
+ // const colorIndex = seriesIndex < fullChartParams.colors[fullChartParams.colorScheme].series.length
47
+ // ? seriesIndex
48
+ // : seriesIndex % fullChartParams.colors[fullChartParams.colorScheme].series.length
49
+ // return fullChartParams.colors[fullChartParams.colorScheme].series[colorIndex]
50
+ // }
51
+
52
+ // 取得Datum顏色 @Q@ 待重構完後刪除
39
53
  export function getDatumColor ({ datum, colorType, fullChartParams }: { datum: ComputedDatumBase, colorType: ColorType, fullChartParams: ChartParams }) {
40
54
  // 對應series資料中的顏色
41
55
  if (colorType === 'series') {
package/tsconfig.json CHANGED
@@ -9,6 +9,6 @@
9
9
  "allowJs": true,
10
10
  "moduleResolution": "node",
11
11
  "allowSyntheticDefaultImports" : true,
12
- "esModuleInterop" : true
12
+ "esModuleInterop" : true,
13
13
  }
14
14
  }