Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
1 ตอบกลับ
8328 มุมมอง

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.

ผู้เขียน

No not get exact solutions.

did you get near by result???

ผู้เขียน คำตอบที่ดีที่สุด

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.

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.

Related Posts ตอบกลับ มุมมอง กิจกรรม
0
ก.ค. 21
1687
1
พ.ค. 20
7395
0
เม.ย. 20
2905
0
พ.ย. 19
2411
2
เม.ย. 16
3162