-
Notifications
You must be signed in to change notification settings - Fork 8.5k
[Lens] Ability to define first day that starts the week on date histogram axis #178115
Copy link
Copy link
Open
Labels
Feature:LensTeam:VisualizationsTeam label for Lens, elastic-charts, Graph, legacy editors (TSVB, Visualize, Timelion) t//Team label for Lens, elastic-charts, Graph, legacy editors (TSVB, Visualize, Timelion) t//bugFixes for quality problems that affect the customer experienceFixes for quality problems that affect the customer experienceimpact:mediumAddressing this issue will have a medium level of impact on the quality/strength of our product.Addressing this issue will have a medium level of impact on the quality/strength of our product.
Metadata
Metadata
Assignees
Labels
Feature:LensTeam:VisualizationsTeam label for Lens, elastic-charts, Graph, legacy editors (TSVB, Visualize, Timelion) t//Team label for Lens, elastic-charts, Graph, legacy editors (TSVB, Visualize, Timelion) t//bugFixes for quality problems that affect the customer experienceFixes for quality problems that affect the customer experienceimpact:mediumAddressing this issue will have a medium level of impact on the quality/strength of our product.Addressing this issue will have a medium level of impact on the quality/strength of our product.
Type
Fields
Give feedbackNo fields configured for issues without a type.
Describe the feature:
In Kibana there's the
dateFormat:dowsetting who defines the default day for the beginning of a week.Passed to moment
weekoption here...kibana/packages/core/integrations/core-integrations-browser-internal/src/moment/moment_service.ts
Lines 31 to 39 in 1b646bb
Moment defines this option in their docs here, but affect
startOfandendOflogic.Chart bins are determined based on the data passed to charts, this would require using the
offsetoption of thedate_histogramaggregation.This information is not picked up correctly by Lens when displaying on a weekly bucket.

In this example I'm using the ecommerce sample dataset and setting a
minimum intervalofweekfor the date histogram (on a 3 months timespan):Note how both the axis and tooltip pick ups the Monday dates for each week bucket.