Odoo Help


Bar chart output format change

on 3/4/14, 2:50 AM 3,153 views

Actualoutput.bmp Expectedoutput.bmp

Openerp 7 Graph view i want to shows the output In X-axis Month Y-axis No of Count (Ex: Procedure Performed count)

The below Query is used:-

               row_number() over () as id,
               pm.name as procedure_performed, 
               count(pm.name) as count_performed, 
               to_char(invoice.procedure_date, 'MM') as month
               from patientprocedure invoice
               inner join procedureperformed_rel performed on performed.intake_id = invoice.id 
               left join proceduretypemaster pm on pm.id = performed.proceduretype_id
               group by 
               to_char(invoice.procedure_date, 'MM')

In the bar chart output shows Count of Procedure Performed values combined with the month and differentiate with colors.

Instead of how to shows the count of Procedure Performed separate based on month?.

please find the Attached screen shot for more clear...

Hi Prakash, did you get any output for this problem.

on 3/20/14, 9:31 AM

No not get exact solutions.

on 3/20/14, 9:35 AM

did you get near by result???

on 3/20/14, 9:46 AM



| 5 5 7
Bikaner, India

OpenERP Developer at SunARC Technology

On 3/20/14, 10:14 AM

Folder: addons\web_graph\static\src\js\graph.js

  make_graph: function (mode, container, data) {
            if (mode === 'area') { mode = 'line'; }
            var format = this.get_format(this['options_' + mode](data));
            console.log("DATA", data.data);
           return Flotr.draw(container, data.data, format);

Default Openerp above code is used to shows bar chart data value shows

Debug the data value it shows:-

data.data =  [{data:[[0,75]], label:"February"}, {data:[[0,400]], label:"March"}]  /* Both Month shows in same column */

After changing the data.data value into

data.data = [{data:[[0,75]], label:"February"},
                     {data:[[1,400]], label:"March"}];
/* Bar chart shows  different colour with separate column */**

But no idea about the above code changes js how to apply in dyamic in openerp ?

Let me know if any solution...

I think we have to do separate chart for this, Column chart is suitable for our problem. but i dont know how to do that. I dont have much knowledge in javascript.

on 3/21/14, 12:43 AM


Facing the same issue. Help me out if you have the nearby solution. I have tried by overriding graphWidget but not working at all. Please give any hint to be resolved.

on 12/8/16, 1:06 PM

About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

1 follower(s)


Asked: 3/4/14, 2:50 AM
Seen: 3153 times
Last updated: 12/8/16, 1:28 PM