Chartjs-Set color from datasource like you would set argumentField or valueField?

1👍

The solution is as follows, you need to add the customize_point field with indicated return:

dxPieChart: {
    dataSource: dsAlarmsBySeverity,
    ...,
    customizePoint: function (point) {
        return {
            color: dsAlarmsBySeverity[point.index].color
        }
    }
}

Leave a comment