Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Question]: Export Time series data from line chart #1400

Closed
1 task done
jmarenin opened this issue Jun 24, 2022 · 8 comments
Closed
1 task done

[Question]: Export Time series data from line chart #1400

jmarenin opened this issue Jun 24, 2022 · 8 comments

Comments

@jmarenin
Copy link

Question for Carbon

I am currently trying to export the data that I am graphing on the carbon design line chart. However, when I export the data, instead of exporting the timestamp value such as '2022-06-23T17:50:00' it instead exports as 'June 24, 2022'. Is there any way to change this?

Code of Conduct

@joshblack joshblack transferred this issue from carbon-design-system/carbon Jun 27, 2022
@jmarenin
Copy link
Author

Any update on this?

@naegelin
Copy link

naegelin commented Nov 16, 2022

I can confirm this is the case for me as well. Also when one hovers over the time series line chart the tooltip only shows the day even if the granularity of the data is minute, hour, etc.

The behavior can be seen on the demo page here: https://codesandbox.io/s/5v1s9b?file=/App.svelte

@naegelin
Copy link

After a bit more digging it appears the problem lies in two places:

For the tabular data modal / export feature referenced by @jmarenin the following line needs to be fixed:
https://github.com/carbon-design-system/carbon-charts/blob/master/packages/core/src/model/cartesian-charts.ts#L75

For the issue with the tooltip:
https://github.com/carbon-design-system/carbon-charts/blob/master/packages/core/src/components/essentials/tooltip.ts#L253

and

https://github.com/carbon-design-system/carbon-charts/blob/master/packages/core/src/components/essentials/tooltip.ts#L259

I will see if I have some bandwidth this week to submit a PR.

@naegelin
Copy link

naegelin commented Nov 17, 2022

If anyone has any thoughts as to the proper representation of the date please let me know. ScaleType is called "TIME" so rationally it should probably reflect an actual date + time format such as :

'MMM d, yyyy HH:mm:ss'

While the above is nicely formatted for humans it isn't a great datetime format for machines as say epoch or

yyyy-MM-dd'T'HH:mm:ss*SSSZZZZ

@naegelin
Copy link

naegelin commented Jun 14, 2023

@theiliad This issue is approaching 1 year and we still don't have TIME level precision in chart tooltips or tabular data modal / csv exports making carbon charts meaningless for time series data. If carbon charts should only ever be used to represent day level data without time precision I think we should update the Carbon Design System documentation and tutorial and be explicit about it.

@Sheco
Copy link

Sheco commented Jun 15, 2023

I'm interested in this too.

@theiliad
Copy link
Member

theiliad commented Dec 9, 2023

This'll soon be address by our locale interface

@theiliad
Copy link
Member

You can also use tabularRepModal configs to customize values

https://charts.carbondesignsystem.com/documentation/interfaces/interfaces.BaseChartOptions.html#tabularRepModal

@github-project-automation github-project-automation bot moved this from Todo to ✅ Done in @carbon/charts Jan 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: ✅ Done
Development

No branches or pull requests

4 participants