how to customize bar color in graph view basead on field state.
need the color of the column in the chart to be based on
state = fields.Selection(
[('green', 'Green'),
('yellow', 'Yellow'),
('red', 'Red'),],
string="State", index=True)
custom_render.js
odoo.define('organizational_climate_outtech.custom_graph_renderer', function (require) {
"use strict";
var GraphRenderer = require('web.GraphRenderer');
var core = require('web.core');
var CustomGraphRenderer = GraphRenderer.extend({
// Adicione sua lógica personalizada aqui
COLORS: ["#0c774f", "#ff0017", "#ffef45",],
});
return CustomGraphRenderer;
});