tbapi.api.interfaces.iplot
1from __future__ import annotations 2from typing import TYPE_CHECKING 3from tbapi.common.decorators import tb_interface 4from tbapi.common.converters import to_python_datetime, to_net_datetime 5from datetime import datetime 6from Tickblaze.Scripts.Api.Interfaces import IPlot as _IPlot 7from typing import Any, overload 8from abc import ABC, abstractmethod 9from tbapi.core.enums.line_style import LineStyle 10from Tickblaze.Core.Enums import LineStyle as _LineStyle 11if TYPE_CHECKING: 12 from tbapi.api.models.color import Color 13 14@tb_interface(_IPlot) 15class IPlot(): 16 """Defines properties for a plot including visual appearance.""" 17 18 @property 19 def name(self) -> str: 20 """The name of the plot.""" 21 val = self._value.Name 22 return val 23 @property 24 def color(self) -> Color: 25 """The color of the plot.""" 26 from tbapi.api.models.color import Color 27 val = self._value.Color 28 return Color(_existing=val) 29 @property 30 def line_style(self) -> LineStyle: 31 """The line style of the plot.""" 32 val = int(self._value.LineStyle) 33 return LineStyle(val) 34 @property 35 def thickness(self) -> int: 36 """The thickness of the plot's line.""" 37 val = self._value.Thickness 38 return val 39 @property 40 def is_visible(self) -> bool: 41 """Indicates whether the plot is visible.""" 42 val = self._value.IsVisible 43 return val
@tb_interface(_IPlot)
class
IPlot:
20@tb_interface(_IPlot) 21class IPlot(): 22 """Defines properties for a plot including visual appearance.""" 23 24 @property 25 def name(self) -> str: 26 """The name of the plot.""" 27 val = self._value.Name 28 return val 29 @property 30 def color(self) -> Color: 31 """The color of the plot.""" 32 from tbapi.api.models.color import Color 33 val = self._value.Color 34 return Color(_existing=val) 35 @property 36 def line_style(self) -> LineStyle: 37 """The line style of the plot.""" 38 val = int(self._value.LineStyle) 39 return LineStyle(val) 40 @property 41 def thickness(self) -> int: 42 """The thickness of the plot's line.""" 43 val = self._value.Thickness 44 return val 45 @property 46 def is_visible(self) -> bool: 47 """Indicates whether the plot is visible.""" 48 val = self._value.IsVisible 49 return val
Defines properties for a plot including visual appearance.
name: str
24 @property 25 def name(self) -> str: 26 """The name of the plot.""" 27 val = self._value.Name 28 return val
The name of the plot.
color: tbapi.api.models.color.Color
29 @property 30 def color(self) -> Color: 31 """The color of the plot.""" 32 from tbapi.api.models.color import Color 33 val = self._value.Color 34 return Color(_existing=val)
The color of the plot.
line_style: tbapi.core.enums.line_style.LineStyle
35 @property 36 def line_style(self) -> LineStyle: 37 """The line style of the plot.""" 38 val = int(self._value.LineStyle) 39 return LineStyle(val)
The line style of the plot.