ant charts踩坑记录——配置ant chartsy轴缩略轴

背景:项目本身使用了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;
}
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值