:py:mod:`oioioi.statistics.plottypes` ===================================== .. py:module:: oioioi.statistics.plottypes Module Contents --------------- Classes ~~~~~~~ .. autoapisummary:: oioioi.statistics.plottypes.PlotType oioioi.statistics.plottypes.PlainTextPlot oioioi.statistics.plottypes.TablePlot oioioi.statistics.plottypes.StaticHighchartsPlot oioioi.statistics.plottypes.ColumnStaticHighchartsPlot oioioi.statistics.plottypes.BarPercentStaticHighchartsPlot oioioi.statistics.plottypes.XYStaticHighchartsPlot oioioi.statistics.plottypes.PointsToSourceLengthProblemPlot .. py:class:: PlotType Bases: :py:obj:`object` .. py:method:: head_libraries() Returns a list containing paths to all CSS and JS files required to plot data. The paths should be relative to static folder. The list will be converted to HTML by controller. Currently supported extensions: .css, .js .. py:method:: render_plot(request, data, plot_id) :abstractmethod: Renders an instance of a plot to HTML. :type data: Dict :param data: Dict describing a plot, specific for plot type. :param plot_id: Unique number used to create a 'namespace' in HTML. For example, Highcharts JS use an id attribute to identify div containing the plot. .. py:class:: PlainTextPlot Bases: :py:obj:`PlotType` Uses the following keys from :param data:: ``text`` plain text to be displayed .. py:method:: render_plot(request, data, plot_id) Renders an instance of a plot to HTML. :type data: Dict :param data: Dict describing a plot, specific for plot type. :param plot_id: Unique number used to create a 'namespace' in HTML. For example, Highcharts JS use an id attribute to identify div containing the plot. .. py:class:: TablePlot Bases: :py:obj:`PlotType` Uses the following keys from :param data: : ``keys`` list of headers ``series`` list of series names ``data`` rectantular array of data ``plot_name`` table name to be used as a caption .. py:method:: head_libraries() Returns a list containing paths to all CSS and JS files required to plot data. The paths should be relative to static folder. The list will be converted to HTML by controller. Currently supported extensions: .css, .js .. py:method:: render_plot(request, data, plot_id) Renders an instance of a plot to HTML. :type data: Dict :param data: Dict describing a plot, specific for plot type. :param plot_id: Unique number used to create a 'namespace' in HTML. For example, Highcharts JS use an id attribute to identify div containing the plot. .. py:class:: StaticHighchartsPlot Bases: :py:obj:`PlotType` Base class for static (non-updating) plots using Highcharts library. Uses the following keys from :param data: : * ``series`` list of series names * ``data`` rectantular array of data * ``titles`` dictionary of axes titles * ``x_min``, ``y_min``, ``x_max``, ``y_max`` fixed axes bounds * ``series_extra_options`` list of extra options for each serie * ``highcharts_extra_options`` hook for adding extra Highcharts options .. py:method:: head_libraries() Returns a list containing paths to all CSS and JS files required to plot data. The paths should be relative to static folder. The list will be converted to HTML by controller. Currently supported extensions: .css, .js .. py:method:: highcharts_options(data) Function generating options for Highcharts chart, as specified in http://www.highcharts.com/docs/getting-started/how-to-set-options .. py:method:: render_plot(request, data, plot_id) Renders an instance of a plot to HTML. :type data: Dict :param data: Dict describing a plot, specific for plot type. :param plot_id: Unique number used to create a 'namespace' in HTML. For example, Highcharts JS use an id attribute to identify div containing the plot. .. py:class:: ColumnStaticHighchartsPlot Bases: :py:obj:`StaticHighchartsPlot` Uses the following extra keys from :param data: : ``keys`` list of column names .. py:method:: highcharts_options(data) Function generating options for Highcharts chart, as specified in http://www.highcharts.com/docs/getting-started/how-to-set-options .. py:class:: BarPercentStaticHighchartsPlot Bases: :py:obj:`StaticHighchartsPlot` Uses the following extra keys from :param data: : ``keys`` list of rows names .. py:method:: highcharts_options(data) Function generating options for Highcharts chart, as specified in http://www.highcharts.com/docs/getting-started/how-to-set-options .. py:class:: XYStaticHighchartsPlot Bases: :py:obj:`StaticHighchartsPlot` Base class for static (non-updating) plots using Highcharts library. Uses the following keys from :param data: : * ``series`` list of series names * ``data`` rectantular array of data * ``titles`` dictionary of axes titles * ``x_min``, ``y_min``, ``x_max``, ``y_max`` fixed axes bounds * ``series_extra_options`` list of extra options for each serie * ``highcharts_extra_options`` hook for adding extra Highcharts options .. py:method:: highcharts_options(data) Function generating options for Highcharts chart, as specified in http://www.highcharts.com/docs/getting-started/how-to-set-options .. py:class:: PointsToSourceLengthProblemPlot Bases: :py:obj:`XYStaticHighchartsPlot` Base class for static (non-updating) plots using Highcharts library. Uses the following keys from :param data: : * ``series`` list of series names * ``data`` rectantular array of data * ``titles`` dictionary of axes titles * ``x_min``, ``y_min``, ``x_max``, ``y_max`` fixed axes bounds * ``series_extra_options`` list of extra options for each serie * ``highcharts_extra_options`` hook for adding extra Highcharts options .. py:method:: head_libraries() Returns a list containing paths to all CSS and JS files required to plot data. The paths should be relative to static folder. The list will be converted to HTML by controller. Currently supported extensions: .css, .js .. py:method:: highcharts_options(data) Function generating options for Highcharts chart, as specified in http://www.highcharts.com/docs/getting-started/how-to-set-options