class ApexLineDataset(ApexDatasetBase):
name = "Data"
def __init__(self, *args, **kwargs):
super().__init__(**kwargs)
self.data = [25, 66, 41, 89, 63, 25, 44, 12, 36, 9, 54]
class ApexLineChart(ApexJSONMixin, ApexChartBase):
chart_type = 'line'
def __init__(self, **kwargs):
super().__init__(**kwargs)
self.add_categories(['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'])
def load(self):
self.add_dataset(ApexLineDataset())
class ApexLineDataset(ApexDatasetBase):
name = "Data"
def __init__(self, *args, **kwargs):
super().__init__(**kwargs)
self.data = [25, 66, 41, 89, 63, 25, 44, 12, 36, 9, 54]
class ApexSparkLineChart(ApexSparkline):
chart_type = 'bar'
def __init__(self, **kwargs):
super().__init__(**kwargs)
self.add_dataset(ApexLineDataset())
self.add_categories(['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'])