Fix a StringIndexOutOfBoundsException in JSChartUtil when the tagObjectList is empty

Fix a StringIndexOutOfBoundsException, count issues, and scenario status issues.