@@ -421,6 +421,7 @@ function createGraph(
421421 xlen : number ,
422422 ylen : number ,
423423 byDate : boolean = false ,
424+ showDots : boolean = false ,
424425) {
425426 /**
426427 * Draws normalizedPoints to ctx. The top left of the graph is at x,y, and the graph should be xlen across and ylen down
@@ -668,6 +669,22 @@ function createGraph(
668669
669670 ctx . restore ( )
670671
672+ // Draw dots at each data point if enabled
673+ if ( showDots ) {
674+ for ( let i = 0 ; i < normalizedPoints . length ; i ++ ) {
675+ const p = normalizedPoints [ i ]
676+ const x = graphX + ( ( p . xVar - minX ) / xRange ) * graphXLen
677+ const y = convertToCanvasSpace ( p . rating )
678+ const color = getColor ( p . rating )
679+
680+ // Draw dot
681+ ctx . beginPath ( )
682+ ctx . arc ( x , y , 4 , 0 , Math . PI * 2 )
683+ ctx . fillStyle = color
684+ ctx . fill ( )
685+ }
686+ }
687+
671688 // Add y level labels
672689
673690 guideRatings . forEach ( ( r ) => {
@@ -1103,6 +1120,7 @@ export async function drawPlayerStatsCanvas(
11031120 queueName : string ,
11041121 playerData : StatsCanvasPlayerData ,
11051122 byDate : boolean ,
1123+ showDots : boolean = false ,
11061124) {
11071125 // Render at higher resolution for sharper text (2x, 4x, etc.)
11081126 // Higher scale = more anti-aliasing but larger file size
@@ -1156,7 +1174,7 @@ export async function drawPlayerStatsCanvas(
11561174
11571175 //graph
11581176 await addBlackBox ( ctx , 270 , 170 , 470 , 370 )
1159- createGraph ( ctx , playerData , queueName , 280 , 180 , 450 , 350 , byDate )
1177+ createGraph ( ctx , playerData , queueName , 280 , 180 , 450 , 350 , byDate , showDots )
11601178
11611179 // Export with high quality settings
11621180 return await canvas . toBuffer ( 'png' , {
0 commit comments