docs: def calculate(self, scene, xaxis, yaxis):
          """
          Calculates the grid data before rendering.
          
          :param      scene       | <XChartScene>
                      xaxis       | <XChartAxis>
                      yaxis       | <XChartAxis>
          """
          # build the grid location
          sceneRect = scene.sceneRect()
          
          # process axis information
          h_lines  = []
          h_alt    = []
          h_labels = []
          v_lines  = []
          v_alt    = []
          v_labels = []
          
          xlabels   = []
          xcount    = 1
          xsections = 1
          xdelta    = 0
          xdeltamin = 0
          
          ylabels   = []
          ycount    = 1
          ysections = 1
          ydeltamin = 0
          ydelta    = 0
          
          axis_lft  = 0
          axis_rht  = 0
          axis_bot  = 0
          axis_top  = 0
          
          # precalculate xaxis information for width changes
          if xaxis and self.showXAxis():
              size = sceneRect.width()
              xdeltamin = xaxis.minimumLabelWidth()
              result = self.calculateAxis(xaxis, size, xdeltamin)
              
              xlabels, xcount, xsections, newWidth, xdelta = result
              if newWidth != size:
                  sceneRect.setWidth(newWidth)
          
          # precalculate yaxis information for height changes
          if yaxis and self.showYAxis():
              size = sceneRect.height()
              ydeltamin = yaxis.minimumLabelHeight()
              result = self.calculateAxis(yaxis, size, ydeltamin)
              
              ylabels, ycount, ysections, newHeight, ydelta = result
              if newHeight != size:
                  sceneRect.setHeight(newHeight)
          
          # generate the xaxis
          if xaxis and self.showXAxis():
              x        = sceneRect.left() + xdeltamin / 2
              axis_lft = x
              axis_rht = x
              alt      = False
              
              for i in range(xcount):
                  v_lines.append(QLineF(x, sceneRect.top(),
                                        x, sceneRect.bottom()))
                  
                  # store alternate info
                  if alt:
                      alt_rect = QRectF(x - xdelta, sceneRect.top(),
                                        xdelta, sceneRect.height())
                      v_alt.append(alt_rect)
                  
                  # store label information
                  v_labels.append((x, xdelta, xlabels[i]))
                  axis_rht = x
                  
                  x += xdelta
                  alt = not alt
          
          # generate the yaxis
          if yaxis and self.showYAxis():
              y        = sceneRect.bottom() - ydeltamin / 2
              axis_bot = y
              axis_top = y
              alt      = False
              
              for i in range(ycount):
                  h_lines.append(QLineF(sceneRect.left(), y,
                                        sceneRect.right(), y))
                  
                  # store alternate color
                  if alt:
                      alt_rect = QRectF(sceneRect.left(), y,
                                        sceneRect.width(), ydelta)
                      h_alt.append(alt_rect)
                  
                  # store the vertical information
                  h_labels.append((y, ydelta, ylabels[i]))
                  axis_top = y
                  
                  y -= ydelta
                  alt = not alt
          
          # assign the build data
          self._buildData['grid_h_lines']  = h_lines
          self._buildData['grid_h_alt']    = h_alt
          self._buildData['grid_h_labels'] = h_labels
          self._buildData['grid_v_lines']  = v_lines
          self._buildData['grid_v_alt']    = v_alt
          self._buildData['grid_v_labels'] = v_labels
          self._buildData['grid_rect']     = sceneRect
          self._buildData['axis_rect']     = QRectF(axis_lft, axis_top,
                                                    axis_rht - axis_lft,
                                                    axis_bot - axis_top)
          
          scene.setSceneRect(sceneRect)
          return sceneRect