-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #184 from VisActor/feat/runtime-series-mark
Feat/runtime series mark
- Loading branch information
Showing
19 changed files
with
1,839 additions
and
17 deletions.
There are no files selected for viewing
11 changes: 11 additions & 0 deletions
11
common/changes/@visactor/vstory-core/feat-runtime-series-mark_2024-12-23-08-38.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"changes": [ | ||
{ | ||
"comment": "feat: change runtime logic about get the character config\n\n", | ||
"type": "none", | ||
"packageName": "@visactor/vstory-core" | ||
} | ||
], | ||
"packageName": "@visactor/vstory-core", | ||
"email": "[email protected]" | ||
} |
11 changes: 11 additions & 0 deletions
11
common/changes/@visactor/vstory/feat-runtime-series-mark_2024-12-23-08-38.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"changes": [ | ||
{ | ||
"comment": "feat: change runtime logic about get the character config\n\n", | ||
"type": "none", | ||
"packageName": "@visactor/vstory" | ||
} | ||
], | ||
"packageName": "@visactor/vstory", | ||
"email": "[email protected]" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 6 additions & 1 deletion
7
packages/vstory-core/src/character/chart/interface/character-chart.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,11 @@ | ||
import type { ICharacter } from '../../../interface/character'; | ||
import type { ICharacter, ICharacterRuntimeConfig } from '../../../interface/character'; | ||
import type { IChartCharacterConfig } from '../../../interface/dsl/chart'; | ||
|
||
export interface ICharacterChart extends ICharacter { | ||
config: IChartCharacterConfig; | ||
getRuntimeConfig: () => ICharacterChartRuntimeConfig; | ||
} | ||
|
||
export interface ICharacterChartRuntimeConfig extends ICharacterRuntimeConfig { | ||
config: IChartCharacterConfig; | ||
} |
8 changes: 4 additions & 4 deletions
8
packages/vstory-core/src/character/chart/interface/runtime.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,92 @@ | ||
// vchart 内置的数据序号 | ||
export const VCHART_DATA_INDEX = '__VCHART_DEFAULT_DATA_INDEX'; | ||
|
||
export const EDITOR_SERIES_MARK_STYLE_LEVEL = 90; | ||
export const EDITOR_SERIES_MARK_SINGLE_LEVEL = 100; | ||
|
||
const CommonMarkAttribute = ['visible', 'stroke', 'strokeOpacity', 'lineWidth', 'lineDash', 'curveType', 'zIndex']; | ||
export const fillMarkAttribute = [...CommonMarkAttribute, 'fill', 'fillOpacity']; | ||
export const rectMarkAttribute = [...fillMarkAttribute, 'cornerRadius']; | ||
export const arcMarkAttribute = [...fillMarkAttribute, 'cornerRadius', 'centerOffset', 'innerRadius', 'outerRadius']; | ||
export const pointMarkAttribute = [...CommonMarkAttribute, 'fill', 'fillOpacity', 'size', 'shape', 'symbolType']; | ||
export const UseDefaultSeriesStyle = '_story_series_style_default'; | ||
export const CommonLabelStyleMap = { | ||
style: [...fillMarkAttribute, 'font', 'fontSize', 'fontStyle', 'fontWeight', 'underline', 'background'], | ||
attribute: ['position', 'offset', 'overlap', 'smartInvert'] | ||
}; | ||
|
||
export const CommonMarkAttributeMap: { [key: string]: string[] } = { | ||
arc: arcMarkAttribute, | ||
rect: rectMarkAttribute, | ||
symbol: pointMarkAttribute, | ||
text: CommonLabelStyleMap.style | ||
}; | ||
|
||
export const SeriesMarkStyleMap: { | ||
// 系列 类型 | ||
[key: string]: { | ||
// 系列内的 mark name | 或者某种系列层属性 | ||
[key: string]: { | ||
style: string[]; // mark 的可编辑样式 key 的数组 | ||
attribute: string[]; // mark 的可编辑属性 key 的数组 | ||
}; | ||
}; | ||
} = { | ||
bar: { | ||
bar: { | ||
style: [...rectMarkAttribute], | ||
attribute: [] | ||
}, | ||
label: CommonLabelStyleMap | ||
}, | ||
line: { | ||
line: { | ||
style: [...CommonMarkAttribute], | ||
attribute: [] | ||
}, | ||
point: { | ||
style: pointMarkAttribute, | ||
attribute: [] | ||
}, | ||
label: CommonLabelStyleMap | ||
}, | ||
area: { | ||
line: { | ||
style: [...CommonMarkAttribute], | ||
attribute: [] | ||
}, | ||
area: { | ||
style: [...fillMarkAttribute], | ||
attribute: [] | ||
}, | ||
point: { | ||
style: pointMarkAttribute, | ||
attribute: [] | ||
}, | ||
label: CommonLabelStyleMap | ||
}, | ||
waterfall: { | ||
bar: { | ||
style: [...rectMarkAttribute], | ||
attribute: [] | ||
}, | ||
label: CommonLabelStyleMap | ||
}, | ||
pie: { | ||
pie: { | ||
style: [...arcMarkAttribute], | ||
attribute: [] | ||
}, | ||
label: CommonLabelStyleMap | ||
}, | ||
funnel: { | ||
funnel: { | ||
style: [...rectMarkAttribute], | ||
attribute: [] | ||
}, | ||
label: CommonLabelStyleMap | ||
} | ||
}; | ||
|
||
export const FieldLink = '_filedLink_'; | ||
export const ValueLink = '_valueLink_'; |
Oops, something went wrong.