Creates a JavaScript column chart using "HighCharts". @Params chart_name - If creating multiple charts, use this to select which one. title - The title displayed for the chart. subtitle - The subtitle displayed for the chart. data_name - T
(
self,
chart_name=None,
title=None,
subtitle=None,
data_name=None,
unit=None,
libs=True,
labels=True,
legend=True,
)
| 12754 | ) |
| 12755 | |
| 12756 | def create_column_chart( |
| 12757 | self, |
| 12758 | chart_name=None, |
| 12759 | title=None, |
| 12760 | subtitle=None, |
| 12761 | data_name=None, |
| 12762 | unit=None, |
| 12763 | libs=True, |
| 12764 | labels=True, |
| 12765 | legend=True, |
| 12766 | ): |
| 12767 | """Creates a JavaScript column chart using "HighCharts". |
| 12768 | @Params |
| 12769 | chart_name - If creating multiple charts, |
| 12770 | use this to select which one. |
| 12771 | title - The title displayed for the chart. |
| 12772 | subtitle - The subtitle displayed for the chart. |
| 12773 | data_name - The series name. Useful for multi-series charts. |
| 12774 | If no data_name, will default to using "Series 1". |
| 12775 | unit - The description label given to the chart's y-axis values. |
| 12776 | libs - The option to include Chart libraries (JS and CSS files). |
| 12777 | Should be set to True (default) for the first time creating |
| 12778 | a chart on a web page. If creating multiple charts on the |
| 12779 | same web page, you won't need to re-import the libraries |
| 12780 | when creating additional charts. |
| 12781 | labels - If True, displays labels on the chart for data points. |
| 12782 | legend - If True, displays the data point legend on the chart.""" |
| 12783 | if not chart_name: |
| 12784 | chart_name = "default" |
| 12785 | if not data_name: |
| 12786 | data_name = "" |
| 12787 | style = "column" |
| 12788 | self.__create_highchart( |
| 12789 | chart_name=chart_name, |
| 12790 | title=title, |
| 12791 | subtitle=subtitle, |
| 12792 | style=style, |
| 12793 | data_name=data_name, |
| 12794 | unit=unit, |
| 12795 | libs=libs, |
| 12796 | labels=labels, |
| 12797 | legend=legend, |
| 12798 | ) |
| 12799 | |
| 12800 | def create_line_chart( |
| 12801 | self, |