Skip to content

Commit f9696d5

Browse files
committed
feat: Add line chart type
1 parent 0715f46 commit f9696d5

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

freqtrade/ft_types/plot_annotation_type.py

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
from typing_extensions import TypedDict
66

77

8-
class AnnotationType(TypedDict, total=False):
8+
class _BaseAnnotationType(TypedDict, total=False):
99
type: Required[Literal["area", "line"]]
1010
start: str | datetime
1111
end: str | datetime
@@ -16,4 +16,16 @@ class AnnotationType(TypedDict, total=False):
1616
z_level: int
1717

1818

19+
class AreaAnnotationType(_BaseAnnotationType, total=False):
20+
type: Literal["area"]
21+
22+
23+
class LinenAnnotationType(_BaseAnnotationType, total=False):
24+
type: Literal["line"]
25+
width: int
26+
line_style: Literal["solid", "dashed", "dotted"]
27+
28+
29+
AnnotationType = AreaAnnotationType | LinenAnnotationType
30+
1931
AnnotationTypeTA = TypeAdapter(AnnotationType)

0 commit comments

Comments
 (0)