NVD3 Multibar 默认预选某些条
NVD3 Multibar default preselect certain bars
我目前正在使用 NVD3 JS 库绘制多条形图。我希望 "preselect" 某些条形值,因此默认情况下它只会显示某些条形图。下图显示了我想要实现的目标:
其中:
"Data 3 " is by default **not** selected
"Data 0 " is by default selected
"Data 1 " is by default selected
"Data 2 " is by default selected
我在 Fiddle 中创建了上述示例(根据@shabeer90 下面的建议):http://jsfiddle.net/gxc27jav/3/
您应该能够将 "disabled" 属性添加到您要禁用的系列的系列对象...示例:
[{disabled: true, values: [...]}, {values: [...]}]
我目前正在使用 NVD3 JS 库绘制多条形图。我希望 "preselect" 某些条形值,因此默认情况下它只会显示某些条形图。下图显示了我想要实现的目标:
"Data 3 " is by default **not** selected
"Data 0 " is by default selected
"Data 1 " is by default selected
"Data 2 " is by default selected
我在 Fiddle 中创建了上述示例(根据@shabeer90 下面的建议):http://jsfiddle.net/gxc27jav/3/
您应该能够将 "disabled" 属性添加到您要禁用的系列的系列对象...示例:
[{disabled: true, values: [...]}, {values: [...]}]