How to use Google Chart when pivot table is in Flat mode?


Hi, I am able to show a pie chart with classic type of pivot table, but when I set the type to flat by default the chart was unable to show.
Here is the error

core.js:15724 ERROR TypeError: Cannot read property 'members' of undefined
at A4n.composeData (webdatarocks.js:6)
at A4n.getData (webdatarocks.js:6)
at R1n.getData (webdatarocks.js:6)
at I5v.getData (webdatarocks.js:6)
at Object.PivotApi.W1C.getData (webdatarocks.js:6)
at Object.WebDataRocksGooglecharts.getData (webdatarocks.googlecharts.js:31)
at ByProductComponent.push../src/app/pages/product-report/by-product/by-product.component.ts.ByProductComponent.createGoogleChart (by-product.component.ts:111)
at ByProductComponent.push../src/app/pages/product-report/by-product/by-product.component.ts.ByProductComponent.onReportComplete (by-product.component.ts:99)
at SafeSubscriber._next (outlet.service.ts:387)
at SafeSubscriber.push../node_modules/rxjs/_esm5/internal/Subscriber.js.SafeSubscriber.__tryOrUnsub (Subscriber.js:196)

Thank you.

1 answer

WebDataRocks Team WebDataRocks 6 days ago

Hi, Elisa,

Thank you for writing to us.

We would like to specify that getData method was designed to help get already aggregated data for charts. As a result, it is capable of returning aggregated data only (from compact mode and classic mode). You can get the raw data directly from the data source.
Hope it helps.
WebDataRocks Team

Please login or Register to Submit Answer