mirror of
https://github.com/freqtrade/freqtrade.git
synced 2025-12-16 04:41:15 +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
|
from typing_extensions import TypedDict
|
||||||
|
|
||||||
|
|
||||||
class AnnotationType(TypedDict, total=False):
|
class _BaseAnnotationType(TypedDict, total=False):
|
||||||
type: Required[Literal["area", "line"]]
|
type: Required[Literal["area", "line"]]
|
||||||
start: str | datetime
|
start: str | datetime
|
||||||
end: str | datetime
|
end: str | datetime
|
||||||
@@ -16,4 +16,16 @@ class AnnotationType(TypedDict, total=False):
|
|||||||
z_level: int
|
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)
|
AnnotationTypeTA = TypeAdapter(AnnotationType)
|
||||||
|
|||||||
Reference in New Issue
Block a user