diff options
| author | Vo Minh Thu <vmt@openerp.com> | 2011-02-07 13:57:23 +0100 |
|---|---|---|
| committer | Vo Minh Thu <vmt@openerp.com> | 2011-02-07 13:57:23 +0100 |
| commit | f8572e5c602798f37c2a94d54ab5e3ac79ff0185 (patch) | |
| tree | 35687977b932ac91bd31fece229ab78cc70926f5 /bin/pychart/linear_coord.py | |
| parent | 9c287abc143a7b187635c75751a29baeefa58c15 (diff) | |
[IMP] openerp python module.
- Some logging code moved from netsvc.py to loglevels.py
- Changed imports to use the new openerp module
- config and netsvc initialization calls move to openerp-server.py
- Moved openerp-server.py outside the old bin directory
- Some imports in tools moved inside the methods to break mutual-dependencies
bzr revid: vmt@openerp.com-20110207125723-ooee7d7ng5elmkso
Diffstat (limited to 'bin/pychart/linear_coord.py')
| -rw-r--r-- | bin/pychart/linear_coord.py | 38 |
1 files changed, 0 insertions, 38 deletions
diff --git a/bin/pychart/linear_coord.py b/bin/pychart/linear_coord.py deleted file mode 100644 index b21075c1860..00000000000 --- a/bin/pychart/linear_coord.py +++ /dev/null @@ -1,38 +0,0 @@ -# -*- coding: utf-8 -*- -# -# Copyright (C) 2000-2005 by Yasushi Saito (yasushi.saito@gmail.com) -# -# Jockey is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by the -# Free Software Foundation; either version 2, or (at your option) any -# later version. -# -# Jockey is distributed in the hope that it will be useful, but WITHOUT -# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -# for more details. -# -import coord -import math -import pychart_util - -class T(coord.T): - def get_canvas_pos(self, size, val, min, max2): - return size * (val - min) / max(float(max2 - min),0.01) - - def get_tics(self, min, max, interval): - v = [] - x = min - while x <= max: - v.append(x) - x += interval - return v - def get_min_max(self, dmin, dmax, interval): - if not interval: - if dmax == dmin: - interval = 10 - else: - interval = 10 ** (float(int(math.log(dmax-dmin)/math.log(10)))) - dmin = min(dmin, pychart_util.round_down(dmin, interval)) - dmax = max(dmax, pychart_util.round_up(dmax, interval) + interval/2.0) - return dmin, dmax, interval |
