mirror of
https://github.com/VisActor/VChart
synced 2024-11-21 23:51:05 +00:00
fix: scatter series size scale
This commit is contained in:
parent
3bddacf7d4
commit
3f71a6fa58
2
.vscode/launch.json
vendored
2
.vscode/launch.json
vendored
@ -5,7 +5,7 @@
|
||||
"name": "unit test",
|
||||
"type": "pwa-node",
|
||||
"request": "launch",
|
||||
"program": "${workspaceFolder}/node_modules/.bin/jest",
|
||||
"program": "${workspaceFolder}/packages/vchart/node_modules/.bin/jest",
|
||||
"args": ["${file}"],
|
||||
"console": "integratedTerminal",
|
||||
"internalConsoleOptions": "neverOpen"
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { isNil, merge } from '@visactor/vutils';
|
||||
import { array, isNil, merge } from '@visactor/vutils';
|
||||
import type { IMark } from '../interface';
|
||||
|
||||
/** 跟随 mark 一起存储的信息 */
|
||||
@ -59,8 +59,9 @@ export class MarkSet {
|
||||
return [...this._children];
|
||||
}
|
||||
|
||||
getMarksInType(type: string): IMark[] {
|
||||
return this._children.filter(m => m.type === type);
|
||||
getMarksInType(type: string | string[]): IMark[] {
|
||||
const types = array(type);
|
||||
return this._children.filter(m => types.includes(m.type));
|
||||
}
|
||||
|
||||
getMarkInId(markId: number): IMark | undefined {
|
||||
|
@ -703,11 +703,10 @@ export abstract class BaseSeries<T extends ISeriesSpec> extends BaseModel implem
|
||||
return this.getMarks().filter(m => !m.name.includes('seriesGroup'));
|
||||
}
|
||||
getMarksInType(type: string | string[]): IMark[] {
|
||||
const typeList = array(type);
|
||||
return this.getMarks().filter(m => typeList.includes(m.type));
|
||||
return this._marks.getMarksInType(type);
|
||||
}
|
||||
getMarkInName(name: string): IMark | undefined {
|
||||
return this.getMarks().find(m => m.name === name);
|
||||
return this._marks.get(name);
|
||||
}
|
||||
getMarkInId(markId: number): IMark | undefined {
|
||||
return this.getMarks().find(m => m.id === markId);
|
||||
|
@ -44,7 +44,7 @@ export interface IScatterSeriesSpec
|
||||
}
|
||||
|
||||
export interface IScatterSeriesTheme extends ICartesianSeriesTheme {
|
||||
size: number;
|
||||
shape: ShapeType;
|
||||
size?: number;
|
||||
shape?: ShapeType;
|
||||
[SeriesMarkNameEnum.point]?: Partial<IMarkTheme<ISymbolMarkSpec>>;
|
||||
}
|
||||
|
@ -2,11 +2,10 @@ import type { IScatterSeriesTheme } from '../../../../series/scatter/interface';
|
||||
import { THEME_CONSTANTS } from '../constants';
|
||||
|
||||
export const scatter: IScatterSeriesTheme = {
|
||||
size: 10,
|
||||
shape: 'circle',
|
||||
point: {
|
||||
style: {
|
||||
size: 8,
|
||||
symbolType: 'circle',
|
||||
lineWidth: 0,
|
||||
fillOpacity: 0.8
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user