@@ -29,7 +29,6 @@ function parseAnyYMD(dateStr: string): Date | null {
2929 return new Date ( y , m - 1 , d ) ;
3030}
3131
32- /** Must match dataProcessor.ts formatDate(): YYYY/MM/DD */
3332function toKey ( date : Date ) : string {
3433 const year = date . getFullYear ( ) ;
3534 const month = String ( date . getMonth ( ) + 1 ) . padStart ( 2 , '0' ) ;
@@ -45,21 +44,25 @@ function splitCsv(input: string): string[] {
4544}
4645
4746function rotateWeek ( labelsSunFirst : string [ ] , weekStart : 'sunday' | 'monday' ) : string [ ] {
48- // Input is always Sun..Sat
4947 if ( labelsSunFirst . length !== 7 ) {
5048 return labelsSunFirst ;
5149 }
52- return weekStart === 'monday'
53- ? [ ...labelsSunFirst . slice ( 1 ) , labelsSunFirst [ 0 ] ] // Mon..Sat + Sun
54- : labelsSunFirst ; // Sun..Sat
50+ return weekStart === 'monday' ? [ ...labelsSunFirst . slice ( 1 ) , labelsSunFirst [ 0 ] ] : labelsSunFirst ;
5551}
5652
57- export const CalendarHeatmapPanel : React . FC < Props > = ( { data, width, height, options, timeRange } ) => {
53+ export const CalendarHeatmapPanel : React . FC < Props > = ( {
54+ data,
55+ width,
56+ height,
57+ options,
58+ timeRange,
59+ timeZone,
60+ } ) => {
5861 const theme = useTheme2 ( ) ;
5962
6063 const heatmapData = useMemo ( ( ) => {
61- return processTimeSeriesData ( data . series , options . aggregation ) ;
62- } , [ data . series , options . aggregation ] ) ;
64+ return processTimeSeriesData ( data . series , options . aggregation , timeZone ) ;
65+ } , [ data . series , options . aggregation , timeZone ] ) ;
6366
6467 const countByOriginalDate = useMemo ( ( ) => {
6568 const m = new Map < string , number > ( ) ;
@@ -71,7 +74,6 @@ export const CalendarHeatmapPanel: React.FC<Props> = ({ data, width, height, opt
7174
7275 const rawStartDate = useMemo ( ( ) => new Date ( timeRange . from . valueOf ( ) ) , [ timeRange . from ] ) ;
7376 const rawEndDate = useMemo ( ( ) => new Date ( timeRange . to . valueOf ( ) ) , [ timeRange . to ] ) ;
74-
7577 const availableWidth = useMemo ( ( ) => Math . max ( 0 , width - 32 ) , [ width ] ) ;
7678
7779 // Monday-first: shift render dates by -1 day to rotate weekday rows so Sunday becomes last
0 commit comments