How to colour code data points according to the associated label in a time series graph?

Followed the suggestion from this answer.

Added the $sort($,function($l,$r) {$l.timestamp > $r.timestamp }) jsonata query but still no change in the visualizations.