Skip to content

Commit

Permalink
fix: rangeColumn types
Browse files Browse the repository at this point in the history
  • Loading branch information
paleface001 committed Mar 26, 2020
1 parent 165b00c commit 17f582f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
10 changes: 3 additions & 7 deletions src/plots/column/layer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ const PLOT_GEOM_MAP = {
};

interface IColumnLabel extends Label {
position?: 'top' | 'middle' | 'bottom';
position?: string | 'top' | 'middle' | 'bottom';
adjustPosition?: boolean;
adjustColor?: boolean;
}
Expand All @@ -34,19 +34,15 @@ type ColumnInteraction =
| { type: 'scrollBar'; cfg: IScrollbarInteractionConfig };

export interface ColumnViewConfig extends ViewConfig {
// 图形
type?: 'rect' | 'triangle' | 'round';
colorField?: string;
// 百分比, 数值, 最小最大宽度
columnSize?: number;
maxWidth?: number;
minWidth?: number;
columnStyle?: GraphicStyle | ((...args: any[]) => GraphicStyle);
xAxis?: ICatAxis | ITimeAxis;
yAxis?: IValueAxis;
conversionTag?: ConversionTagOptions;
label: IColumnLabel;
interactions: ColumnInteraction[]
label?: IColumnLabel;
interactions?: ColumnInteraction[]
}

export interface ColumnLayerConfig extends ColumnViewConfig, LayerConfig {}
Expand Down
2 changes: 1 addition & 1 deletion src/plots/range-column/layer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import RangeColumnLabel, { RangeColumnLabelConfig } from './component/label';
import { setShapeCache } from './animation';

export interface RangeColumnViewConfig extends ColumnViewConfig {
label: RangeColumnLabelConfig;
label?: RangeColumnLabelConfig;
}

export interface RangeColumnLayerConfig extends RangeColumnViewConfig, LayerConfig {}
Expand Down

0 comments on commit 17f582f

Please # to comment.