如何编辑CDE仪表板中的默认工具提示?如果这样的饼图工具提示:在CDE仪表板中编辑工具提示
Series: Fuel
Category : D
Value: 0.15
我想将Series,Category,Value更改为其他标题。 Thankyou
如何编辑CDE仪表板中的默认工具提示?如果这样的饼图工具提示:在CDE仪表板中编辑工具提示
Series: Fuel
Category : D
Value: 0.15
我想将Series,Category,Value更改为其他标题。 Thankyou
要更改CDEditor工具提示,请将此函数添加到Post Fetch中。
function f(data) {
this.chartDefinition.dimensions = {
series: {isHidden: true},
category: {label: "Category"},
value: {label: "Value" }
};
return data;
}
这里是Pentaho的论坛链接:http://forums.pentaho.com/showthread.php?141559-Edit-Tooltip-in-CDE-dashboard
我想,和它的工作。
复制原来的答案,从Pentaho的论坛到这里Mogsdad这表明:
,显示在每个值的提示标签是相应尺寸的标签。
如果您想显示完全不同的工具提示,则必须指定选项tooltipFormat。
如果您只是想更改显示的标签,则只需更改尺寸的标签。
因为可以使用任意名称定义维(即使默认名称是众所周知的),所以没有固定的CDE属性。 必须在JS代码中更改名称。
更改默认尺寸的标签
下面的代码添加到CDE图表组件的postFetch处理程序:
代码:
function f(data) { // Change the labels of the default dimensions // See http://www.webdetails.pt/charts/jsdoc/symbols/pvc.options.charts.Chart.html#dimensions this.chartDefinition.dimensions = { series: {label: "Product Family"}, category: {label: "Period"}, value: {label: "Sales" } }; return data; }
更改尺寸的名称和标签
还可以更改维度的名称以匹配相应业务概念的名称:
代码:
function f(data) { var options = this.chartDefinition; // It is not necessary to explicitly define dimensions // They are created automatically, with appropriate default properties, // when referring to their names in certain other properties. // But we can define them anyway, if we want to change the default labels. // Default labels are taken from the data source, when possible, // or derived from the dimensions' names. // See http://www.webdetails.pt/charts/jsdo...tml#dimensions this.chartDefinition.dimensions = { productFamily: {label: "Product Family"}, period: {label: "Period"}, sales: {label: "Sales" } }; // MAP columns in the data source to corresponding dimensions // See http://www.webdetails.pt/charts/jsdo...t.html#readers options.readers = [{names: "productFamily, period, sales"}]; // MAP dimensions to the chart's Visual Roles // See http://www.webdetails.pt/charts/jsdo...ml#visualRoles // The following can also be set as CDE properties. // The "series" role receives the data of the "productFamily" dimension // See http://www.webdetails.pt/charts/jsdo...tml#seriesRole options.seriesRole = "productFamily"; // The "category" role receives the data of the "period" dimension // See http://www.webdetails.pt/charts/jsdo...l#categoryRole options.categoryRole = "period"; // The "value" role receives the data of the "sales" dimension // See http://www.webdetails.pt/charts/jsdo...html#valueRole options.valueRole = "sales"; return data; }
我已经回答,把这个功能前执行函数f(){系列:图标:somethingchange]} – 2013-05-09 06:42:45