This script was used when there was a requirement to allow users to apply a ranking to a chart,
we wanted a text box to dynamically display “Top 5” or “Top whatever number the user selected”
You could place this in the onSelect event for a chart
var text = 'top ' + ConvertUtils.numberToString( Chart_1.getDataSource().getResultSet().length);
Text_1.applyText(text);
Code language: JavaScript (javascript)
