googledatastudio / tooling

Apache License 2.0
68 stars 30 forks source link

tableObject should return both raw and formatted values, especially for dates format #145

Open RomainVialard opened 4 years ago

RomainVialard commented 4 years ago

Currently it is possible in Data Studio to select a date type for a date dimension: https://support.google.com/datastudio/answer/7443530?hl=en

When using the standard Table visualization, dates are correctly displayed depending on the selected date type.

But in Community Visualizations, the tableObject contains a number (YYYYMMDD) for each date and no formatted value (actually it's not even a number but a string). It would be great if the table Object could contain both the raw date value and the formatted value for each date.

This is also true for currencies.

Note that we do get the selected date format in the headers contained in the tableObject but it forces all viz builders to implement their own date formatting logic when this could be part of dscc.

RomainVialard commented 4 years ago

In Google Charts, cells in a DataTable can contain 2 different properties: