问题描述
我有3个供应商,40个品牌和120个产品,全部显示在三个类别的过滤器中.当用户从供应商"过滤器中选择一个供应商时,我希望品牌"过滤器隐藏该供应商未提供的所有品牌.同样,选择品牌后,我想从产品"过滤器中隐藏不相关的产品.我现在真的不在乎表格中显示的内容.
I have 3 suppliers, 40 brands and 120 products, all displayed in three category filters. When a user selects one supplier from the Supplier filter, I want the Brand filter to hide all brands that are not provided by that supplier. Likewise, when a brand is selected, I want to hide the irrelevant products from the Products filter. I don't really care about what's being shown in the table at this point.
有什么办法可以实现这样的东西?
Is there any way to implement something like this?
推荐答案
为您提供示例-
http://jsfiddle.net/danabnormal/cjn2tbbm
您可以通过创建仪表板来做到这一点.在第61行附近,您可以看到在性别"下拉列表中所做的选择绑定到名称"下拉列表,从而限制了可以选择的名称.
You can do this by creating a Dashboard. At around line 61 you can see that the selection made in the 'Sex' drop down is bound to the 'Name' dropdown, thus limiting what Names can be selected.
dashboard.bind(filterSex, filterName);
dashboard.bind(filterSex, pieChart);
这篇关于Google图表-多个类别过滤器-限制选项?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!