Hello everyone!
I was implementing an old version of outsystems charts (1.3.7), then upgraded to the latest (2.2.0), but I can no longer assign colors globally in two of the four charts. Could you help me understand how to do it for the other cases?
I attach an OML where the same implementation is done, but as I mentioned it doesn't work on all chart types.
Saludos!
Jorge Orellana
Hi Jorge,
In the latest changes of Outsystems Charts you have to put in the colors by series and not by the HighChartsJSON, you must add the colors to your logic structure.
Regards,
William
Good question, I did some testing on this and was unable to understand exactly why this is happing, it seems to be overriding the global colours with the ones set on the DataPoint.Color and since nothing is specified the Highcharts sets it for you or it's something I'm not seeing.
What I would suggest is to ignore the SourceDataPointList and use the AdvanceFormat.HighchartsJSON for everything. For this just create a empty local var of the data type DataPoint List, set it on the SourceDataPointList, then for the column chart example set the AdvanceFormat.HighchartsJSON string as:
"colors: ['#42E8B4', '#2FCBF1', '#FD6C98'], series: [{name: 'Series 1', data: [1, 2]}]"
Note, this will force you to build at least the series string before delivering it to the extension.
Saludos,
Rúben