Coverage for src / lexigram / ui / charts / types.py: 100%
25 statements
« prev ^ index » next coverage.py v7.13.5, created at 2026-08-10 04:11 +0800
« prev ^ index » next coverage.py v7.13.5, created at 2026-08-10 04:11 +0800
1from __future__ import annotations
3from dataclasses import dataclass
4from enum import StrEnum
5from typing import Literal
8class ChartType(StrEnum):
9 BAR = "bar"
10 LINE = "line"
11 PIE = "pie"
12 AREA = "area"
13 SPARKLINE = "sparkline"
14 MINI_BAR = "mini_bar"
17@dataclass
18class ChartDataPoint:
19 label: str
20 value: float
21 color: str = "blue"
22 secondary_value: float | None = None
25@dataclass
26class ChartConfig:
27 title: str = ""
28 height: str = "200px"
29 show_grid: bool = True
30 show_labels: bool = True
31 animate: bool = True
32 color_scheme: Literal["auto", "blue", "green", "red", "purple", "amber"] = "auto"