简体   繁体   English

如何使用 Webdatarocks 获取列的总计并在图表中使用它

[英]How to get Grand Total of a column using Webdatarocks and use it in charts

I am using Webdatarocks Pivot table.我正在使用 Webdatarocks Pivot 表。 I get GrandTotal at the bottom of Grid, I want use this Grand Total in the Charts.我在网格底部得到了总计,我想在图表中使用这个总计。 I checked community but I am unable to find appropriate function which can provide me value of my GrandTotal.我检查了社区,但找不到合适的 function 可以为我提供 GrandTotal 的价值。

I checked functions in Documentation like getAllMeasures(), getReport() etc. but none of them returns GrandTotal.我检查了文档中的函数,如 getAllMeasures()、getReport() 等,但它们都没有返回 GrandTotal。

There is one way where I can calculate GrandTotal using Javascript function, but in my case GrandTotal will change soon I apply filters in Pivot table.有一种方法可以使用 Javascript function 计算 GrandTotal,但在我的情况下,GrandTotal 将很快改变,我在 Pivot 表中应用过滤器。 Please advice how to get them in order to use them intermediately.请建议如何获取它们以便在中间使用它们。

There isn't a specific API call you could use to retrieve the grand total.没有可用于检索总计的特定 API 调用。

You could though use the update event handler to trigger your own grand total calculation every time a new filter is applied.您可以在每次应用新过滤器时使用更新事件处理程序来触发您自己的总计计算。

EDIT: On second thought, you could actually use the getData() method for this – among everything else, it returns the grand total value.编辑:再想一想,您实际上可以为此使用getData()方法——除此之外,它返回总计值。 More on this here .更多关于这个here

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM