You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2019/03/09 10:15:49 UTC
[GitHub] [incubator-superset] heavencoder commented on issue #6622: Pivot
Table digital data display issue
heavencoder commented on issue #6622: Pivot Table digital data display issue
URL: https://github.com/apache/incubator-superset/issues/6622#issuecomment-471164421
> Data display format can be set in pivot options, and in this case, it may be necessary to keep the integer format
Thanks for your suggestions. But It dosen't work. And I've fix this problem already. First, in viz.py, it render query data into html by pandas's to_html() function. This function will change float numbers into 'x.xxxxxxe+07’ style by default, it omits the last two digits if there is 9 digits, and then return html string to borrowser. And at the mean time, Js also repsent a long number as 'x.xxxxxxe+07’ style, I also need to re-format this number.
To fix it, I add an parameter 'float_format' to to_html() function at viz.py like this:

And change src/visualizations/PivotTable/PivotTable.js like this:

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org