hey @xhlu this is a great product, thank you for the effort, i have two minor questions
Is there a way to set the precision of the computed field (in my case Sum) for some reason it only goes 2 decimal places out, even if the column being summed has a longer float32 object
In an ideal world, I would like the option to hide the the selection windows, and only display the resulting pivotTable, I wasnât exactly sure if this is possible, what would be the best approach, also to hide it in the CSS ?
This keeps Output UI with what ever youâve defined as the input in your code to generate the table.
My use case is I need to display data in a pivot form with multi column and multi index. Spent most of the day trying different table render solutions for pivot data but none seemed to work how I was hoping with a multi index and column pivot. This seemed to be the best result but I was stuck with the outer UI. I donât need the Drag and Drop function for this table and I didnât want to waste screen real-estate on the drag and drop UI.
.pvtAxisContainer does the left UI
.pvtVals does the top UI
.pvtRenderers does the dropdown UI
You can pick which to hide, for example if you want to lock the data but still give the user the dropdown to change between table/graphs only include these two:
Edit following up: Oddly enough the pvt.Dropdown did remove the dropdown⌠until I deployed the app with the changes lol. Actually thinking back it might disable until page refresh which re-renders the dropdown as the pvtRenderers was still on. The actual way to disable it is with pvtRenderers Iâve updated the code bocks above to the correct values
@useradam_123 I just read your post after making my post above with the follow up ends.
I have your answer for question 2 I had the same question today and figured out the solution. You can pick and choose which UI inputs to render see my post above this reply.
Hey Adam I finally was requested by a user to have some changes to a pivot table with the decimals. I found the way to adjust the decimal rendering by editing the JS file.
Go to your folder where your python environment is located and path to:
replace the 2 with what ever you want then save the file.
In my case I didnât want to display any decimals so rounded and converted to int and still would display at 100.00
I set mine to be:
digitsAfterDecimal: 0,\n
If your app is in production you will need to re-load it for the change to apply.
In theory you can adjust other things in this same area if you want to tweak how the numbers are displayed, like change the thousand and decimal separators.
Example $1,234.56 can be changed to display as âŹ1.234,56
is there a way to do it via overwrites without having to edit the underlying package via a patch. this wont work in production the way our deployments are configured.
wrap your PivotTable() with html.Div(key=unique_id ,âŚ), unique_id = f"pivot-{n_clicks}", everything will ok, interactive with other filtering components.
I had tested through!