@@ -303,7 +303,7 @@ void drawChart(
303
303
tickLabel.setAttribute (
304
304
'class' , 'downloads-chart-tick-label downloads-chart-tick-label-x' );
305
305
}
306
- tickLabel.text = formatAbbrMonthDay (date);
306
+ tickLabel.textContent = formatAbbrMonthDay (date);
307
307
tickLabel.setAttribute ('y' , '$tickLabelYCoordinate ' );
308
308
tickLabel.setAttribute ('x' , '$x ' );
309
309
@@ -321,7 +321,7 @@ void drawChart(
321
321
final suffix = displayMode == DisplayMode .percentage
322
322
? '%'
323
323
: compactFormat (i * interval).suffix;
324
- tickLabel.text = '${compactFormat (i * interval ).value }$suffix ' ;
324
+ tickLabel.textContent = '${compactFormat (i * interval ).value }$suffix ' ;
325
325
tickLabel.setAttribute ('x' , '${xMax + marginPadding }' );
326
326
tickLabel.setAttribute ('y' , '$y ' );
327
327
chart.append (tickLabel);
@@ -439,7 +439,7 @@ void drawChart(
439
439
440
440
final legendLabel = SVGTextElement ();
441
441
legendLabel.setAttribute ('class' , 'downloads-chart-tick-label' );
442
- legendLabel.text = ranges[i];
442
+ legendLabel.textContent = ranges[i];
443
443
chart.append (legendLabel);
444
444
chart.append (legend);
445
445
legends.add ((legend, legendLabel));
@@ -629,7 +629,7 @@ void drawChart(
629
629
'top:${e .y + toolTipOffsetFromMouse + document .scrollingElement !.scrollTop }px;$horizontalPosition ' );
630
630
toolTip.replaceChildren (HTMLDivElement ()
631
631
..setAttribute ('class' , 'downloads-chart-tooltip-date' )
632
- ..text =
632
+ ..textContent =
633
633
'${formatAbbrMonthDay (startDay )} - ${formatAbbrMonthDay (selectedDay )}' );
634
634
635
635
final downloads = values[nearestIndex];
@@ -641,14 +641,14 @@ void drawChart(
641
641
final square = HTMLDivElement ()
642
642
..setAttribute ('class' ,
643
643
'downloads-chart-tooltip-square ${squareColorClass (colorIndex (i ))}' );
644
- final rangeText = HTMLSpanElement ()..text = '${ranges [i ]}: ' ;
644
+ final rangeText = HTMLSpanElement ()..textContent = '${ranges [i ]}: ' ;
645
645
final suffix = (displayMode == DisplayMode .percentage)
646
646
? ' (${(downloads [i ] * 100 / totals [nearestIndex ]).toStringAsPrecision (2 )}%)'
647
647
: '' ;
648
648
final text = '${formatWithThousandSeperators (downloads [i ])}$suffix ' ;
649
649
final downloadsText = HTMLSpanElement ()
650
650
..setAttribute ('class' , 'downloads-chart-tooltip-downloads' )
651
- ..text = text;
651
+ ..textContent = text;
652
652
653
653
final tooltipRange = HTMLDivElement ()
654
654
..setAttribute ('class' , 'downloads-chart-tooltip-row' )
0 commit comments