vscode-data-preview icon indicating copy to clipboard operation
vscode-data-preview copied to clipboard

add numbers and date format config options and example

Open RandomFractals opened this issue 4 years ago • 9 comments

based on user feedback from Tolga: https://marketplace.visualstudio.com/items?itemName=RandomFractalsInc.vscode-data-preview&ssr=false#review-details

RandomFractals avatar Oct 09 '19 11:10 RandomFractals

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

RandomFractals avatar Oct 09 '19 14:10 RandomFractals

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 avatar Dec 06 '19 03:12 wxqwinner

@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

RandomFractals avatar Dec 06 '19 14:12 RandomFractals

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

RandomFractals avatar Jan 20 '20 01:01 RandomFractals

will add ISO date default setting and date locale config options in the next v2.x release ...

RandomFractals avatar Jan 21 '20 20:01 RandomFractals

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!

jcro21 avatar Dec 15 '21 08:12 jcro21

Hey, I run in the same problem, unfortunately.

igorsdub avatar Jan 22 '22 10:01 igorsdub

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:

tabular-data-view-perspective-datagrid-numeric-data-precision

RandomFractals avatar Jan 24 '22 13:01 RandomFractals

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.

tyler36 avatar May 12 '23 05:05 tyler36