You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Power BI自定义视觉中Slider组件如何设置小数步长?

Power BI自定义视觉Slider组件步长设置方法

你可以在Slider配置的options对象中添加step属性,指定步长为0.1,就能实现每次增减0.1的效果。修改后的代码如下:

labelBgOpacity = new formattingSettings.Slider({
        name: 'labelBgOpacity',
        displayName: "Label background opacity",
        value: 1,
        options: {
            minValue: { value: 0, type: powerbi.visuals.ValidatorType.Min },
            maxValue: { value: 1, type: powerbi.visuals.ValidatorType.Max },
            step: 0.1 // 添加步长设置
        }
    });

添加step: 0.1后,滑块就能在0到1的范围内以0.1为间隔调整数值,不再局限于0和1两个选项。

内容的提问来源于stack exchange,提问作者Master_T

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.06.13 19:45:54