Skip to content

Commit

Permalink
Merge pull request #2949 from andrewbaldwin44/bugfix/echarts-locale-time
Browse files Browse the repository at this point in the history
Webui Echarts Time Axis Should be Localized
  • Loading branch information
cyberw authored Oct 22, 2024
2 parents cf73ad3 + 2102d3d commit 5dde590
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions locust/webui/src/components/LineChart/LineChart.utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,15 +56,7 @@ const createYAxis = <ChartType>({
} as YAXisComponentOption;
};

const formatTimeAxis = (value: string) => {
const date = new Date(value);

return [
padStart(date.getHours(), 2),
padStart(date.getMinutes(), 2),
padStart(date.getSeconds(), 2),
].join(':');
};
const formatTimeAxis = (value: string) => new Date(value).toLocaleTimeString();

const renderChartTooltipValue = <ChartType>({
chartValueFormatter,
Expand Down

0 comments on commit 5dde590

Please sign in to comment.