Odoo Help

Welcome!

This community 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.

1

Bar chart output format change

By
Prakash
on 3/4/14, 2:50 AM 2,124 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:-

select  
               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 
               pm.name,
               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.

sridhar
on 3/20/14, 9:31 AM

No not get exact solutions.

Prakash
on 3/20/14, 9:35 AM

did you get near by result???

sridhar
on 3/20/14, 9:46 AM
0

Prakash

--Prakash--
3173
| 5 4 7
Bikaner, India
--Prakash--

OpenERP Devloper at SunARC Technology

Prakash
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.

sridhar
on 3/21/14, 12:43 AM

Hi,

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.

Chandni
on 12/8/16, 1:06 PM

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

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