Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add theme & label format #213

Merged
merged 4 commits into from
Jan 8, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions common/config/rush/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion packages/vstory-core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@
"@visactor/vutils": "~0.18.17",
"@visactor/vchart-extension": "0.0.3-vstory.2",
"@visactor/vdataset": "~0.18.17",
"@visactor/vscale": "~0.18.17"
"@visactor/vscale": "~0.18.17",
"bignumber.js": "9.0.1"
},
"devDependencies": {
"@internal/bundler": "workspace:*",
Expand Down
4 changes: 4 additions & 0 deletions packages/vstory-core/src/character/character-base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@ export abstract class CharacterBase<T> implements ICharacter {
return this._canvas;
}

get theme() {
return this._config.theme;
}

constructor(config: ICharacterConfig, option: ICharacterInitOption) {
this.id = config.id ?? `c_${Generator.GenAutoIncrementId()}`;
this.type = config.type;
Expand Down
4 changes: 3 additions & 1 deletion packages/vstory-core/src/character/chart/character-chart.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import type { IComponent, ISeries, IVChart } from '@visactor/vchart';
import { MarkStyleRuntimeInstance } from './runtime/mark-style';
import { LabelStyleRuntimeInstance } from './runtime/label-style';
import { isArray } from '@visactor/vutils';
import { TotalLabelRuntimeInstance } from './runtime/total-label';

export class CharacterChart<T extends IChartGraphicAttribute>
extends CharacterBase<IChartGraphicAttribute>
Expand Down Expand Up @@ -188,7 +189,8 @@ export class CharacterChart<T extends IChartGraphicAttribute>
CommonSpecRuntimeInstance,
CommonLayoutRuntimeInstance,
MarkStyleRuntimeInstance,
LabelStyleRuntimeInstance
LabelStyleRuntimeInstance,
TotalLabelRuntimeInstance
);
}
protected _clearRuntime(): void {
Expand Down
Loading
Loading