@orbcharts/presets-basic 3.0.0-alpha.1
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/LICENSE +201 -0
- package/dist/orbcharts-presets-basic.es.js +347 -0
- package/dist/orbcharts-presets-basic.umd.js +1 -0
- package/dist/src/chartParamsFiles/CP_BOTTOM_LONG_PADDING.d.ts +3 -0
- package/dist/src/chartParamsFiles/CP_BOTTOM_PADDING.d.ts +3 -0
- package/dist/src/chartParamsFiles/CP_BOTTOM_PADDING_WITH_GROUP_HIGHLIGHT.d.ts +3 -0
- package/dist/src/chartParamsFiles/CP_LEFT_PADDING.d.ts +3 -0
- package/dist/src/chartParamsFiles/CP_RIGHT_PADDING.d.ts +3 -0
- package/dist/src/chartParamsFiles/index.d.ts +5 -0
- package/dist/src/createPreset.d.ts +9 -0
- package/dist/src/gridDataFormatterFiles/DF_BOTTOM_VALUE_AXIS.d.ts +3 -0
- package/dist/src/gridDataFormatterFiles/index.d.ts +1 -0
- package/dist/src/gridPluginParamsFiles/Bars/PP_BARS_ROUND.d.ts +4 -0
- package/dist/src/gridPluginParamsFiles/Bars/PP_BARS_THIN.d.ts +4 -0
- package/dist/src/gridPluginParamsFiles/Bars/index.d.ts +2 -0
- package/dist/src/gridPluginParamsFiles/Dots/PP_DOTS_ONLY_SHOW_HIGHLIGHTED.d.ts +4 -0
- package/dist/src/gridPluginParamsFiles/Dots/PP_DOTS_SOLID.d.ts +4 -0
- package/dist/src/gridPluginParamsFiles/Dots/index.d.ts +2 -0
- package/dist/src/gridPluginParamsFiles/GridLegend/PP_GRID_LEGEND_BOTTOM.d.ts +4 -0
- package/dist/src/gridPluginParamsFiles/GridLegend/PP_GRID_LEGEND_BOTTOM_WITH_LINE_LIST.d.ts +4 -0
- package/dist/src/gridPluginParamsFiles/GridLegend/index.d.ts +2 -0
- package/dist/src/gridPluginParamsFiles/GroupAxis/PP_GROUP_AXIS_ROTATE_LABEL.d.ts +4 -0
- package/dist/src/gridPluginParamsFiles/GroupAxis/index.d.ts +1 -0
- package/dist/src/gridPluginParamsFiles/Lines/PP_LINES_CURVE.d.ts +4 -0
- package/dist/src/gridPluginParamsFiles/Lines/index.d.ts +1 -0
- package/dist/src/gridPluginParamsFiles/index.d.ts +5 -0
- package/dist/src/index.d.ts +12 -0
- package/dist/src/multiGridDataFormatterFiles/index.d.ts +1 -0
- package/dist/src/multiGridPluginParamsFiles/index.d.ts +1 -0
- package/dist/src/multiValueDataFormatterFiles/index.d.ts +1 -0
- package/dist/src/multiValuePluginParamsFiles/index.d.ts +1 -0
- package/dist/src/relationshipDataFormatterFiles/index.d.ts +1 -0
- package/dist/src/relationshipPluginParamsFiles/index.d.ts +1 -0
- package/dist/src/seriesDataFormatterFiles/index.d.ts +1 -0
- package/dist/src/seriesPluginParamsFiles/Bubbles/PP_BUBBLES_SCALING_BY_RADIUS.d.ts +4 -0
- package/dist/src/seriesPluginParamsFiles/Bubbles/index.d.ts +1 -0
- package/dist/src/seriesPluginParamsFiles/Pie/PP_PIE_BLACK_STROKE.d.ts +0 -0
- package/dist/src/seriesPluginParamsFiles/Pie/PP_PIE_DONUT.d.ts +4 -0
- package/dist/src/seriesPluginParamsFiles/Pie/PP_PIE_HALF_DONUT.d.ts +4 -0
- package/dist/src/seriesPluginParamsFiles/Pie/index.d.ts +2 -0
- package/dist/src/seriesPluginParamsFiles/PieLabels/PP_PIE_LABELS_HALF_ANGLE.d.ts +4 -0
- package/dist/src/seriesPluginParamsFiles/PieLabels/PP_PIE_LABELS_INNER.d.ts +4 -0
- package/dist/src/seriesPluginParamsFiles/PieLabels/index.d.ts +2 -0
- package/dist/src/seriesPluginParamsFiles/SeriesLegend/PP_SERIES_LEGEND_ROUND.d.ts +4 -0
- package/dist/src/seriesPluginParamsFiles/SeriesLegend/index.d.ts +1 -0
- package/dist/src/seriesPluginParamsFiles/index.d.ts +4 -0
- package/dist/src/treeDataFormatterFiles/index.d.ts +1 -0
- package/dist/src/treePluginParamsFiles/index.d.ts +1 -0
- package/dist/src/types.d.ts +39 -0
- package/dist/vite.config.d.ts +2 -0
- package/package.json +43 -0
- package/src/chartParamsFiles/CP_BOTTOM_LONG_PADDING.ts +14 -0
- package/src/chartParamsFiles/CP_BOTTOM_PADDING.ts +14 -0
- package/src/chartParamsFiles/CP_BOTTOM_PADDING_WITH_GROUP_HIGHLIGHT.ts +15 -0
- package/src/chartParamsFiles/CP_LEFT_PADDING.ts +14 -0
- package/src/chartParamsFiles/CP_RIGHT_PADDING.ts +14 -0
- package/src/chartParamsFiles/index.ts +5 -0
- package/src/createPreset.ts +88 -0
- package/src/gridDataFormatterFiles/DF_BOTTOM_VALUE_AXIS.ts +16 -0
- package/src/gridDataFormatterFiles/index.ts +1 -0
- package/src/gridPluginParamsFiles/Bars/PP_BARS_ROUND.ts +15 -0
- package/src/gridPluginParamsFiles/Bars/PP_BARS_THIN.ts +14 -0
- package/src/gridPluginParamsFiles/Bars/index.ts +2 -0
- package/src/gridPluginParamsFiles/Dots/PP_DOTS_ONLY_SHOW_HIGHLIGHTED.ts +14 -0
- package/src/gridPluginParamsFiles/Dots/PP_DOTS_SOLID.ts +14 -0
- package/src/gridPluginParamsFiles/Dots/index.ts +2 -0
- package/src/gridPluginParamsFiles/GridLegend/PP_GRID_LEGEND_BOTTOM.ts +14 -0
- package/src/gridPluginParamsFiles/GridLegend/PP_GRID_LEGEND_BOTTOM_WITH_LINE_LIST.ts +15 -0
- package/src/gridPluginParamsFiles/GridLegend/index.ts +2 -0
- package/src/gridPluginParamsFiles/GroupAxis/PP_GROUP_AXIS_ROTATE_LABEL.ts +12 -0
- package/src/gridPluginParamsFiles/GroupAxis/index.ts +1 -0
- package/src/gridPluginParamsFiles/Lines/PP_LINES_CURVE.ts +13 -0
- package/src/gridPluginParamsFiles/Lines/index.ts +1 -0
- package/src/gridPluginParamsFiles/index.ts +6 -0
- package/src/index.ts +103 -0
- package/src/multiGridDataFormatterFiles/index.ts +1 -0
- package/src/multiGridPluginParamsFiles/index.ts +1 -0
- package/src/multiValueDataFormatterFiles/index.ts +1 -0
- package/src/multiValuePluginParamsFiles/index.ts +1 -0
- package/src/relationshipDataFormatterFiles/index.ts +1 -0
- package/src/relationshipPluginParamsFiles/index.ts +1 -0
- package/src/seriesDataFormatterFiles/index.ts +1 -0
- package/src/seriesPluginParamsFiles/Bubbles/PP_BUBBLES_SCALING_BY_RADIUS.ts +12 -0
- package/src/seriesPluginParamsFiles/Bubbles/index.ts +1 -0
- package/src/seriesPluginParamsFiles/Pie/PP_PIE_BLACK_STROKE.ts +0 -0
- package/src/seriesPluginParamsFiles/Pie/PP_PIE_DONUT.ts +12 -0
- package/src/seriesPluginParamsFiles/Pie/PP_PIE_HALF_DONUT.ts +14 -0
- package/src/seriesPluginParamsFiles/Pie/index.ts +2 -0
- package/src/seriesPluginParamsFiles/PieLabels/PP_PIE_LABELS_HALF_ANGLE.ts +13 -0
- package/src/seriesPluginParamsFiles/PieLabels/PP_PIE_LABELS_INNER.ts +13 -0
- package/src/seriesPluginParamsFiles/PieLabels/index.ts +2 -0
- package/src/seriesPluginParamsFiles/SeriesLegend/PP_SERIES_LEGEND_ROUND.ts +12 -0
- package/src/seriesPluginParamsFiles/SeriesLegend/index.ts +1 -0
- package/src/seriesPluginParamsFiles/index.ts +4 -0
- package/src/treeDataFormatterFiles/index.ts +1 -0
- package/src/treePluginParamsFiles/index.ts +1 -0
- package/src/types.ts +58 -0
- package/tsconfig.json +14 -0
- package/vite.config.js +45 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { PP_GROUP_AXIS_ROTATE_LABEL } from './PP_GROUP_AXIS_ROTATE_LABEL';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { PP_LINES_CURVE } from './PP_LINES_CURVE';
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export declare const PRESET_SERIES_BASIC: import('@orbcharts/core').PresetPartial<"series">;
|
|
2
|
+
export declare const PRESET_BUBBLES_SCALING_BY_RADIUS: import('@orbcharts/core').PresetPartial<"series">;
|
|
3
|
+
export declare const PRESET_PIE_WITH_INNER_LABELS: import('@orbcharts/core').PresetPartial<"series">;
|
|
4
|
+
export declare const PRESET_PIE_DONUT: import('@orbcharts/core').PresetPartial<"series">;
|
|
5
|
+
export declare const PRESET_PIE_HALF_DONUT: import('@orbcharts/core').PresetPartial<"series">;
|
|
6
|
+
export declare const PRESET_GRID_BASIC: import('@orbcharts/core').PresetPartial<"grid">;
|
|
7
|
+
export declare const PRESET_GRID_ROTATE_AXIS_LABEL: import('@orbcharts/core').PresetPartial<"grid">;
|
|
8
|
+
export declare const PRESET_BARS_ROUND: import('@orbcharts/core').PresetPartial<"grid">;
|
|
9
|
+
export declare const PRESET_BARS_HORIZONTAL_AND_ROUND: import('@orbcharts/core').PresetPartial<"grid">;
|
|
10
|
+
export declare const PRESET_BARS_THIN: import('@orbcharts/core').PresetPartial<"grid">;
|
|
11
|
+
export declare const PRESET_LINES_CURVE: import('@orbcharts/core').PresetPartial<"grid">;
|
|
12
|
+
export declare const PRESET_LINES_HIGHLIGHT_GROUP_DOTS: import('@orbcharts/core').PresetPartial<"grid">;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const temp: {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const temp: {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const temp: {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const temp: {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const temp: {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const temp: {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const temp: {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { PP_BUBBLES_SCALING_BY_RADIUS } from './PP_BUBBLES_SCALING_BY_RADIUS';
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { PP_SERIES_LEGEND_ROUND } from './PP_SERIES_LEGEND_ROUND';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const temp: {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const temp: {};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { ChartParamsPartial, DataFormatterPartialTypeMap, ChartType } from '@orbcharts/core';
|
|
2
|
+
|
|
3
|
+
import * as chartParams from './chartParamsFiles';
|
|
4
|
+
import * as seriesDataFormatters from './seriesDataFormatterFiles';
|
|
5
|
+
import * as seriesPluginParams from './seriesPluginParamsFiles';
|
|
6
|
+
import * as gridDataFormatters from './gridDataFormatterFiles';
|
|
7
|
+
import * as gridPluginParams from './gridPluginParamsFiles';
|
|
8
|
+
import * as multiGridDataFormatters from './multiGridDataFormatterFiles';
|
|
9
|
+
import * as multiGridPluginParams from './multiGridPluginParamsFiles';
|
|
10
|
+
import * as multiValueDataFormatters from './multiValueDataFormatterFiles';
|
|
11
|
+
import * as multiValuePluginParams from './multiValuePluginParamsFiles';
|
|
12
|
+
import * as relationshipDataFormatters from './relationshipDataFormatterFiles';
|
|
13
|
+
import * as relationshipPluginParams from './relationshipPluginParamsFiles';
|
|
14
|
+
import * as treeDataFormatters from './treeDataFormatterFiles';
|
|
15
|
+
import * as treePluginParams from './treePluginParamsFiles';
|
|
16
|
+
export interface ChartParamsFile {
|
|
17
|
+
id: string;
|
|
18
|
+
description: string;
|
|
19
|
+
data: ChartParamsPartial;
|
|
20
|
+
}
|
|
21
|
+
export interface DataFormatterFile<T extends ChartType> {
|
|
22
|
+
id: string;
|
|
23
|
+
chartType: T;
|
|
24
|
+
description: string;
|
|
25
|
+
data: DataFormatterPartialTypeMap<T>;
|
|
26
|
+
}
|
|
27
|
+
export interface PluginParamsFile<PluginParams> {
|
|
28
|
+
id: string;
|
|
29
|
+
chartType: ChartType;
|
|
30
|
+
pluginName: string;
|
|
31
|
+
description: string;
|
|
32
|
+
data: Partial<PluginParams>;
|
|
33
|
+
}
|
|
34
|
+
export interface PresetFile<T extends ChartType> {
|
|
35
|
+
chartParamsId?: keyof typeof chartParams;
|
|
36
|
+
dataFormatterId?: T extends 'series' ? keyof typeof seriesDataFormatters : T extends 'grid' ? keyof typeof gridDataFormatters : T extends 'multiGrid' ? keyof typeof multiGridDataFormatters : T extends 'multiValue' ? keyof typeof multiValueDataFormatters : T extends 'relationship' ? keyof typeof relationshipDataFormatters : T extends 'tree' ? keyof typeof treeDataFormatters : undefined;
|
|
37
|
+
allPluginParamsIds?: T extends 'series' ? (keyof typeof seriesPluginParams)[] : T extends 'grid' ? (keyof typeof gridPluginParams)[] : T extends 'multiGrid' ? (keyof typeof multiGridPluginParams)[] : T extends 'multiValue' ? (keyof typeof multiValuePluginParams)[] : T extends 'relationship' ? (keyof typeof relationshipPluginParams)[] : T extends 'tree' ? (keyof typeof treePluginParams)[] : undefined;
|
|
38
|
+
description: string;
|
|
39
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@orbcharts/presets-basic",
|
|
3
|
+
"version": "3.0.0-alpha.1",
|
|
4
|
+
"description": "presets for OrbCharts",
|
|
5
|
+
"author": "Blue Planet Inc.",
|
|
6
|
+
"license": "Apache-2.0",
|
|
7
|
+
"keywords": [
|
|
8
|
+
"d3",
|
|
9
|
+
"rxjs",
|
|
10
|
+
"svg",
|
|
11
|
+
"visualization",
|
|
12
|
+
"infographic",
|
|
13
|
+
"graph",
|
|
14
|
+
"chart"
|
|
15
|
+
],
|
|
16
|
+
"private": false,
|
|
17
|
+
"publishConfig": {
|
|
18
|
+
"access": "public",
|
|
19
|
+
"registry": "https://registry.npmjs.org/"
|
|
20
|
+
},
|
|
21
|
+
"files": [
|
|
22
|
+
"*"
|
|
23
|
+
],
|
|
24
|
+
"module": "./dist/orbcharts-presets-basic.es.js",
|
|
25
|
+
"types": "./dist/src/index.d.ts",
|
|
26
|
+
"scripts": {
|
|
27
|
+
"test": "echo \"Error: no test specified\" && exit 1",
|
|
28
|
+
"build": "vite build --mode release"
|
|
29
|
+
},
|
|
30
|
+
"devDependencies": {
|
|
31
|
+
"@types/d3": "^7.4.0",
|
|
32
|
+
"ts-loader": "^9.4.2",
|
|
33
|
+
"typescript": "^5.0.4",
|
|
34
|
+
"vite": "^5.3.5",
|
|
35
|
+
"vite-plugin-dts": "^3.7.3"
|
|
36
|
+
},
|
|
37
|
+
"dependencies": {
|
|
38
|
+
"@orbcharts/core": "^3.0.0-alpha.26",
|
|
39
|
+
"@orbcharts/plugins-basic": "^3.0.0-alpha.30",
|
|
40
|
+
"d3": "^7.8.5",
|
|
41
|
+
"rxjs": "^7.8.1"
|
|
42
|
+
}
|
|
43
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { ChartParamsFile } from '../types'
|
|
2
|
+
|
|
3
|
+
export const CP_BOTTOM_LONG_PADDING: ChartParamsFile = {
|
|
4
|
+
id: 'CP_BOTTOM_LONG_PADDING',
|
|
5
|
+
description: '間距下面加長留空',
|
|
6
|
+
data: {
|
|
7
|
+
padding: {
|
|
8
|
+
top: 60,
|
|
9
|
+
right: 60,
|
|
10
|
+
bottom: 180,
|
|
11
|
+
left: 60
|
|
12
|
+
},
|
|
13
|
+
}
|
|
14
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { ChartParamsFile } from '../types'
|
|
2
|
+
|
|
3
|
+
export const CP_BOTTOM_PADDING_WITH_GROUP_HIGHLIGHT: ChartParamsFile = {
|
|
4
|
+
id: 'CP_BOTTOM_PADDING_WITH_GROUP_HIGHLIGHT',
|
|
5
|
+
description: '間距下面留空及highlight群組',
|
|
6
|
+
data: {
|
|
7
|
+
padding: {
|
|
8
|
+
top: 60,
|
|
9
|
+
right: 60,
|
|
10
|
+
bottom: 120,
|
|
11
|
+
left: 60
|
|
12
|
+
},
|
|
13
|
+
highlightTarget: 'group'
|
|
14
|
+
}
|
|
15
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { CP_BOTTOM_LONG_PADDING } from './CP_BOTTOM_LONG_PADDING'
|
|
2
|
+
export { CP_BOTTOM_PADDING_WITH_GROUP_HIGHLIGHT } from './CP_BOTTOM_PADDING_WITH_GROUP_HIGHLIGHT'
|
|
3
|
+
export { CP_BOTTOM_PADDING } from './CP_BOTTOM_PADDING'
|
|
4
|
+
export { CP_LEFT_PADDING } from './CP_LEFT_PADDING'
|
|
5
|
+
export { CP_RIGHT_PADDING } from './CP_RIGHT_PADDING'
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import type { PresetPartial, ChartType, ChartParamsPartial, DataFormatterPartialTypeMap } from '@orbcharts/core'
|
|
2
|
+
import type { ChartParamsFile, DataFormatterFile, PluginParamsFile, PresetFile } from './types'
|
|
3
|
+
import * as chartParamsFiles from './chartParamsFiles'
|
|
4
|
+
import * as seriesDataFormatterFiles from './seriesDataFormatterFiles'
|
|
5
|
+
import * as seriesPluginParamsFiles from './seriesPluginParamsFiles'
|
|
6
|
+
import * as gridDataFormatterFiles from './gridDataFormatterFiles'
|
|
7
|
+
import * as gridPluginParamsFiles from './gridPluginParamsFiles'
|
|
8
|
+
import * as multiGridDataFormatterFiles from './multiGridDataFormatterFiles'
|
|
9
|
+
import * as multiGridPluginParamsFiles from './multiGridPluginParamsFiles'
|
|
10
|
+
import * as multiValueDataFormatterFiles from './multiValueDataFormatterFiles'
|
|
11
|
+
import * as multiValuePluginParamsFiles from './multiValuePluginParamsFiles'
|
|
12
|
+
import * as relationshipDataFormatterFiles from './relationshipDataFormatterFiles'
|
|
13
|
+
import * as relationshipPluginParamsFiles from './relationshipPluginParamsFiles'
|
|
14
|
+
import * as treeDataFormatterFiles from './treeDataFormatterFiles'
|
|
15
|
+
import * as treePluginParamsFiles from './treePluginParamsFiles'
|
|
16
|
+
|
|
17
|
+
const dataFormatterFilesTypeMap = {
|
|
18
|
+
series: seriesDataFormatterFiles,
|
|
19
|
+
grid: gridDataFormatterFiles,
|
|
20
|
+
multiGrid: multiGridDataFormatterFiles,
|
|
21
|
+
multiValue: multiValueDataFormatterFiles,
|
|
22
|
+
relationship: relationshipDataFormatterFiles,
|
|
23
|
+
tree: treeDataFormatterFiles
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
const pluginParamsFilesTypeMap = {
|
|
27
|
+
series: seriesPluginParamsFiles,
|
|
28
|
+
grid: gridPluginParamsFiles,
|
|
29
|
+
multiGrid: multiGridPluginParamsFiles,
|
|
30
|
+
multiValue: multiValuePluginParamsFiles,
|
|
31
|
+
relationship: relationshipPluginParamsFiles,
|
|
32
|
+
tree: treePluginParamsFiles
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
const createBasePreset = <T extends ChartType>(chartType: T, presetFile: PresetFile<T>): PresetPartial<T> => {
|
|
36
|
+
const chartParams: ChartParamsPartial | undefined = presetFile.chartParamsId
|
|
37
|
+
? chartParamsFiles[presetFile.chartParamsId].data
|
|
38
|
+
: undefined
|
|
39
|
+
// @ts-ignore
|
|
40
|
+
const dataFormatter: DataFormatterPartialTypeMap<T> | undefined = dataFormatterFilesTypeMap[chartType][presetFile.dataFormatterId]
|
|
41
|
+
// @ts-ignore
|
|
42
|
+
? dataFormatterFilesTypeMap[chartType][presetFile.dataFormatterId].data
|
|
43
|
+
: undefined
|
|
44
|
+
|
|
45
|
+
const allPluginParams: {[key: string]: any} | undefined = presetFile.allPluginParamsIds
|
|
46
|
+
? presetFile.allPluginParamsIds
|
|
47
|
+
.reduce((prev, current) => {
|
|
48
|
+
// @ts-ignore
|
|
49
|
+
if (pluginParamsFilesTypeMap[chartType][current]) {
|
|
50
|
+
// @ts-ignore
|
|
51
|
+
const pluginName = pluginParamsFilesTypeMap[chartType][current].pluginName
|
|
52
|
+
// @ts-ignore
|
|
53
|
+
prev[pluginName] = pluginParamsFilesTypeMap[chartType][current].data
|
|
54
|
+
}
|
|
55
|
+
return prev
|
|
56
|
+
}, {})
|
|
57
|
+
: undefined
|
|
58
|
+
|
|
59
|
+
return {
|
|
60
|
+
chartParams,
|
|
61
|
+
dataFormatter,
|
|
62
|
+
allPluginParams
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
export const createSeriesPreset = (presetFile: PresetFile<'series'>): PresetPartial<'series'> => {
|
|
67
|
+
return createBasePreset('series', presetFile)
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
export const createGridPreset = (presetFile: PresetFile<'grid'>): PresetPartial<'grid'> => {
|
|
71
|
+
return createBasePreset('grid', presetFile)
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
export const createMultiGridPreset = (presetFile: PresetFile<'multiGrid'>): PresetPartial<'multiGrid'> => {
|
|
75
|
+
return createBasePreset('multiGrid', presetFile)
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
export const createMultiValuePreset = (presetFile: PresetFile<'multiValue'>): PresetPartial<'multiValue'> => {
|
|
79
|
+
return createBasePreset('multiValue', presetFile)
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
export const createRelationshipPreset = (presetFile: PresetFile<'relationship'>): PresetPartial<'relationship'> => {
|
|
83
|
+
return createBasePreset('relationship', presetFile)
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
export const createTreePreset = (presetFile: PresetFile<'tree'>): PresetPartial<'tree'> => {
|
|
87
|
+
return createBasePreset('tree', presetFile)
|
|
88
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { DataFormatterFile } from '../types'
|
|
2
|
+
import type { BarsParams } from '@orbcharts/plugins-basic'
|
|
3
|
+
|
|
4
|
+
export const DF_BOTTOM_VALUE_AXIS: DataFormatterFile<'grid'> = {
|
|
5
|
+
id: 'DF_BOTTOM_VALUE_AXIS',
|
|
6
|
+
chartType: 'grid',
|
|
7
|
+
description: '底部橫向資料圖軸',
|
|
8
|
+
data: {
|
|
9
|
+
valueAxis: {
|
|
10
|
+
position: 'bottom'
|
|
11
|
+
},
|
|
12
|
+
groupAxis: {
|
|
13
|
+
position: 'left'
|
|
14
|
+
},
|
|
15
|
+
}
|
|
16
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { DF_BOTTOM_VALUE_AXIS } from './DF_BOTTOM_VALUE_AXIS'
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { PluginParamsFile } from '../../types'
|
|
2
|
+
import type { BarsParams } from '@orbcharts/plugins-basic'
|
|
3
|
+
|
|
4
|
+
export const PP_BARS_ROUND: PluginParamsFile<BarsParams> = {
|
|
5
|
+
id: 'PP_BARS_ROUND',
|
|
6
|
+
chartType: 'grid',
|
|
7
|
+
pluginName: 'Bars',
|
|
8
|
+
description: '圓角長條圖',
|
|
9
|
+
data: {
|
|
10
|
+
barWidth: 0,
|
|
11
|
+
barPadding: 1,
|
|
12
|
+
barGroupPadding: 10,
|
|
13
|
+
barRadius: true,
|
|
14
|
+
}
|
|
15
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { PluginParamsFile } from '../../types'
|
|
2
|
+
import type { BarsParams } from '@orbcharts/plugins-basic'
|
|
3
|
+
|
|
4
|
+
export const PP_BARS_THIN: PluginParamsFile<BarsParams> = {
|
|
5
|
+
id: 'PP_BARS_THIN',
|
|
6
|
+
chartType: 'grid',
|
|
7
|
+
pluginName: 'Bars',
|
|
8
|
+
description: '圓角長條圖',
|
|
9
|
+
data: {
|
|
10
|
+
barWidth: 20,
|
|
11
|
+
barPadding: 1,
|
|
12
|
+
barGroupPadding: 10
|
|
13
|
+
}
|
|
14
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { PluginParamsFile } from '../../types'
|
|
2
|
+
import type { DotsParams } from '@orbcharts/plugins-basic'
|
|
3
|
+
|
|
4
|
+
export const PP_DOTS_ONLY_SHOW_HIGHLIGHTED: PluginParamsFile<DotsParams> = {
|
|
5
|
+
id: 'PP_DOTS_ONLY_SHOW_HIGHLIGHTED',
|
|
6
|
+
chartType: 'grid',
|
|
7
|
+
pluginName: 'Dots',
|
|
8
|
+
description: '顯示highlight圓點',
|
|
9
|
+
data: {
|
|
10
|
+
radius: 3,
|
|
11
|
+
fillColorType: 'series',
|
|
12
|
+
onlyShowHighlighted: false
|
|
13
|
+
}
|
|
14
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { PluginParamsFile } from '../../types'
|
|
2
|
+
import type { DotsParams } from '@orbcharts/plugins-basic'
|
|
3
|
+
|
|
4
|
+
export const PP_DOTS_SOLID: PluginParamsFile<DotsParams> = {
|
|
5
|
+
id: 'PP_DOTS_SOLID',
|
|
6
|
+
chartType: 'grid',
|
|
7
|
+
pluginName: 'Dots',
|
|
8
|
+
description: '實心圓點',
|
|
9
|
+
data: {
|
|
10
|
+
radius: 3,
|
|
11
|
+
fillColorType: 'series',
|
|
12
|
+
onlyShowHighlighted: false
|
|
13
|
+
}
|
|
14
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { PluginParamsFile } from '../../types'
|
|
2
|
+
import type { GridLegendParams } from '@orbcharts/plugins-basic'
|
|
3
|
+
|
|
4
|
+
export const PP_GRID_LEGEND_BOTTOM: PluginParamsFile<GridLegendParams> = {
|
|
5
|
+
id: 'PP_GRID_LEGEND_BOTTOM',
|
|
6
|
+
chartType: 'grid',
|
|
7
|
+
pluginName: 'GridLegend',
|
|
8
|
+
description: '底部圖例',
|
|
9
|
+
data: {
|
|
10
|
+
position: 'bottom',
|
|
11
|
+
justify: 'center',
|
|
12
|
+
padding: 14,
|
|
13
|
+
}
|
|
14
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { PluginParamsFile } from '../../types'
|
|
2
|
+
import type { GridLegendParams } from '@orbcharts/plugins-basic'
|
|
3
|
+
|
|
4
|
+
export const PP_GRID_LEGEND_BOTTOM_WITH_LINE_LIST: PluginParamsFile<GridLegendParams> = {
|
|
5
|
+
id: 'PP_GRID_LEGEND_BOTTOM_WITH_LINE_LIST',
|
|
6
|
+
chartType: 'grid',
|
|
7
|
+
pluginName: 'GridLegend',
|
|
8
|
+
description: '底部圖例及線條列點',
|
|
9
|
+
data: {
|
|
10
|
+
position: 'bottom',
|
|
11
|
+
justify: 'center',
|
|
12
|
+
padding: 14,
|
|
13
|
+
listRectHeight: 2
|
|
14
|
+
}
|
|
15
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { PluginParamsFile } from '../../types'
|
|
2
|
+
import type { GroupAxisParams } from '@orbcharts/plugins-basic'
|
|
3
|
+
|
|
4
|
+
export const PP_GROUP_AXIS_ROTATE_LABEL: PluginParamsFile<GroupAxisParams> = {
|
|
5
|
+
id: 'PP_GROUP_AXIS_ROTATE_LABEL',
|
|
6
|
+
chartType: 'grid',
|
|
7
|
+
pluginName: 'GroupAxis',
|
|
8
|
+
description: '群組圖軸標籤文字傾斜',
|
|
9
|
+
data: {
|
|
10
|
+
tickTextRotate: 40
|
|
11
|
+
}
|
|
12
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { PP_GROUP_AXIS_ROTATE_LABEL } from './PP_GROUP_AXIS_ROTATE_LABEL'
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { PluginParamsFile } from '../../types'
|
|
2
|
+
import type { LinesParams } from '@orbcharts/plugins-basic'
|
|
3
|
+
|
|
4
|
+
export const PP_LINES_CURVE: PluginParamsFile<LinesParams> = {
|
|
5
|
+
id: 'PP_LINES_CURVE',
|
|
6
|
+
chartType: 'grid',
|
|
7
|
+
pluginName: 'Lines',
|
|
8
|
+
description: '圓弧折線圖',
|
|
9
|
+
data: {
|
|
10
|
+
lineCurve: 'curveMonotoneX',
|
|
11
|
+
lineWidth: 3
|
|
12
|
+
}
|
|
13
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { PP_LINES_CURVE } from './PP_LINES_CURVE'
|