mirror of
https://github.com/freqtrade/freqtrade.git
synced 2025-12-14 11:51:19 +00:00
feat: Add line chart type
This commit is contained in:
@@ -5,7 +5,7 @@ from pydantic import TypeAdapter
|
||||
from typing_extensions import TypedDict
|
||||
|
||||
|
||||
class AnnotationType(TypedDict, total=False):
|
||||
class _BaseAnnotationType(TypedDict, total=False):
|
||||
type: Required[Literal["area", "line"]]
|
||||
start: str | datetime
|
||||
end: str | datetime
|
||||
@@ -16,4 +16,16 @@ class AnnotationType(TypedDict, total=False):
|
||||
z_level: int
|
||||
|
||||
|
||||
class AreaAnnotationType(_BaseAnnotationType, total=False):
|
||||
type: Literal["area"]
|
||||
|
||||
|
||||
class LinenAnnotationType(_BaseAnnotationType, total=False):
|
||||
type: Literal["line"]
|
||||
width: int
|
||||
line_style: Literal["solid", "dashed", "dotted"]
|
||||
|
||||
|
||||
AnnotationType = AreaAnnotationType | LinenAnnotationType
|
||||
|
||||
AnnotationTypeTA = TypeAdapter(AnnotationType)
|
||||
|
||||
Reference in New Issue
Block a user