@orbcharts/presets-basic 3.0.0-beta.2 → 3.0.0-beta.3

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 (55) hide show
  1. package/LICENSE +200 -200
  2. package/lib/core-types.ts +7 -7
  3. package/lib/plugins-basic-types.ts +6 -6
  4. package/package.json +42 -42
  5. package/src/grid/PRESET_BARS_HORIZONTAL_AND_ROUND.ts +56 -56
  6. package/src/grid/PRESET_BARS_HORIZONTAL_AND_THIN.ts +52 -52
  7. package/src/grid/PRESET_BARS_ROUND.ts +39 -39
  8. package/src/grid/PRESET_BARS_THIN.ts +36 -36
  9. package/src/grid/PRESET_GRID_BASIC.ts +27 -27
  10. package/src/grid/PRESET_GRID_HORIZONTAL.ts +44 -44
  11. package/src/grid/PRESET_GRID_PN_SCALE.ts +35 -35
  12. package/src/grid/PRESET_GRID_ROTATE_AXIS_LABEL.ts +35 -35
  13. package/src/grid/PRESET_GRID_SEPARATE_SERIES.ts +40 -40
  14. package/src/grid/PRESET_LINES_BASIC.ts +35 -35
  15. package/src/grid/PRESET_LINES_CURVE.ts +38 -38
  16. package/src/grid/PRESET_LINES_HIGHLIGHT_GROUP_DOTS.ts +37 -37
  17. package/src/grid/PRESET_LINES_HORIZONTAL.ts +51 -51
  18. package/src/grid/PRESET_LINES_LOOSE_TICKS.ts +37 -37
  19. package/src/grid/PRESET_LINES_ROTATE_AXIS_LABEL.ts +40 -40
  20. package/src/grid/PRESET_LINES_WITH_SOLID_DOTS.ts +39 -39
  21. package/src/grid/PRESET_LINE_AREAS_BASIC.ts +43 -43
  22. package/src/grid/PRESET_LINE_AREAS_CURVE.ts +48 -48
  23. package/src/grid/PRESET_LINE_AREAS_HIGHLIGHT_GROUP_DOTS.ts +47 -47
  24. package/src/grid/PRESET_LINE_AREAS_HORIZONTAL.ts +47 -47
  25. package/src/grid/PRESET_LINE_AREAS_LOOSE_TICKS.ts +45 -45
  26. package/src/grid/PRESET_LINE_AREAS_ROTATE_AXIS_LABEL.ts +48 -48
  27. package/src/grid/PRESET_LINE_AREAS_SEPARATE_SERIES.ts +50 -50
  28. package/src/grid/index.ts +22 -22
  29. package/src/index.ts +4 -4
  30. package/src/multiGrid/PRESET_MULTI_GRID_BASIC.ts +38 -38
  31. package/src/multiGrid/PRESET_MULTI_GRID_DIVERGING.ts +86 -86
  32. package/src/multiGrid/PRESET_MULTI_GRID_ROUND_STYLE.ts +58 -58
  33. package/src/multiGrid/PRESET_MULTI_GRID_SEPARATE_GRID.ts +60 -60
  34. package/src/multiGrid/PRESET_MULTI_LINES_SEPARATE_GRID.ts +86 -86
  35. package/src/multiGrid/PRESET_MULTI_LINE_AREAS_SEPARATE_GRID.ts +104 -104
  36. package/src/multiGrid/index.ts +6 -6
  37. package/src/params.ts +60 -60
  38. package/src/series/PRESET_BUBBLES_SCALING_BY_RADIUS.ts +18 -18
  39. package/src/series/PRESET_BUBBLES_SEPARATE_SERIES.ts +29 -29
  40. package/src/series/PRESET_PIE_BASIC.ts +18 -18
  41. package/src/series/PRESET_PIE_DONUT.ts +23 -23
  42. package/src/series/PRESET_PIE_HALF_DONUT.ts +36 -36
  43. package/src/series/PRESET_PIE_WITH_INNER_LABELS.ts +24 -24
  44. package/src/series/PRESET_ROSE_BASIC.ts +19 -19
  45. package/src/series/PRESET_ROSE_SCALING_BY_RADIUS.ts +24 -24
  46. package/src/series/PRESET_SERIES_BASIC.ts +16 -16
  47. package/src/series/PRESET_SERIES_SEPARATE_SERIES.ts +17 -17
  48. package/src/series/PRESET_SERIES_SEPARATE_SERIES_AND_SUM_SERIES.ts +18 -18
  49. package/src/series/PRESET_SERIES_SUM_SERIES.ts +18 -18
  50. package/src/series/index.ts +13 -13
  51. package/src/tree/PRESET_TREE_BASIC.ts +27 -27
  52. package/src/types.ts +267 -267
  53. package/tsconfig.base.json +13 -13
  54. package/tsconfig.json +2 -2
  55. package/vite.config.js +22 -22
