Histogram ========= A :doc:`Callable ` for generating a histogram. Definition ---------- .. py:class:: controller.callable.outputter.Histogram(self, x: ColumnReference, title: str, x_axis_name: str, y_axis_name: str) :callable name: ``histogram`` :callable type: :doc:`Outputter ` :param x: A column reference to find values for the x-axis. :type x: ColumnReference :param title: The title of the chart. :type title: str :param x_axis_name: The name of the x-axis. :type x_axis_name: str :param y_axis_name: The name of the y-axis. :type y_axis_name: str Parameters ---------- .. py:attribute:: x A column reference to find values for the x-axis. :type: ColumnReference :required: True :choices: All columns in the target DataFrame .. py:attribute:: title The title of the chart. :type: str :required: True .. py:attribute:: x_axis_name The name of the x-axis. :type: str :required: True .. py:attribute:: y_axis_name The name of the y-axis. :type: str :required: True Output ------ A DataFrame is returned where it contains two columns matching the output conventions of an Outputter. - The ``data`` column contains the generated histogram in PNG format. - The ``type`` column indicates the data type to be ``image/png``. Example configuration --------------------- .. code-block:: javascript { "name": "foo", "callable": "histogram", "params": { "x": "$get_students_submissions.submission.score", "title": "Scores distribution", "x_axis_name": "Score", "y_axis_name": "Number of students" } }