code: def recalculate(self):
          
          if not (self.isVisible() and self.renderer()):
              return
          
          # update dynamic range
          if self._dataChanged:
              for axis in self.axes():
                  if axis.useDynamicRange():
                      axis.calculateRange(self.values(axis.name()))
              
              self._dataChanged = False
          
          # recalculate the main grid
          xaxis = self.horizontalAxis()
          yaxis = self.verticalAxis()
          renderer = self.renderer()
          
          xvisible = xaxis is not None and self.showXAxis() and renderer.showXAxis()
          yvisible = yaxis is not None and self.showYAxis() and renderer.showYAxis()
          
          self.uiXAxisVIEW.setVisible(xvisible)
          self.uiYAxisVIEW.setVisible(yvisible)
          
          # calculate the main view
          view = self.uiChartVIEW
          chart_scene = view.scene()
          chart_scene.setSceneRect(0, 0, view.width() - 2, view.height() - 2)
          rect = renderer.calculate(chart_scene, xaxis, yaxis)
          
          # recalculate the xaxis
          if xaxis and self.showXAxis() and renderer.showXAxis():
              view = self.uiXAxisVIEW
              scene = view.scene()
              scene.setSceneRect(0, 0, rect.width(), view.height())
              scene.invalidate()
          
          # render the yaxis
          if yaxis and self.showYAxis() and renderer.showYAxis():
              view = self.uiYAxisVIEW
              scene = view.scene()
              scene.setSceneRect(0, 0, view.width(), rect.height())
              scene.invalidate()
          
          # recalculate the items
          renderer.calculateDatasets(chart_scene,
                                     self.axes(),
                                     self.datasets())
          
          chart_scene.invalidate()
docs: Recalculates the information for this chart.