@@ -1,20 +1,20 @@
1
- import type { PresetPartial } from '../../lib/core-types'
2
- import type { PresetSeriesPluginParams, PresetNoneDataPluginParams } from '../types'
3
- // import { ALL_PLUGIN_PARAMS_SERIES, ALL_PLUGIN_PARAMS_NONE_DATA } from '../params'
4
-
5
- export const PRESET_ROSE_BASIC: PresetPartial<'series', Partial<PresetSeriesPluginParams>
6
- & Partial<PresetNoneDataPluginParams>> = {
7
- name: 'PRESET_ROSE_BASIC',
8
- description: '基本Rose參數',
9
- dataFormatter: {
10
- sort: (a, b) => b.value - a.value
11
- },
12
- allPluginParams: {
13
- // ...ALL_PLUGIN_PARAMS_SERIES,
14
- // ...ALL_PLUGIN_PARAMS_NONE_DATA,
15
- SeriesLegend: {
16
- listRectRadius: 7 // 圓型圖例列點
17
- }
18
- }
19
- }
1
+ import type { PresetPartial } from '../../lib/core-types'
2
+ import type { PresetSeriesPluginParams, PresetNoneDataPluginParams } from '../types'
3
+ // import { ALL_PLUGIN_PARAMS_SERIES, ALL_PLUGIN_PARAMS_NONE_DATA } from '../params'
4
+
5
+ export const PRESET_ROSE_BASIC: PresetPartial<'series', Partial<PresetSeriesPluginParams>
6
+ & Partial<PresetNoneDataPluginParams>> = {
7
+ name: 'PRESET_ROSE_BASIC',
8
+ description: '基本Rose參數',
9
+ dataFormatter: {
10
+ sort: (a, b) => b.value - a.value
11
+ },
12
+ allPluginParams: {
13
+ // ...ALL_PLUGIN_PARAMS_SERIES,
14
+ // ...ALL_PLUGIN_PARAMS_NONE_DATA,
15
+ SeriesLegend: {
16
+ listRectRadius: 7 // 圓型圖例列點
17
+ }
18
+ }
19
+ }
20
20
  PRESET_ROSE_BASIC.dataFormatter.sort.toString = () => `(a, b) => b.value - a.value`
