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

docs: update slider options #6530

Merged
merged 1 commit into from
Dec 3, 2024
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
2 changes: 2 additions & 0 deletions site/docs/spec/component/slider.zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,8 @@ chart.render();
| -------------------------------- | ------------------------ | ------------------------- | ------ |
| showHandle | 是否显示拖动手柄 | `boolean` | true |
| showLabel | 是否显示拖动手柄文本 | `boolean` | true |
| showLabelOnInteraction | 在调整手柄或刷选时才显示手柄文本,在 showLabel 为 false 时生效 | `boolean` | false |
| autoFitLabel | 是否自动调整拖动手柄文本位置 | `boolean` | true |
| formatter | 拖动手柄标签格式化 | `(value: number)=>string` | - |
| `style.`handleIconSize | 缩略轴手柄大小 | `number` | 10 |
| `style.`handleIconFill | 缩略轴手柄填充色 | `string` | - |
Expand Down
4 changes: 4 additions & 0 deletions src/component/slider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ import { invert } from '../utils/scale';

export type SliderOptions = {
orientation: 'horizontal' | 'vertical';
showHandle?: boolean;
showLabel?: boolean;
showLabelOnInteraction?: boolean;
autoFitLabel?: boolean;
[key: string]: any;
};

Expand Down
Loading