vscode-data-preview
vscode-data-preview copied to clipboard
add numbers and date format config options and example
based on user feedback from Tolga: https://marketplace.visualstudio.com/items?itemName=RandomFractalsInc.vscode-data-preview&ssr=false#review-details
see perspectivejs docs with more info on recently added custom types support:
https://perspective.finos.org/docs/md/usage.html#customizing-behavior-with-perspectiveconfigjs
and this example with worker perspective config setup for custom types and formatting to integrate this new feature in data preview webview:
https://github.com/finos/perspective/blob/master/examples/simple/superstore-themed.html
Hi friend, do you have a more detailed explanation about the display precision configuration of floating point numbers? I tried everything but it didn't work.thanks
@wxqwinner I have not worked on this yet, but basically data view config will have new types structure with some default for floats and dates that you will be able to change similar to this setup: https://github.com/finos/perspective/blob/master/examples/simple/superstore-themed.html#L72
perspective lib docs are really bad on this part & config options :(
found this gem for adding readable dates on saves:
https://github.com/finos/perspective/pull/695/commits/389d57eb76df3ba036cdd4bcbe69a93a4a142972
will use it as a template for the date formatting hooks, default ext. setting and config options for this update
will add ISO date default setting and date locale config options in the next v2.x release ...
Just adding my '+1' to the "need a fix for unwanted rounding of floats".
For example I often have csv datasets with column value ranges of 0.0001 to 0.9999 (and sadly for this issue, heavily skewed to the 0.0000 to 0.0099 range) that get rounded to 2 decimals when shown by the extension. This of course makes the data shown pretty inaccurate.
Aside from that the extension is pretty useful and I'm thankful for your efforts!
Hey, I run in the same problem, unfortunately.
New Tabular Data Viewer v1.6.0 I will be releasing today uses updated Perspective viewer library and plugins, provides some rudimentary data streaming for large data files, better config save/restore view options, and precision you can set for numeric columns:
https://github.com/RandomFractals/tabular-data-viewer/blob/main/CHANGELOG.md#v160---2022-01-24
Example:
I got really confused today looking at the source JSON display dates in Y-m-d format but using this extension, it was m/d/y. Would love to be able to configure a prefered format.
Both links in a early comment, https://github.com/RandomFractals/vscode-data-preview/issues/156#issuecomment-540029020, are 404'ing.