Skip to content

Commit

Permalink
changing the date formatter of orbital data graph
Browse files Browse the repository at this point in the history
  • Loading branch information
Thibault Camlane committed Jul 16, 2025
1 parent 9115906 commit f97e0bd
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion frontend/src/lib/chartTemplate.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,12 @@ export function createStockChartBaseConfig({
): string {
const extremes = this.axis.getExtremes();
const zoomLevel = extremes.max - extremes.min; // Get the current zoom range
if (zoomLevel <= 10 * 12 * 30 * 24 * 3600 * 1000) {
if (zoomLevel <= 12 * 30 * 24 * 3600 * 1000) {
return Highcharts.dateFormat(
"%d %b %Y",
Number(this.value),
); // Show day, month, and year
} else if (zoomLevel <= 10 * 12 * 30 * 24 * 3600 * 1000) {
// If zoomed in to less than or equal to 1 month
return Highcharts.dateFormat(
"%b %Y",
Expand Down

0 comments on commit f97e0bd

Please sign in to comment.