Line Chart
A Callable for generating a line chart.
Definition
- 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:
- Parameters:
x (ColumnReference) – A column reference to find values for the x-axis.
y (ColumnReference) – A column reference to find values for the y-axis.
title (str) – The title of the chart.
x_axis_name (str) – The name of the x-axis.
y_axis_name (str) – The name of the y-axis.
Parameters
- x
A column reference to find values for the x-axis.
- Type:
- Required:
True
- Choices:
All columns in the target DataFrame
- y
A column reference to find values for the y-axis.
- Type:
- Required:
True
- Choices:
All columns in the target DataFrame
Output
A DataFrame is returned where it contains two columns matching the output conventions of an Outputter.
The
datacolumn contains the generated line chart in PNG format.The
typecolumn indicates the data type to beimage/png.
Example configuration
{
"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"
}
}