# `StatisticsPage`

class mnemosyne.libmnemosyne.statistics_page.StatisticsPage(component_manager)

  A self-contained piece of statistical information, typically displayed in the GUI as a page in a tabbed widget.

  Each StatisticsPage can have several ‘variants’, e.g. displaying the number of scheduled cards either for next week or for next month.

  For each StatisticsPage, there will be an associated widget (plotting widget, html browser, custom widget, … ) that is in charge of displaying the information. This widget needs to be registered in the component manager as a ‘statistics_widget’ ‘used_for’ a particular StatisticsPage (or a parent class of a StatisticsPage).

  component_type = 'statistics_page'
  instantiate = 1
  name = ''
  prepare_statistics(variant_id)

    This method calculates the data for the requested variant and sets the approriate hints to be picked up by the corresponding widget.

  show_variants_in_combobox = True
  variants = []

class mnemosyne.libmnemosyne.statistics_page.PlotStatisticsPage(component_manager)

  A statistics page where the data is represented on a graphical plot.

class mnemosyne.libmnemosyne.statistics_page.HtmlStatisticsPage(component_manager)

  A statistics page which generates html to displayed in a browser widget.