Odoo Help


Thousand separator in web_graph OpenERP 7.0 ??

on 5/4/15, 7:26 AM 619 views


In openErp 7, is there any solution to force label in yaxis in web graph(Line graph) to be displayed with the thousand separator, for example:





| 5 4 7
Bikaner, India

OpenERP Devloper at SunARC Technology

On 5/4/15, 9:21 AM

 In Sale Report Y-axis add amount with format using the below code:-


    make_graph: function (mode, container, data) {
if (mode === 'area') { mode = 'line'; }
var format = this.get_format(this['options_' + mode](data));
/* ADD Y axis Amount in Sale Report */
if (this.dataset.model == 'sale.report')
xy_value = data.data[0]['data'][0]; //xy_value contains x, y axis value 0, 10200
var str = xy_value.toString(); // Object value convert into string
var n = str.substr(str.indexOf(",") + 1); // Get aftercomma value
//format['xaxis']['title'] = 'x-axis title';
format['yaxis']['title'] = parseInt(n).toLocaleString('en-US', {minimumFractionDigits: 2}); //Format value
/* End */
return Flotr.draw(container, data.data, format);

Hi Prakash, thak you for your answer but this add a number in the left of Graph, not add a seprator to values in the yaxis

on 5/4/15, 10:09 AM

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 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: 5/4/15, 7:26 AM
Seen: 619 times
Last updated: 5/4/15, 9:21 AM