class ApexLineDataset(ApexDatasetBase):
"""
Apex line dataset.
"""
#: The name of the dataset.
name: str = "Data"
def __init__(self, *args, **kwargs): # noqa: ARG002
super().__init__(**kwargs)
self.data = [25, 66, 41, 89, 63, 25, 44, 12, 36, 9, 54]
class ApexLineChart(ApexJSONMixin, ApexChartBase):
"""
Apex line chart.
"""
#: The type of the chart.
chart_type: str = "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) -> None:
"""
Load the Apex line dataset.
"""
self.add_dataset(ApexLineDataset())
class ApexLineDataset(ApexDatasetBase):
"""
Apex line dataset.
"""
#: The name of the dataset.
name: str = "Data"
def __init__(self, *args, **kwargs): # noqa: ARG002
super().__init__(**kwargs)
self.data = [25, 66, 41, 89, 63, 25, 44, 12, 36, 9, 54]
class ApexSparkLineChart(ApexSparkline):
"""
Apex spark line chart.
"""
#: The type of the chart.
chart_type: str = "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",
]
)