@@ -1,25 +1,25 @@
1
- import type { PresetPartial } from '../../lib/core-types'
2
- import type { PresetSeriesPluginParams, PresetNoneDataPluginParams } from '../types'
3
- // import { ALL_PLUGIN_PARAMS_NONE_DATA } from '../params'
4
-
5
- export const PRESET_ROSE_SCALING_BY_RADIUS: PresetPartial<'series', Partial<PresetSeriesPluginParams>
6
- & Partial<PresetNoneDataPluginParams>> = {
7
- name: 'PRESET_ROSE_SCALING_BY_RADIUS',
8
- description: '以半徑尺寸為比例的玫瑰圖',
9
- dataFormatter: {
10
- sort: (a, b) => b.value - a.value
11
- },
12
- allPluginParams: {
13
- // ...ALL_PLUGIN_PARAMS_NONE_DATA,
14
- Rose: {
15
- arcScaleType: 'radius'
16
- },
17
- RoseLabels: {
18
- arcScaleType: 'radius',
19
- },
20
- SeriesLegend: {
21
- listRectRadius: 7 // 圓型圖例列點
22
- }
23
- }
24
- }
1
+ import type { PresetPartial } from '../../lib/core-types'
2
+ import type { PresetSeriesPluginParams, PresetNoneDataPluginParams } from '../types'
3
+ // import { ALL_PLUGIN_PARAMS_NONE_DATA } from '../params'
4
+
5
+ export const PRESET_ROSE_SCALING_BY_RADIUS: PresetPartial<'series', Partial<PresetSeriesPluginParams>
6
+ & Partial<PresetNoneDataPluginParams>> = {
7
+ name: 'PRESET_ROSE_SCALING_BY_RADIUS',
8
+ description: '以半徑尺寸為比例的玫瑰圖',
9
+ dataFormatter: {
10
+ sort: (a, b) => b.value - a.value
11
+ },
12
+ allPluginParams: {
13
+ // ...ALL_PLUGIN_PARAMS_NONE_DATA,
14
+ Rose: {
15
+ arcScaleType: 'radius'
16
+ },
17
+ RoseLabels: {
18
+ arcScaleType: 'radius',
19
+ },
20
+ SeriesLegend: {
21
+ listRectRadius: 7 // 圓型圖例列點
22
+ }
23
+ }
24
+ }
25
25
  PRESET_ROSE_SCALING_BY_RADIUS.dataFormatter.sort.toString = () => `(a, b) => b.value - a.value`
@@ -1,16 +1,16 @@
1
- import type { PresetPartial } from '../../lib/core-types'
2
- import type { PresetSeriesPluginParams, PresetNoneDataPluginParams } from '../types'
3
- // import { ALL_PLUGIN_PARAMS_SERIES, ALL_PLUGIN_PARAMS_NONE_DATA } from '../params'
4
-
5
- export const PRESET_SERIES_BASIC: PresetPartial<'series', Partial<PresetSeriesPluginParams>
6
- & Partial<PresetNoneDataPluginParams>> = {
7
- name: 'PRESET_SERIES_BASIC',
8
- description: '基本Series參數',
9
- allPluginParams: {
10
- // ...ALL_PLUGIN_PARAMS_SERIES,
11
- // ...ALL_PLUGIN_PARAMS_NONE_DATA,
12
- SeriesLegend: {
13
- listRectRadius: 7 // 圓型圖例列點
14
- }
15
- }
16
- }
1
+ import type { PresetPartial } from '../../lib/core-types'
2
+ import type { PresetSeriesPluginParams, PresetNoneDataPluginParams } from '../types'
3
+ // import { ALL_PLUGIN_PARAMS_SERIES, ALL_PLUGIN_PARAMS_NONE_DATA } from '../params'
4
+
5
+ export const PRESET_SERIES_BASIC: PresetPartial<'series', Partial<PresetSeriesPluginParams>
6
+ & Partial<PresetNoneDataPluginParams>> = {
7
+ name: 'PRESET_SERIES_BASIC',
8
+ description: '基本Series參數',
9
+ allPluginParams: {
10
+ // ...ALL_PLUGIN_PARAMS_SERIES,
11
+ // ...ALL_PLUGIN_PARAMS_NONE_DATA,
12
+ SeriesLegend: {
13
+ listRectRadius: 7 // 圓型圖例列點
14
+ }
15
+ }
16
+ }
@@ -1,18 +1,18 @@
1
- import type { PresetPartial } from '../../lib/core-types'
2
- import type { PresetSeriesPluginParams, PresetNoneDataPluginParams } from '../types'
3
- // import { ALL_PLUGIN_PARAMS_SERIES, ALL_PLUGIN_PARAMS_NONE_DATA } from '../params'
4
-
5
- export const PRESET_SERIES_SEPARATE_SERIES: PresetPartial<'series', Partial<PresetSeriesPluginParams>
6
- & Partial<PresetNoneDataPluginParams>> = {
7
- name: 'PRESET_SERIES_SEPARATE_SERIES',
8
- description: '分開顯示Series',
9
- dataFormatter: {
10
- sort: (a, b) => b.value - a.value,
11
- separateSeries: true,
12
- },
13
- allPluginParams: {
14
- // ...ALL_PLUGIN_PARAMS_SERIES,
15
- // ...ALL_PLUGIN_PARAMS_NONE_DATA,
16
- }
17
- }
1
+ import type { PresetPartial } from '../../lib/core-types'
2
+ import type { PresetSeriesPluginParams, PresetNoneDataPluginParams } from '../types'
3
+ // import { ALL_PLUGIN_PARAMS_SERIES, ALL_PLUGIN_PARAMS_NONE_DATA } from '../params'
4
+
5
+ export const PRESET_SERIES_SEPARATE_SERIES: PresetPartial<'series', Partial<PresetSeriesPluginParams>
6
+ & Partial<PresetNoneDataPluginParams>> = {
7
+ name: 'PRESET_SERIES_SEPARATE_SERIES',
8
+ description: '分開顯示Series',
9
+ dataFormatter: {
10
+ sort: (a, b) => b.value - a.value,
11
+ separateSeries: true,
12
+ },
13
+ allPluginParams: {
14
+ // ...ALL_PLUGIN_PARAMS_SERIES,
15
+ // ...ALL_PLUGIN_PARAMS_NONE_DATA,
16
+ }
17
+ }
18
18
  PRESET_SERIES_SEPARATE_SERIES.dataFormatter.sort.toString = () => `(a, b) => b.value - a.value`
