Line Chart ========== A :doc:`Callable ` for generating a line chart. Definition ---------- .. py:class:: controller.callable.outputter.LineChart(self, x: ColumnReference, y: ColumnReference, title: str, x_axis_name: str, y_axis_name: str) :callable name: ``line_chart`` :callable type: :doc:`Outputter ` :param x: A column reference to find values for the x-axis. :type x: ColumnReference :param y: A column reference to find values for the y-axis. :type y: 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:: y A column reference to find values for the y-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 line chart in PNG format. - The ``type`` column indicates the data type to be ``image/png``. Example configuration --------------------- .. code-block:: javascript { "name": "foo", "callable": "line_chart", "params": { "x": "$get_courses.courses.course_id", "y": "$final_exam_means.means", "title": "Final Exam Means", "x_axis_name": "Course ID", "y_axis_name": "Mean" } }