pivottable icon indicating copy to clipboard operation
pivottable copied to clipboard

Integrating PivotUI into my application

Open ericus2307 opened this issue 5 years ago • 1 comments

Good day I use an application called WebDev to develop web applications. I would like to offer users a Pivot Table experience.

I have included pivot.js in my application and just trying your pivot demo. A button executes the following javascript code. PAGE is how to reference my page and A2 is the control (cell) in which the pivot must be displayed.

$("PAGE#A2").pivotUI( $.pivotUtilities.tipsData, { rows: ["sex", "smoker"], cols: ["day", "time"], vals: ["tip", "total_bill"], aggregatorName: "Sum over Sum", rendererName: "Heatmap" });

However I get these messages in my browser:

$("PAGE#A2").pivotUI( $.pivotUtilities.tipsData, { rows: ["sex", "smoker"], cols: ["day", "time"], vals: ["tip", "total_bill"], aggregatorName: "Sum over Sum", rendererName: "Heatmap" });

pivot.coffee:1043 Error: unknown input format at Function.PivotData.forEachRecord (pivot.coffee:356) at init.$.fn.pivotUI (pivot.coffee:697) at sB0AAAAAAAAAAPEOaPUNRsRRw_g:34 at u (WDUtil.js?3ffff93871220:3) at HTMLButtonElement.onclick (sB0AAAAAAAAAAPEOaPUNRsRRw_g:16) $.fn.pivotUI @ pivot.coffee:1043 WDAJAX.js?3000b93871220:3 [Deprecation] Synchronous XMLHttpRequest on the main thread is deprecated because of its detrimental effects to the end user's experience. For more help, check https://xhr.spec.whatwg.org/. WDAJAXRequete.xEnvoi @ WDAJAX.js?3000b93871220:3

Thank you in advance for assistance.

ericus2307 avatar Sep 14 '20 11:09 ericus2307

The error you're seeing here is Error: unknown input format and it looks like you're trying to use the sample data $.pivotUtilities.tipsData. Are you loading the following file? https://cdnjs.cloudflare.com/ajax/libs/pivottable/2.6.0/tips_data.min.js ... this is where the tips data lives :)

nicolaskruchten avatar Sep 14 '20 16:09 nicolaskruchten