@@ -1,19 +1,19 @@
1
- import type { PresetPartial } from '../../lib/core-types'
2
- import type { PresetSeriesPluginParams, PresetNoneDataPluginParams } from '../types'
3
- // import { ALL_PLUGIN_PARAMS_SERIES, ALL_PLUGIN_PARAMS_NONE_DATA } from '../params'
4
-
5
- export const PRESET_SERIES_SEPARATE_SERIES_AND_SUM_SERIES: PresetPartial<'series', Partial<PresetSeriesPluginParams>
6
- & Partial<PresetNoneDataPluginParams>> = {
7
- name: 'PRESET_SERIES_SEPARATE_SERIES_AND_SUM_SERIES',
8
- description: '分開顯示Series並合併Series資料',
9
- dataFormatter: {
10
- sort: (a, b) => b.value - a.value,
11
- separateSeries: true,
12
- sumSeries: true,
13
- },
14
- allPluginParams: {
15
- // ...ALL_PLUGIN_PARAMS_SERIES,
16
- // ...ALL_PLUGIN_PARAMS_NONE_DATA,
17
- }
18
- }
1
+ import type { PresetPartial } from '../../lib/core-types'
2
+ import type { PresetSeriesPluginParams, PresetNoneDataPluginParams } from '../types'
3
+ // import { ALL_PLUGIN_PARAMS_SERIES, ALL_PLUGIN_PARAMS_NONE_DATA } from '../params'
4
+
5
+ export const PRESET_SERIES_SEPARATE_SERIES_AND_SUM_SERIES: PresetPartial<'series', Partial<PresetSeriesPluginParams>
6
+ & Partial<PresetNoneDataPluginParams>> = {
7
+ name: 'PRESET_SERIES_SEPARATE_SERIES_AND_SUM_SERIES',
8
+ description: '分開顯示Series並合併Series資料',
9
+ dataFormatter: {
10
+ sort: (a, b) => b.value - a.value,
11
+ separateSeries: true,
12
+ sumSeries: true,
13
+ },
14
+ allPluginParams: {
15
+ // ...ALL_PLUGIN_PARAMS_SERIES,
16
+ // ...ALL_PLUGIN_PARAMS_NONE_DATA,
17
+ }
18
+ }
19
19
  PRESET_SERIES_SEPARATE_SERIES_AND_SUM_SERIES.dataFormatter.sort.toString = () => `(a, b) => b.value - a.value`
