You are on the right direction already with the above! The extra step that you would just have to do is to convert it into an array of Strings. Above is an array of Objects.
The idea is to create an array which will only contain strings as needed by the tm1-ui-chart.
There are a number of ways that you can go about it. To give an example, we will use a library that is within Canvas called Lodash. And this is how you can convert the above result to an array of string:
$scope.chartColors = []; // this is to initialize our array
// below is a utility function which lets you iterate over an array regardless of the type within, i.e. text, object, number
_.forEach(data.Cells, function(cell){
$scope.chartColors.push(cell.Value); // this is to insert the color property as string into our array
});
And lastly, note that the attribute tm1-color-scheme is not being watched. So on your HTML page, the tm1-ui-chart should only be initialized when the $scope.chartColors is populated. To do that, one way is to utilize ng-if on your page like so:
<tm1-ui-chart ... ng-if="chartColors.length > 0">
...
</tm1-ui-chart>
Let us know how it goes.
ā
Paul