Forum Discussion
turtleData123
04-26-2024Cloud Apps
I was able to find/create a script that worked for what I was trying to do, I used the following code which worked:
widget.on('processresult', function(e, v) {
var results = v.result.series[0];
maxItems = Math.max.apply(Math, results.data.map(function(el) {
return el.y;
}));
try {
maxFilterItems = results.data.filter(el => el.y == maxItems);
console.log(maxFilterItems);
$(maxFilterItems).each(function(index, value) {
value.color = 'Orange';
});
} catch (error) {
console.error('error: ', error);
};
});
This recolors the bar with the highest value on a Column Chart widget. I don't know why those other functions don't work, though, any comment would be great
DRay
04-29-2024Admin
Hi turtleData123,
Do those functions work on other Widgets?
- turtleData12305-01-2024Cloud Apps
Good question - I'm trying it now - results are no, they do not