Have always been enjoying your work so far but your bar_chart missing name field to show legend:
class BarChart(Widget):
def __init__(self, data=None, x_axis_labels=None,
x_axis_type=None, y_axis_format=None, y_axis_unit=None,
*args, **kwargs):
super(BarChart, self).__init__(*args, **kwargs)
self.data = []
self.x_axis_labels = x_axis_labels
self.x_axis_type = x_axis_type
self.y_axis_format = y_axis_format
self.y_axis_unit = y_axis_unit
if data is not None:
self.add_data(data=data)
def add_data(self, data, *args, **kwargs):
self.data.append(
{
"data": data
}
)
class BarChart(Widget):
def __init__(self, data=None, name = None, x_axis_labels=None,
x_axis_type=None, y_axis_format=None, y_axis_unit=None,
*args, **kwargs):
super(BarChart, self).__init__(*args, **kwargs)
self.data = []
self.name = '' ''
self.x_axis_labels = x_axis_labels
self.x_axis_type = x_axis_type
self.y_axis_format = y_axis_format
self.y_axis_unit = y_axis_unit
if data is not None:
self.add_data(data=data)
def add_data(self, data, name, *args, **kwargs):
self.data.append(
{
"data": data
}
)
self.name = name