Change statistic text color with click handler

Hi @Justin_Fuqua! You could potentially accomplish this using a variable:

  • have a variable named "activeStatistic" with initial value set to null
  • in the statistic event handlers, call activeStatistic.setValue({{ self.id }}) on click
  • in the component styles, use a template string for the color like {{ activeStatistic.value === self.id ? 'blue' : 'black' }}
2 Likes