背景:项目本身使用了ant charts的功能,遇到了一个需要配置y轴缩略轴的功能。
结论:该功能在g2plot中支持,但截止到2023.12.11(0.9.13版本的ant-design/charts)为止,在ant charts中不支持。
没有在文档中找到相关说明,翻看源码找到下定义
export interface ISliderInteractionConfig {
/** 在图表中的位置,默认 horizontal */
/** @ignore */
type?: 'horizontal' | 'vertical';
/** 宽度,在 vertical 下生效 */
/** @ignore */
width?: number;
/** 高度,在 horizontal 下生效 */
height?: number;
/** 可选 padding */
padding?: [number, number, number, number];
/** 默认开始位置, 0~1 */
start?: number;
/** 默认结束位置, 0~1 */
end?: number;
/** 背景框样式配置 */
backgroundStyle?: ShapeAttrs;
/** 前景框样式配置 */
foregroundStyle?: ShapeAttrs;
/** 滑块样式配置 */
handlerStyle?: ShapeAttrs;
/** 文本样式配置 */
textStyle?: ShapeAttrs;
/** slider 趋势图配置 */
trendCfg?: {
/** 是否使用 smooth 折线 */
smooth?: boolean;
/** 是否使用面积图 */
isArea?: boolean;
/** 背景样式配置 */
backgroundStyle?: ShapeAttrs;
/** 折线样式配置 */
lineStyle?: ShapeAttrs;
/** 面积图样式配置 */
areaStyle?: ShapeAttrs;
};
}
export interface IScrollbarInteractionConfig {
/** 在图表中的位置,默认 horizontal */
/** @ignore */
type?: 'horizontal' | 'vertical';
/** 宽度,在 vertical 下生效 */
width?: number;
/** 高度,在 horizontal 下生效 */
height?: number;
/** 可选 padding */
padding?: [number, number, number, number];
/** 对应水平滚动条,为X轴每个分类字段的宽度;对于垂直滚动条,为X轴每个分类字段的高度 */
categorySize?: number;
}