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

release-23.2: ui: fix timezone formatting for bar charts #115220

Merged
merged 1 commit into from Nov 29, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -56,6 +56,7 @@ export const BarGraphTimeSeries: React.FC<BarGraphTimeSeriesProps> = ({
alignedData[0][0], // startMillis
alignedData[0][alignedData[0].length - 1], // endMillis
samplingIntervalMillis,
timezone,
);

const stackedData = stack(alignedData, () => false);
Expand Down
4 changes: 2 additions & 2 deletions pkg/ui/workspaces/cluster-ui/src/graphs/utils/domain.ts
Expand Up @@ -333,7 +333,7 @@ export function calculateYAxisDomain(
export function calculateXAxisDomain(
startMillis: number,
endMillis: number,
timezone = "UTC",
timezone = "Etc/UTC",
): AxisDomain {
return ComputeTimeAxisDomain([startMillis, endMillis] as Extent, timezone);
}
Expand All @@ -342,7 +342,7 @@ export function calculateXAxisDomainBarChart(
startMillis: number,
endMillis: number,
samplingIntervalMillis: number,
timezone = "UTC",
timezone = "Etc/UTC",
): AxisDomain {
// For bar charts, we want to render past endMillis to fully render the
// last bar. We should extend the x axis to the next sampling interval.
Expand Down