也与PBIE合作。目前,没有合法的方法可以通过API或SDK自定义/隐藏可视化窗格。你总是可以使用jQuery选择器隐藏东西。因为想法只是在rendered
上设置事件处理程序然后尝试类似$(".visual-types-container button").slice(0,24).each(function(elem) { $(this).remove();})
Plus处理特殊情况,如展开/折叠窗格:
$("article.visualizationPane button.toggleBtn").on("click", function() {
var parent = $("article.visualizationPane");
console.log("catch");
if(!parent.hasClass("isCollapsed"))
{
var showVisuals = ["Slicer", "Table", "Matrix"];
$("article.visualizationPane div.visual-types-container button").filter(function()
{
return -1 == showVisuals.indexOf($(this).attr("title"))
}).each(function() {
$(this).remove();
});
}
});
一旦微软通过新的UI设计发布更改,一切都可以被打破。