@@ -1,18 +1,18 @@
1
- import type { PresetPartial } from '../../lib/core-types'
2
- import type { PresetSeriesPluginParams, PresetNoneDataPluginParams } from '../types'
3
- // import { ALL_PLUGIN_PARAMS_SERIES, ALL_PLUGIN_PARAMS_NONE_DATA } from '../params'
4
-
5
- export const PRESET_SERIES_SUM_SERIES: PresetPartial<'series', Partial<PresetSeriesPluginParams>
6
- & Partial<PresetNoneDataPluginParams>> = {
7
- name: 'PRESET_SERIES_SUM_SERIES',
8
- description: '合併Series資料',
9
- dataFormatter: {
10
- sort: (a, b) => b.value - a.value,
11
- sumSeries: true
12
- },
13
- allPluginParams: {
14
- // ...ALL_PLUGIN_PARAMS_SERIES,
15
- // ...ALL_PLUGIN_PARAMS_NONE_DATA,
16
- }
17
- }
18
- PRESET_SERIES_SUM_SERIES.dataFormatter.sort.toString = () => `(a, b) => b.value - a.value`
1
+ import type { PresetPartial } from '../../lib/core-types'
2
+ import type { PresetSeriesPluginParams, PresetNoneDataPluginParams } from '../types'
3
+ // import { ALL_PLUGIN_PARAMS_SERIES, ALL_PLUGIN_PARAMS_NONE_DATA } from '../params'
4
+
5
+ export const PRESET_SERIES_SUM_SERIES: PresetPartial<'series', Partial<PresetSeriesPluginParams>
6
+ & Partial<PresetNoneDataPluginParams>> = {
7
+ name: 'PRESET_SERIES_SUM_SERIES',
8
+ description: '合併Series資料',
9
+ dataFormatter: {
10
+ sort: (a, b) => b.value - a.value,
11
+ sumSeries: true
12
+ },
13
+ allPluginParams: {
14
+ // ...ALL_PLUGIN_PARAMS_SERIES,
15
+ // ...ALL_PLUGIN_PARAMS_NONE_DATA,
16
+ }
17
+ }
18
+ PRESET_SERIES_SUM_SERIES.dataFormatter.sort.toString = () => `(a, b) => b.value - a.value`
@@ -1,13 +1,13 @@
1
- export { PRESET_BUBBLES_SCALING_BY_RADIUS } from './PRESET_BUBBLES_SCALING_BY_RADIUS'
2
- export { PRESET_BUBBLES_SEPARATE_SERIES } from './PRESET_BUBBLES_SEPARATE_SERIES'
3
- export { PRESET_PIE_BASIC } from './PRESET_PIE_BASIC'
4
- export { PRESET_PIE_DONUT } from './PRESET_PIE_DONUT'
5
- export { PRESET_PIE_HALF_DONUT } from './PRESET_PIE_HALF_DONUT'
6
- export { PRESET_PIE_WITH_INNER_LABELS } from './PRESET_PIE_WITH_INNER_LABELS'
7
- export { PRESET_ROSE_BASIC } from './PRESET_ROSE_BASIC'
8
- export { PRESET_ROSE_SCALING_BY_RADIUS } from './PRESET_ROSE_SCALING_BY_RADIUS'
9
- export { PRESET_SERIES_BASIC } from './PRESET_SERIES_BASIC'
10
- // export { PRESET_SERIES_DESC } from './PRESET_SERIES_DESC'
11
- export { PRESET_SERIES_SEPARATE_SERIES_AND_SUM_SERIES } from './PRESET_SERIES_SEPARATE_SERIES_AND_SUM_SERIES'
12
- export { PRESET_SERIES_SEPARATE_SERIES } from './PRESET_SERIES_SEPARATE_SERIES'
13
- export { PRESET_SERIES_SUM_SERIES } from './PRESET_SERIES_SUM_SERIES'
1
+ export { PRESET_BUBBLES_SCALING_BY_RADIUS } from './PRESET_BUBBLES_SCALING_BY_RADIUS'
2
+ export { PRESET_BUBBLES_SEPARATE_SERIES } from './PRESET_BUBBLES_SEPARATE_SERIES'
3
+ export { PRESET_PIE_BASIC } from './PRESET_PIE_BASIC'
4
+ export { PRESET_PIE_DONUT } from './PRESET_PIE_DONUT'
5
+ export { PRESET_PIE_HALF_DONUT } from './PRESET_PIE_HALF_DONUT'
6
+ export { PRESET_PIE_WITH_INNER_LABELS } from './PRESET_PIE_WITH_INNER_LABELS'
7
+ export { PRESET_ROSE_BASIC } from './PRESET_ROSE_BASIC'
8
+ export { PRESET_ROSE_SCALING_BY_RADIUS } from './PRESET_ROSE_SCALING_BY_RADIUS'
9
+ export { PRESET_SERIES_BASIC } from './PRESET_SERIES_BASIC'
10
+ // export { PRESET_SERIES_DESC } from './PRESET_SERIES_DESC'
11
+ export { PRESET_SERIES_SEPARATE_SERIES_AND_SUM_SERIES } from './PRESET_SERIES_SEPARATE_SERIES_AND_SUM_SERIES'
12
+ export { PRESET_SERIES_SEPARATE_SERIES } from './PRESET_SERIES_SEPARATE_SERIES'
13
+ export { PRESET_SERIES_SUM_SERIES } from './PRESET_SERIES_SUM_SERIES'
@@ -1,27 +1,27 @@
1
- import type { PresetPartial } from '../../lib/core-types'
2
- import type { PresetTreePluginParams, PresetNoneDataPluginParams } from '../types'
3
- // import { ALL_PLUGIN_PARAMS_NONE_DATA } from '../params'
4
-
5
- export const PRESET_TREE_BASIC: PresetPartial<'tree', Partial<PresetTreePluginParams>
6
- & Partial<PresetNoneDataPluginParams>> = {
7
- name: 'PRESET_TREE_BASIC',
8
- description: '基本Tree參數',
9
- chartParams: {
10
- padding: {
11
- top: 40,
12
- right: 40,
13
- bottom: 60,
14
- left: 40
15
- },
16
- },
17
- allPluginParams: {
18
- // ...ALL_PLUGIN_PARAMS_NONE_DATA,
19
- TreeMap: {},
20
- TreeLegend: {
21
- // position: 'bottom',
22
- // justify: 'center',
23
- placement: 'bottom',
24
- padding: 14,
25
- }
26
- }
27
- }
1
+ import type { PresetPartial } from '../../lib/core-types'
2
+ import type { PresetTreePluginParams, PresetNoneDataPluginParams } from '../types'
3
+ // import { ALL_PLUGIN_PARAMS_NONE_DATA } from '../params'
4
+
5
+ export const PRESET_TREE_BASIC: PresetPartial<'tree', Partial<PresetTreePluginParams>
6
+ & Partial<PresetNoneDataPluginParams>> = {
7
+ name: 'PRESET_TREE_BASIC',
8
+ description: '基本Tree參數',
9
+ chartParams: {
10
+ padding: {
11
+ top: 40,
12
+ right: 40,
13
+ bottom: 60,
14
+ left: 40
15
+ },
16
+ },
17
+ allPluginParams: {
18
+ // ...ALL_PLUGIN_PARAMS_NONE_DATA,
19
+ TreeMap: {},
20
+ TreeLegend: {
21
+ // position: 'bottom',
22
+ // justify: 'center',
23
+ placement: 'bottom',
24
+ padding: 14,
25
+ }
26
+ }
27
+ }