Skip to content

Commit

Permalink
more gchart update
Browse files Browse the repository at this point in the history
git-svn-id: https://pyjamas.svn.sourceforge.net/svnroot/pyjamas/trunk@1471 7a2bd370-bda8-463c-979e-2900ccfb811e
  • Loading branch information
lkcl committed Aug 28, 2009
1 parent 0b3fad9 commit c90bb3d
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 9 deletions.
4 changes: 2 additions & 2 deletions examples/gcharttestapp/GChartExample02.py
Expand Up @@ -32,8 +32,8 @@ def __init__(self):
"Simulated Quarterly Revenues" + "Simulated Quarterly Revenues" +
"</big></big><br>&nbsp;</b>") "</big></big><br>&nbsp;</b>")
self.updateButton.addClickListener(self) self.updateButton.addClickListener(self)

self.setChartFootnotes(self.updateButton)
self.setChartFootnotes(updateButton)
for iCurve in range(len(barLabels)): for iCurve in range(len(barLabels)):
self.addCurve() # one curve per quarter self.addCurve() # one curve per quarter
self.getCurve().getSymbol().setSymbolType(SymbolType.VBAR_SOUTHWEST) self.getCurve().getSymbol().setSymbolType(SymbolType.VBAR_SOUTHWEST)
Expand Down
1 change: 1 addition & 0 deletions examples/gcharttestapp/GChartTestAppUtil.py
Expand Up @@ -43,6 +43,7 @@ def getTitle(obj):
""" """
i = 0 i = 0
def rnd(): def rnd():
global i
m = 217728 m = 217728
a = 84589 a = 84589
c = 45989 c = 45989
Expand Down
14 changes: 7 additions & 7 deletions library/pyjamas/chart/Axis.py
Expand Up @@ -1539,10 +1539,10 @@ def setTickLabelFontSize(self, tickLabelFontSize):
""" """
def setTickLabelFormat(self, format): def setTickLabelFormat(self, format):
# interpret prefixes and create an appropriate formatter # interpret prefixes and create an appropriate formatter
if not self.tickLabelFormat.equals(format): if not self.tickLabelFormat == format:
self.chartDecorationsChanged = True self.chartDecorationsChanged = True
if format.startsWith("=(Date)"): if format.startswith("=(Date)"):
transFormat = format.substring("=(Date)".length()) transFormat = format.find("=(Date)".length())
if transFormat.equals(""): if transFormat.equals(""):
# so "=(Date)" works # so "=(Date)" works
self.dateFormat = DateTimeFormat.getShortDateTimeFormat() self.dateFormat = DateTimeFormat.getShortDateTimeFormat()
Expand All @@ -1552,13 +1552,13 @@ def setTickLabelFormat(self, format):


self.tickLabelFormatType = DATE_FORMAT_TYPE self.tickLabelFormatType = DATE_FORMAT_TYPE


elif format.startsWith("=10^"): elif format.startswith("=10^"):
transFormat = format.substring("=10^".length()) transFormat = format.find("=10^".length())
self.numberFormat = NumberFormat.getFormat(transFormat) self.numberFormat = NumberFormat.getFormat(transFormat)
self.tickLabelFormatType = LOG10INVERSE_FORMAT_TYPE self.tickLabelFormatType = LOG10INVERSE_FORMAT_TYPE


elif format.startsWith("=2^"): elif format.startswith("=2^"):
transFormat = format.substring("=2^".length()) transFormat = format.find("=2^".length())
self.numberFormat = NumberFormat.getFormat(transFormat) self.numberFormat = NumberFormat.getFormat(transFormat)
self.tickLabelFormatType = LOG2INVERSE_FORMAT_TYPE self.tickLabelFormatType = LOG2INVERSE_FORMAT_TYPE


Expand Down

0 comments on commit c90bb3d

Please sign in to comment.