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

[Lens] Date formatter #67206

Closed
Tracked by #184648
wylieconlon opened this issue May 21, 2020 · 9 comments
Closed
Tracked by #184648

[Lens] Date formatter #67206

wylieconlon opened this issue May 21, 2020 · 9 comments
Labels
enhancement New value added to drive a business result Feature:Lens 🧊 iceboxed impact:needs-assessment Product and/or Engineering needs to evaluate the impact of the change. Team:Visualizations Visualization editors, elastic-charts and infrastructure

Comments

@wylieconlon
Copy link
Contributor

wylieconlon commented May 21, 2020

The Lens editor should allow date formatting where users can control date format and timezone on each date aggregation. This will give visualization authors the ability to add local settings that aren't part of the Kibana defaults, such as day of week or AM/PM formatting.

The most important options are:

  • Default date formatter
  • Moment.js custom format

But I think we would be missing options with just those two, so I also propose that add the following options:

  • ISO8601 (YYYY-MM-DDTHH:mm:ssZ)
  • YYYY-MM-DD
  • YY-MM-DD
  • MM/DD
  • HH:mm:ssss (16:42:999)
  • h:mm a (12:23 pm)

Previous requests for the other editors:

Per visualization formatters #4957
Custom date formats in visualization #13784

Related issue for Lens:

Multi-scale date formatter #51227

@wylieconlon wylieconlon added Team:Visualizations Visualization editors, elastic-charts and infrastructure Feature:Lens :Lens/basic-expectation labels May 21, 2020
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-app (Team:KibanaApp)

@timroes
Copy link
Contributor

timroes commented Jun 3, 2020

As of the discussion in our meeting, I think we should not let the user customize the time zone per field formatter. There are just too many confusions and edge cases around having charts with different timezones on one dashboard. First this is absolutely unintuitive for the user, also with multiple layers a user could create a chart with multiple layers on different timezones which will be close to not-understandable. Also we don't want to create a mismatch between the formatting time zone and the query time zone which would be complicated by this a lot.

@wylieconlon
Copy link
Contributor Author

Updated the description to remove time zone, as I agree that it is not as useful.

@wylieconlon
Copy link
Contributor Author

We should implement this on the index pattern datasource, because this will let the formatting be shared when switching between visualizations.

@ghudgins
Copy link
Contributor

ghudgins commented Jun 29, 2021

+1

it would be good to be able to set the datetime formatting from the visualisation rather that the global index pattern. looks like lens doesn’t support and date formating even when set in the index pattern

@wylieconlon
Copy link
Contributor Author

@ghudgins Right, the reason is that Lens (and other visualizations) use the dateFormat:scaled options instead of the index pattern date formatter, which has both benefits and downsides. It would be helpful to collect a list of user expectations/requirements for date formatting since my list above is purely my opinion..

@Karrade7
Copy link

I ran into this same issue. Putting in my experience as an end user.
Requirements:

  • metric saved in index to show events per second for a 15 minute period, saved every 15 minutes
  • show lens data table of this metric for every reading, i.e. minimum interval 15 minutes
  • show data across 30 days (resulting in 2880 data points)
  • export to CSV

When I did this the problem was the data table only showed minutes and seconds, not the date.
I fixed it via support to change the global auto scale value.

I could see a similar reasoning for CPU, memory or other stats situations. Its especially useful when you add formulas.

@philippkahr
Copy link
Contributor

It would be great if we can have the possibility to modify date format directly like we can for Number, Percent, ... within the chart.

.e.g in this metric visualisation I have a monthly view and changing it to be like Nov/22, November '22, would be awesome.

For the number I can add a prefix + the count of decimals. Maybe for date formatting I can have a default suggestion with YYYY-MM-DD and I can do the usual MMM/YY stuff that I know from the standard date formatting libraries?

image (24)

@stratoula stratoula added the impact:needs-assessment Product and/or Engineering needs to evaluate the impact of the change. label Sep 20, 2023
@markov00
Copy link
Member

markov00 commented Jun 3, 2024

In order to provide better transparency of priorities, issues that will not be prioritized within the next 24 months are being closed.

Tracking request in Lens general improvements ice box #184648

@markov00 markov00 closed this as not planned Won't fix, can't repro, duplicate, stale Jun 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New value added to drive a business result Feature:Lens 🧊 iceboxed impact:needs-assessment Product and/or Engineering needs to evaluate the impact of the change. Team:Visualizations Visualization editors, elastic-charts and infrastructure
Projects
None yet
Development

Successfully merging a pull request may close this issue.

9 participants