コード例 #1
0
ファイル: base.py プロジェクト: zack-krejci/dotSkapes
 def createYAxis(self):
     textProperties = {
         "textHeight": self.settings.yAxisTextHeight,
         "horizontalAnchor": "right",
         "verticalAnchor": "middle",
         "lineLength": self.settings.yAxisMaxWidth,
         "maxLines": self.settings.yAxisMaxLines,
     }
     yaxis = YAxis(
         inf=self.canvas.y,
         sup=self.canvas.y + self.canvas.height,
         x=0,
         lower=self.ybounds[0],
         upper=self.ybounds[1],
         has_lines=self.settings.horizontalGrid,
         line_height=self.canvas.width,
         textProperties=textProperties,
     )
     yaxis.createTicks(self.ypositions)
     yaxis.setText(self.ylabels)
     yaxis.drawTicks()
     yaxis.move(self.canvas.x + yaxis.width, 0)
     self.canvas.changeSize(-yaxis.width - self.settings.yAxisSpace, 0)
     self.canvas.move(yaxis.width + self.settings.yAxisSpace, 0)
     self.dataGroup.drawAt(yaxis, 0)
コード例 #2
0
ファイル: types.py プロジェクト: Koperj/SahanaEden
 def createY2Axis (self):
     ybounds = self.setY2Bounds ()
     textProperties = {'textHeight': 8,
                       'horizontalAnchor': 'left',
                       'verticalAnchor': 'middle',
                       }
     yaxis = YAxis (inf = self.canvas.y,
                    sup = self.canvas.y + self.canvas.height,
                    x = 0,
                    lower = ybounds[0],
                    upper = ybounds[1],
                    textProperties = textProperties)
     yaxis.createTicks ()
     yaxis.drawTicks ()
     self.canvas.changeSize (-yaxis.width - 5, 0)
     yaxis.move (self.canvas.x + self.canvas.width + 1, 0)
     self.dataGroup.drawAt (yaxis, 0)
コード例 #3
0
ファイル: types.py プロジェクト: kendhia/SahanaEden
 def createY2Axis(self):
     ybounds = self.setY2Bounds()
     textProperties = {
         'textHeight': 8,
         'horizontalAnchor': 'left',
         'verticalAnchor': 'middle',
     }
     yaxis = YAxis(inf=self.canvas.y,
                   sup=self.canvas.y + self.canvas.height,
                   x=0,
                   lower=ybounds[0],
                   upper=ybounds[1],
                   textProperties=textProperties)
     yaxis.createTicks()
     yaxis.drawTicks()
     self.canvas.changeSize(-yaxis.width - 5, 0)
     yaxis.move(self.canvas.x + self.canvas.width + 1, 0)
     self.dataGroup.drawAt(yaxis, 0)
コード例 #4
0
 def createYAxis (self):
     textProperties = {'textHeight': self.settings.yAxisTextHeight,
                       'horizontalAnchor': 'right',
                       'verticalAnchor': 'middle',
                       }
     yaxis = YAxis (inf = self.canvas.y,
                    sup = self.canvas.y + self.canvas.height,
                    x = 0,
                    lower = self.ybounds[0],
                    upper = self.ybounds[1],
                    textProperties = textProperties)
     yaxis.createTicks (self.ypositions)
     yaxis.setText (self.ylabels)
     yaxis.drawTicks ()
     yaxis.move (self.canvas.x + yaxis.width, 0)
     self.canvas.changeSize (-yaxis.width - self.settings.yAxisSpace, 0)
     self.canvas.move (yaxis.width + self.settings.yAxisSpace, 0)
     self.dataGroup.drawAt (yaxis, 0)
コード例 #5
0
ファイル: base.py プロジェクト: breezer00/dotSkapes
 def createY2Axis (self):
     ybounds = self.y2bounds
     textProperties = {'textHeight': self.settings.y2AxisTextHeight,
                       'horizontalAnchor': 'left',
                       'verticalAnchor': 'middle',
                       }
     yaxis = YAxis (inf = self.canvas.y,
                    sup = self.canvas.y + self.canvas.height,
                    x = 0,
                    lower = self.y2bounds[0],
                    upper = self.y2bounds[1],
                    textProperties = textProperties)
     yaxis.createTicks ()
     if self.y2labels:
         yaxis.setText (self.y2labels)
     yaxis.drawTicks ()
     yaxis.move (self.canvas.x + self.canvas.width - yaxis.width, 0)
     self.canvas.changeSize (-yaxis.width - self.settings.y2AxisSpace, 0)
     self.dataGroup.drawAt (yaxis, 0)