Permalink
Browse files

more gchart update

git-svn-id: https://pyjamas.svn.sourceforge.net/svnroot/pyjamas/trunk@1476 7a2bd370-bda8-463c-979e-2900ccfb811e
  • Loading branch information...
1 parent d90ac74 commit 6eeab1c2751eeed4889a3c7f84fba6446a27c769 lkcl committed Aug 28, 2009
@@ -46,8 +46,9 @@ def __init__(self):
self.getCurve().getSymbol().setBorderWidth(1)
for jGroup in range(len(groupLabels)):
# the '+1' creates a bar-sized gap between groups
- self.getCurve().addPoint(1+iCurve+jGroup*(len(barLabels)+1),
- rnd()*MAX_REVENUE)
+ y = rnd()*MAX_REVENUE
+ print "x, y", 1+iCurve+jGroup*(len(barLabels)+1), y
+ self.getCurve().addPoint(1+iCurve+jGroup*(len(barLabels)+1), y)
self.getCurve().getPoint().setAnnotationText(barLabels[iCurve])
self.getCurve().getPoint().setAnnotationLocation(
AnnotationLocation.NORTH)
@@ -41,13 +41,14 @@ def getTitle(obj):
* Constants are from Knuth via Numerical Recipes in C.
*
"""
+global i
i = 0
def rnd():
global i
m = 217728
a = 84589
c = 45989
i = (a*i + c) % m
- return i/m
+ return float(i)/m
@@ -813,7 +813,6 @@ def isSystemCurveIndex(self, externalIndex):
"""
def addCurve(self, iCurve=None):
- print "addCurve", iCurve
if iCurve is None:
iCurve = self.getNCurves()
@@ -828,8 +827,6 @@ def addCurve(self, iCurve=None):
internalIndex = self.internalCurveIndex(iCurve)
c = Curve(self, internalIndex)
self.curves.insert(internalIndex, c)
- print "iidx", internalIndex
- print "curves", self.curves
# curves are initially added to the x, y axes.
self.getXAxis().incrementCurves()
self.getYAxis().incrementCurves()

0 comments on commit 6eeab1c

Please sign in to comment.