| | |
- builtins.object
-
- DataPoint
-
- DataBox
- Graph
- SVGChart
- builtins.tuple(builtins.object)
-
- Bar
- BarLayout
- GroupedBar
- Point
- StackedBar
- Tick
- Zone
class Bar(builtins.tuple) |
| |
Bar(
position_x: float,
position_y: float,
width: int,
height: int,
data: DataPoint
)
SVG rectangle representing a bar. |
| |
- Method resolution order:
- Bar
- builtins.tuple
- builtins.object
Methods defined here:
- __getnewargs__(self) from collections.Bar
- Return self as a plain tuple. Used by copy and pickle.
- __replace__ = _replace(self, /, **kwds)
- __repr__(self) from collections.Bar
- Return a nicely formatted representation string
- _asdict(self) from collections.Bar
- Return a new dict which maps field names to their values.
- _replace(self, /, **kwds) from collections.Bar
- Return a new Bar object replacing specified fields with new values
Class methods defined here:
- _make(iterable) from collections.Bar
- Make a new Bar object from a sequence or iterable
Static methods defined here:
- __new__(
_cls,
position_x: float,
position_y: float,
width: int,
height: int,
data: DataPoint
) from namedtuple_Bar.Bar
- Create new instance of Bar(position_x, position_y, width, height, data)
Data descriptors defined here:
- position_x
- Alias for field number 0
- position_y
- Alias for field number 1
- width
- Alias for field number 2
- height
- Alias for field number 3
- data
- Alias for field number 4
Data and other attributes defined here:
- __classdictcell__ = <cell at 0x0000015325669CF0: dict object>
- __match_args__ = ('position_x', 'position_y', 'width', 'height', 'data')
- __orig_bases__ = (<function NamedTuple>,)
- _field_defaults = {}
- _fields = ('position_x', 'position_y', 'width', 'height', 'data')
Methods inherited from builtins.tuple:
- __add__(self, value, /)
- Return self+value.
- __contains__(self, key, /)
- Return bool(key in self).
- __eq__(self, value, /)
- Return self==value.
- __ge__(self, value, /)
- Return self>=value.
- __getitem__(self, key, /)
- Return self[key].
- __gt__(self, value, /)
- Return self>value.
- __hash__(self, /)
- Return hash(self).
- __iter__(self, /)
- Implement iter(self).
- __le__(self, value, /)
- Return self<=value.
- __len__(self, /)
- Return len(self).
- __lt__(self, value, /)
- Return self<value.
- __mul__(self, value, /)
- Return self*value.
- __ne__(self, value, /)
- Return self!=value.
- __rmul__(self, value, /)
- Return value*self.
- count(self, value, /)
- Return number of occurrences of value.
- index(self, value, start=0, stop=9223372036854775807, /)
- Return first index of value.
Raises ValueError if the value is not present.
Class methods inherited from builtins.tuple:
- __class_getitem__(object, /)
- See PEP 585
|
class BarLayout(builtins.tuple) |
| |
BarLayout(group_width: Number, bar_width: Number, offset: int)
Common layout information for bar charts. |
| |
- Method resolution order:
- BarLayout
- builtins.tuple
- builtins.object
Methods defined here:
- __getnewargs__(self) from collections.BarLayout
- Return self as a plain tuple. Used by copy and pickle.
- __replace__ = _replace(self, /, **kwds)
- __repr__(self) from collections.BarLayout
- Return a nicely formatted representation string
- _asdict(self) from collections.BarLayout
- Return a new dict which maps field names to their values.
- _replace(self, /, **kwds) from collections.BarLayout
- Return a new BarLayout object replacing specified fields with new values
Class methods defined here:
- _make(iterable) from collections.BarLayout
- Make a new BarLayout object from a sequence or iterable
Static methods defined here:
- __new__(_cls, group_width: Number, bar_width: Number, offset: int) from namedtuple_BarLayout.BarLayout
- Create new instance of BarLayout(group_width, bar_width, offset)
Data descriptors defined here:
- group_width
- Alias for field number 0
- bar_width
- Alias for field number 1
- offset
- Alias for field number 2
Data and other attributes defined here:
- __classdictcell__ = <cell at 0x000001532566AA40: dict object>
- __match_args__ = ('group_width', 'bar_width', 'offset')
- __orig_bases__ = (<function NamedTuple>,)
- _field_defaults = {}
- _fields = ('group_width', 'bar_width', 'offset')
Methods inherited from builtins.tuple:
- __add__(self, value, /)
- Return self+value.
- __contains__(self, key, /)
- Return bool(key in self).
- __eq__(self, value, /)
- Return self==value.
- __ge__(self, value, /)
- Return self>=value.
- __getitem__(self, key, /)
- Return self[key].
- __gt__(self, value, /)
- Return self>value.
- __hash__(self, /)
- Return hash(self).
- __iter__(self, /)
- Implement iter(self).
- __le__(self, value, /)
- Return self<=value.
- __len__(self, /)
- Return len(self).
- __lt__(self, value, /)
- Return self<value.
- __mul__(self, value, /)
- Return self*value.
- __ne__(self, value, /)
- Return self!=value.
- __rmul__(self, value, /)
- Return value*self.
- count(self, value, /)
- Return number of occurrences of value.
- index(self, value, start=0, stop=9223372036854775807, /)
- Return first index of value.
Raises ValueError if the value is not present.
Class methods inherited from builtins.tuple:
- __class_getitem__(object, /)
- See PEP 585
|
class DataBox(DataPoint) |
| |
DataBox(
median_value: Number,
first_quartile: Number,
third_quartile: Number,
minimum: Number,
maximum: Number,
name: Optional[Union[str, int, datetime, date]] = None,
color: Optional[str] = None
)
Boxplot statistical data container. |
| |
- Method resolution order:
- DataBox
- DataPoint
- builtins.object
Methods defined here:
- __init__(
self,
median_value: Number,
first_quartile: Number,
third_quartile: Number,
minimum: Number,
maximum: Number,
name: Optional[Union[str, int, datetime, date]] = None,
color: Optional[str] = None
)
- Initialize boxplot statistics.
Methods inherited from DataPoint:
- __repr__(self) -> str
- Return a string representation.
Data descriptors inherited from DataPoint:
- __dict__
- dictionary for instance variables
- __weakref__
- list of weak references to the object
Data and other attributes inherited from DataPoint:
- points = []
|
class DataPoint(builtins.object) |
| |
DataPoint(
value: Number,
name: Optional[Union[str, int, datetime, date]] = None,
color: Optional[str] = None
)
Single data point representation. |
| |
Methods defined here:
- __init__(
self,
value: Number,
name: Optional[Union[str, int, datetime, date]] = None,
color: Optional[str] = None
)
- Initialize a data point.
Parameters
----------
value : int or float
Numeric value.
name : str, int or datetime, date, optional
Data label.
color : str, optional
Color value.
- __repr__(self) -> str
- Return a string representation.
Data descriptors defined here:
- __dict__
- dictionary for instance variables
- __weakref__
- list of weak references to the object
Data and other attributes defined here:
- points = []
|
class Graph(builtins.object) |
| |
Graph(
data: Optional[List[Union[DataPoint, Number]]] = None,
default_color: Optional[str] = '#3498db',
show_points: Optional[bool] = None,
name: Optional[str] = None
)
Graph data container. |
| |
Methods defined here:
- __init__(
self,
data: Optional[List[Union[DataPoint, Number]]] = None,
default_color: Optional[str] = '#3498db',
show_points: Optional[bool] = None,
name: Optional[str] = None
)
- Initialize graph data.
- __repr__(self) -> str
- Return a string representation.
- apply_color_gradient(
self,
min_value: Optional[float] = None,
max_value: Optional[float] = None,
start_color: str = '#00ff00',
end_color: str = '#ff0000'
) -> None
- Apply a linear color gradient to data points.
- apply_color_steps(self, steps: List[tuple]) -> None
- Apply stepped color ranges.
- build_data(self, data: List[Union[DataPoint, Number]]) -> None
- Normalize raw values into DataPoint instances.
Data descriptors defined here:
- __dict__
- dictionary for instance variables
- __weakref__
- list of weak references to the object
Data and other attributes defined here:
- graphs = []
|
class GroupedBar(builtins.tuple) |
| |
GroupedBar(
position_x: Number,
position_y: Number,
width: Number,
height: Number,
data: DataPoint,
group_index: int
)
SVG rectangle for a grouped bar. |
| |
- Method resolution order:
- GroupedBar
- builtins.tuple
- builtins.object
Methods defined here:
- __getnewargs__(self) from collections.GroupedBar
- Return self as a plain tuple. Used by copy and pickle.
- __replace__ = _replace(self, /, **kwds)
- __repr__(self) from collections.GroupedBar
- Return a nicely formatted representation string
- _asdict(self) from collections.GroupedBar
- Return a new dict which maps field names to their values.
- _replace(self, /, **kwds) from collections.GroupedBar
- Return a new GroupedBar object replacing specified fields with new values
Class methods defined here:
- _make(iterable) from collections.GroupedBar
- Make a new GroupedBar object from a sequence or iterable
Static methods defined here:
- __new__(
_cls,
position_x: Number,
position_y: Number,
width: Number,
height: Number,
data: DataPoint,
group_index: int
) from namedtuple_GroupedBar.GroupedBar
- Create new instance of GroupedBar(position_x, position_y, width, height, data, group_index)
Data descriptors defined here:
- position_x
- Alias for field number 0
- position_y
- Alias for field number 1
- width
- Alias for field number 2
- height
- Alias for field number 3
- data
- Alias for field number 4
- group_index
- Alias for field number 5
Data and other attributes defined here:
- __classdictcell__ = <cell at 0x000001532566A140: dict object>
- __match_args__ = ('position_x', 'position_y', 'width', 'height', 'data', 'group_index')
- __orig_bases__ = (<function NamedTuple>,)
- _field_defaults = {}
- _fields = ('position_x', 'position_y', 'width', 'height', 'data', 'group_index')
Methods inherited from builtins.tuple:
- __add__(self, value, /)
- Return self+value.
- __contains__(self, key, /)
- Return bool(key in self).
- __eq__(self, value, /)
- Return self==value.
- __ge__(self, value, /)
- Return self>=value.
- __getitem__(self, key, /)
- Return self[key].
- __gt__(self, value, /)
- Return self>value.
- __hash__(self, /)
- Return hash(self).
- __iter__(self, /)
- Implement iter(self).
- __le__(self, value, /)
- Return self<=value.
- __len__(self, /)
- Return len(self).
- __lt__(self, value, /)
- Return self<value.
- __mul__(self, value, /)
- Return self*value.
- __ne__(self, value, /)
- Return self!=value.
- __rmul__(self, value, /)
- Return value*self.
- count(self, value, /)
- Return number of occurrences of value.
- index(self, value, start=0, stop=9223372036854775807, /)
- Return first index of value.
Raises ValueError if the value is not present.
Class methods inherited from builtins.tuple:
- __class_getitem__(object, /)
- See PEP 585
|
class Point(builtins.tuple) |
| |
Point(position_x: float, position_y: float, data: DataPoint)
SVG coordinates of a graph point. |
| |
- Method resolution order:
- Point
- builtins.tuple
- builtins.object
Methods defined here:
- __getnewargs__(self) from collections.Point
- Return self as a plain tuple. Used by copy and pickle.
- __replace__ = _replace(self, /, **kwds)
- __repr__(self) from collections.Point
- Return a nicely formatted representation string
- _asdict(self) from collections.Point
- Return a new dict which maps field names to their values.
- _replace(self, /, **kwds) from collections.Point
- Return a new Point object replacing specified fields with new values
Class methods defined here:
- _make(iterable) from collections.Point
- Make a new Point object from a sequence or iterable
Static methods defined here:
- __new__(_cls, position_x: float, position_y: float, data: DataPoint) from namedtuple_Point.Point
- Create new instance of Point(position_x, position_y, data)
Data descriptors defined here:
- position_x
- Alias for field number 0
- position_y
- Alias for field number 1
- data
- Alias for field number 2
Data and other attributes defined here:
- __classdictcell__ = <cell at 0x000001532565F010: dict object>
- __match_args__ = ('position_x', 'position_y', 'data')
- __orig_bases__ = (<function NamedTuple>,)
- _field_defaults = {}
- _fields = ('position_x', 'position_y', 'data')
Methods inherited from builtins.tuple:
- __add__(self, value, /)
- Return self+value.
- __contains__(self, key, /)
- Return bool(key in self).
- __eq__(self, value, /)
- Return self==value.
- __ge__(self, value, /)
- Return self>=value.
- __getitem__(self, key, /)
- Return self[key].
- __gt__(self, value, /)
- Return self>value.
- __hash__(self, /)
- Return hash(self).
- __iter__(self, /)
- Implement iter(self).
- __le__(self, value, /)
- Return self<=value.
- __len__(self, /)
- Return len(self).
- __lt__(self, value, /)
- Return self<value.
- __mul__(self, value, /)
- Return self*value.
- __ne__(self, value, /)
- Return self!=value.
- __rmul__(self, value, /)
- Return value*self.
- count(self, value, /)
- Return number of occurrences of value.
- index(self, value, start=0, stop=9223372036854775807, /)
- Return first index of value.
Raises ValueError if the value is not present.
Class methods inherited from builtins.tuple:
- __class_getitem__(object, /)
- See PEP 585
|
class SVGChart(builtins.object) |
| |
SVGChart(
width: int = 600,
height: int = 400,
margin: int = 40,
margin_left: Optional[int] = None,
margin_right: Optional[int] = None,
margin_top: Optional[int] = None,
margin_bottom: Optional[int] = None,
theme: str = 'light'
)
SVG chart renderer. |
| |
Methods defined here:
- __init__(
self,
width: int = 600,
height: int = 400,
margin: int = 40,
margin_left: Optional[int] = None,
margin_right: Optional[int] = None,
margin_top: Optional[int] = None,
margin_bottom: Optional[int] = None,
theme: str = 'light'
)
- Initialize SVG chart canvas.
- add_x_zone(self, xmin: Number, xmax: Number, color: str, opacity: float = 0.2) -> None
- Add a vertical background zone.
- add_y_zone(self, ymin: Number, ymax: Number, color: str, opacity: float = 0.2) -> None
- Add an horizontal background zone.
- axes(
self,
xmin: Union[Number, date, datetime],
xmax: Union[Number, date, datetime],
ymin: Number,
ymax: Number,
xticks: Union[int, List[Union[int, date, datetime]]] = 5,
yticks: int = 5,
bar: bool = True,
hbar: bool = False
) -> None
- Draw chart axes and grid.
- compute_bar_layout(
self,
xmax: int,
bars_per_group: int = 1,
bar_width_ratio: float = 0.8
) -> BarLayout
- Compute common bar layout information.
- compute_bars(
self,
graph: Graph,
ymin: Number,
ymax: Number,
xmax: int,
bar_width_ratio: float = 0.8
) -> List[Bar]
- Compute SVG rectangles for a bar chart.
- compute_boxplot(self, graphs: List[Graph]) -> List[DataBox]
- Compute boxplot statistics from graphs.
- compute_grouped_bars(
self,
graphs: List[Graph],
ymin: Number,
ymax: Number,
xmax: int,
bar_width_ratio: float = 0.8
) -> List[GroupedBar]
- Compute grouped bar layout for multiple graphs.
- compute_grouped_step_paths(
self,
graph: Graph,
ymin: Number,
ymax: Number,
xmax: int
) -> Dict[str, str]
- Compute SVG paths grouped by color.
- compute_horizontal_bar_layout(
self,
graph_count: int,
category_count: int,
plot_size: Number
) -> BarLayout
- Compute common bar layout.
- compute_horizontal_bars(
self,
graph: Graph,
xmin: Number,
xmax: Number,
ymax: int,
height: Number
) -> List[Bar]
- Compute horizontal bars.
- compute_horizontal_grouped_bars(
self,
graphs: List[Graph],
xmin: Number,
xmax: Number,
ymax: int
) -> List[GroupedBar]
- Compute grouped horizontal bars.
- compute_horizontal_stacked_bars(
self,
graphs: List[Graph],
xmin: Number,
xmax: Number,
ymax: int
) -> List[StackedBar]
- Compute stacked horizontal bars.
- compute_limits(
self,
graphs: List[Graph],
ymin: Optional[Number] = None,
ymax: Optional[Number] = None,
xmax: Optional[Union[int, date, datetime]] = None
) -> Tuple[Number, Number, int]
- Compute graph boundaries.
- compute_pie_slices(self, graph: Graph) -> List[Tuple[DataPoint, float, float]]
- Compute pie slices (start_angle, end_angle).
- compute_polyline(self, graph: Graph, ymin: Number, ymax: Number, xmax: int) -> str
- Compute SVG polyline points.
- compute_radar(self, graphs: List[Graph]) -> tuple
- Compute radar chart geometry.
- compute_radar_labels(
self,
graph: Graph,
cx: Number,
cy: Number,
radius: Number,
angles: List[float],
offset: Number = 15
) -> List[Tuple[Number, Number, str]]
- Compute radar labels.
- compute_radar_points(
self,
graph: Graph,
radius: Number,
rmax: Number,
cx: Number,
cy: Number,
angles: List[float]
) -> str
- Compute radar polygon points.
- compute_radar_ring(
self,
cx: Number,
cy: Number,
radius: Number,
angles: List[float]
) -> str
- Compute radar ring polygon.
- compute_segments(self, graph: Graph, ymin: Number, ymax: Number, xmax: int) -> List[Tuple[Point, Point]]
- Compute graph line segments.
- compute_stacked_bars(
self,
graphs: List[Graph],
ymin: Number,
ymax: Number,
xmax: int,
bar_width_ratio: float = 0.8
) -> List[StackedBar]
- Compute stacked bar layout.
- compute_step_paths(self, graph: Graph, ymin: Number, ymax: Number, xmax: int) -> List[Tuple[str, str]]
- Compute SVG paths grouped by contiguous colors.
Returns: [(path_d, color)]
- compute_svg_points(self, graph: Graph, ymin: Number, ymax: Number, xmax: int) -> List[Point]
- Compute SVG coordinates for a graph.
- compute_x_ticks(
self,
xmin: Union[Number, date, datetime],
xmax: Union[Number, date, datetime],
xticks: Union[int, List[Union[Number, date, datetime]]],
bar: bool = True
) -> List[Tuple[float, str]]
- Compute X tick positions and labels.
- compute_y_ticks(
self,
ymin: Number,
ymax: Number,
yticks: Union[int, List],
hbar: bool = False
) -> List[Tuple[float, str]]
- Compute Y tick positions and labels.
- draw_bar(self, bar: Bar, color: str, *args, **kwargs) -> None
- Draw a single bar.
- draw_bars(
self,
graph: Graph,
ymin: Number,
ymax: Number,
xmax: int,
width: Number,
*args,
**kwargs
) -> None
- Draw graph bars.
- draw_boxplot(self, boxes: List[DataBox], *args, **kwargs) -> None
- Draw boxplot from precomputed statistics.
- draw_circle(
self,
x: Number,
y: Number,
radius: Number,
color: str,
stroke: Optional[str] = None,
stroke_width: int = 1,
opacity: int = 1,
fill_opacity: Optional[Number] = None,
stroke_opacity: Optional[Number] = None
) -> None
- Draw a SVG circle.
- draw_gradient_line(
self,
graph: Graph,
ymin: Number,
ymax: Number,
xmax: int,
*args,
**kwargs
) -> None
- Draw a gradient line.
- draw_gradient_segment(
self,
start: Point,
end: Point,
start_color: str,
end_color: str,
*args,
**kwargs
) -> None
- Draw a gradient line segment.
- draw_graph(
self,
graph: Graph,
ymin: Number,
ymax: Number,
xmax: int,
line_renderer: Optional[Callable] = None,
point_renderer: Optional[Callable] = None,
args_line: List[Any] = [],
kwargs_line: Dict[str, Any] = {},
args_point: List[Any] = [],
kwargs_point: Dict[str, Any] = {}
) -> None
- Draw a graph with its line and optional points.
- draw_grouped_bars(
self,
graphs: List[Graph],
ymin: Number,
ymax: Number,
xmax: int,
*args,
**kwargs
) -> None
- Draw grouped bar charts.
- draw_horizontal_bars(
self,
graph: Graph,
xmin: Number,
xmax: Number,
ymax: int,
height: Number,
*args,
**kwargs
) -> None
- Draw horizontal graph bars.
- draw_horizontal_grouped_bars(
self,
graphs: List[Graph],
xmin: Number,
xmax: Number,
ymax: int,
*args,
**kwargs
) -> None
- Draw grouped horizontal bars.
- draw_horizontal_stacked_bars(
self,
graphs: List[Graph],
xmin: Number,
xmax: Number,
ymax: int,
*args,
**kwargs
) -> None
- Draw stacked horizontal bars.
- draw_legend(
self,
graphs: List[Graph],
x: Optional[Number] = None,
y: Optional[Number] = None,
*args,
**kwargs
) -> None
- Draw graph legend.
- draw_line(
self,
x1: Number,
y1: Number,
x2: Number,
y2: Number,
stroke: str,
width: int = 2,
dasharray: Optional[Tuple[int, int]] = None,
opacity: float = 1,
stroke_opacity: Optional[Number] = None
) -> None
- Draw a SVG line.
- draw_path(
self,
path: str,
stroke: str,
width: int = 2,
fill: Optional[str] = None,
opacity: float = 1,
fill_opacity: Optional[Number] = None,
stroke_opacity: Optional[Number] = None
) -> None
- Draw a SVG path.
- draw_pie(
self,
graph: Graph,
radius: Optional[Number] = None,
center: Optional[tuple] = None,
*args,
**kwargs
) -> None
- Draw pie chart.
- draw_pie_legend(
self,
graph: Graph,
x: Optional[Number] = None,
y: Optional[Number] = None,
*args,
**kwargs
) -> None
- Draw legend for pie chart.
- draw_points(
self,
graph: Graph,
ymin: Number,
ymax: Number,
xmax: int,
*args,
radius: int = 3,
**kwargs
) -> None
- Draw graph points.
- draw_polygon(
self,
points: str,
stroke: str,
fill: Optional[str] = None,
stroke_width: int = 1,
opacity: float = 1,
dasharray: Optional[Tuple[Number, Number]] = None,
fill_opacity: Optional[Number] = None,
stroke_opacity: Optional[Number] = None
) -> None
- Draw a SVG polygon.
- draw_polyline(
self,
graph: Graph,
ymin: Number,
ymax: Number,
xmax: int,
fill: str = 'none',
width: int = 2,
opacity: float = 1,
stroke_opacity: Optional[Number] = None
) -> None
- Draw a polyline for a graph.
- draw_radar(self, graphs: List[Graph], *args, **kwargs) -> None
- Draw radar chart.
- draw_radar_grid(
self,
cx: Number,
cy: Number,
radius: Number,
angles: List[float],
rings: int = 5
) -> None
- Draw radar grid.
- draw_radar_labels(
self,
graph: Graph,
cx: Number,
cy: Number,
radius: Number,
angles: List[float],
offset: Number = 15,
**kwargs
) -> None
- Draw radar labels.
- draw_rect(
self,
x: Number,
y: Number,
width: Number,
height: Number,
fill: str,
stroke: Optional[str] = None,
stroke_width: int = 1,
opacity: float = 1,
fill_opacity: Optional[Number] = None,
stroke_opacity: Optional[Number] = None
) -> None
- Draw a SVG rectangle.
- draw_segment(self, start: Point, end: Point, stroke: str, *args, **kwargs) -> None
- Draw a line segment.
- draw_stacked_bars(
self,
graphs: List[Graph],
ymin: Number,
ymax: Number,
xmax: int,
*args,
**kwargs
) -> None
- Draw stacked bars.
- draw_step_line(
self,
graph: Graph,
ymin: Number,
ymax: Number,
xmax: int,
*args,
**kwargs
) -> None
- Draw a line split whenever the point color changes.
- draw_step_line_grouped(
self,
graph: Graph,
ymin: Number,
ymax: Number,
xmax: int,
*args,
**kwargs
) -> None
- Draw grouped line segments sharing the same color.
- draw_text(
self,
x: Number,
y: Number,
text: str,
color: str,
font_size: int = 12,
anchor: str = 'middle',
opacity: float = 1
) -> None
- Draw a SVG text.
- draw_x_axis(self) -> None
- Draw the horizontal axis.
- draw_x_grid_line(self, x: Number, dasharray: Tuple[int, int] = (4, 4)) -> None
- Draw a vertical grid line.
- draw_x_label(self, x: Number, label: str, *args, **kwargs) -> None
- Draw X axis label.
- draw_x_tick(self, x: Number) -> None
- Draw a tick on the X axis.
- draw_x_zones(self, xmin: Number, xmax: Number) -> None
- Draw vertical background bands.
- draw_y_axis(self) -> None
- Draw the vertical axis.
- draw_y_grid_line(self, y: Number, dasharray: Tuple[int, int] = (4, 4)) -> None
- Draw a horizontal grid line.
- draw_y_label(self, y: Number, label: str, *args, **kwargs) -> None
- Draw Y axis label.
- draw_y_tick(self, y: Number) -> None
- Draw a tick on the Y axis.
- draw_y_zones(self, ymin: Number, ymax: Number) -> None
- Draw horizontal background zones.
- format_tick_value(
self,
value: Union[Number, date, datetime],
is_timestamp: bool = False
) -> str
- Format a tick value for display.
- plot_bars(self, graphs: List[Graph], bar_width_ratio: float = 0.6, **kwargs) -> None
- Plot bar charts.
- plot_boxplots(self, graphs: List[Graph], *args, **kwargs) -> None
- Plot boxplots.
- plot_gradient_lines(self, graphs: List[Graph], *args, **kwargs) -> None
- Plot lines with color gradients.
- plot_grouped_bars(self, graphs: List[Graph], *args, **kwargs) -> None
- Plot grouped bar charts.
- plot_horizontal_bars(
self,
graphs: List[Graph],
bar_height_ratio: float = 0.6,
**kwargs
) -> None
- Plot horizontal bar charts.
- plot_horizontal_grouped_bars(self, graphs: List[Graph], *args, **kwargs) -> None
- Plot grouped horizontal bar charts.
- plot_horizontal_stacked_bars(self, graphs: List[Graph], *args, **kwargs) -> None
- Plot stacked horizontal bar charts.
- plot_line(self, graph: Graph, *args, **kwargs) -> None
- Plot line chart.
- plot_lines(self, graphs: List[Graph], *args, **kwargs) -> None
- Plot line charts.
- plot_pie(self, graph: Graph, *args, **kwargs) -> None
- Plot pie chart.
- plot_radar(self, graphs: List[Graph], *args, **kwargs) -> None
- Plot radar chart.
- plot_stacked_bars(self, graphs: List[Graph], *args, **kwargs) -> None
- Plot stacked bar charts.
- plot_step_lines(self, graphs: List[Graph], *args, **kwargs) -> None
- Plot step lines with color changes.
- plot_step_lines_optimized(self, graphs, *args, **kwargs) -> None
- Plot optimized step lines grouped by color.
- prepare_horizontal_plot(
self,
graphs: List[Graph],
xmin: Optional[Number] = None,
xmax: Optional[Number] = None,
ymin: Number = 0,
ymax: Optional[int] = None
) -> Tuple[Number, Number, int]
- Prepare axes and bounds for horizontal bar charts.
- prepare_plot(
self,
graphs: List[Graph],
ymin: Optional[Number] = None,
ymax: Optional[Number] = None,
xmin: Union[int, date, datetime] = 0,
xmax: Optional[Union[int, date, datetime]] = None,
draw_axes: bool = True,
bar: bool = False
) -> Tuple[Number, Number, int]
- Prepare a line chart before drawing.
- render(self) -> str
- Return the full SVG string.
- save(self, filename: str) -> None
- Save the rendered SVG to a file.
- segment_to_path(self, start: Point, end: Point) -> str
- Convert a segment to an SVG path command.
Static methods defined here:
- verify_graphs_names(graphs: List[Graph]) -> Union[bool, List[str]]
- Checks that all graphs have the same names.
Returns:
False: If the graphs do not contain the same names.
False: If any name is not defined (None).
List[str]: The list of names if all graphs match.
Data descriptors defined here:
- __dict__
- dictionary for instance variables
- __weakref__
- list of weak references to the object
Data and other attributes defined here:
- colors = ['red', 'blue', 'green', 'orange', 'purple', 'yellow', 'magenta', 'cyan', 'pink', 'lime', 'brown', 'black', 'lavenderblush', 'dimgrey', 'lightpink', 'dimgray', 'hotpink', 'white', 'darkmagenta', 'whitesmoke', ...]
|
class StackedBar(builtins.tuple) |
| |
StackedBar(
position_x: Number,
position_y: Number,
width: Number,
height: Number,
data: DataPoint,
graph: Graph
)
SVG rectangle for a stacked bar. |
| |
- Method resolution order:
- StackedBar
- builtins.tuple
- builtins.object
Methods defined here:
- __getnewargs__(self) from collections.StackedBar
- Return self as a plain tuple. Used by copy and pickle.
- __replace__ = _replace(self, /, **kwds)
- __repr__(self) from collections.StackedBar
- Return a nicely formatted representation string
- _asdict(self) from collections.StackedBar
- Return a new dict which maps field names to their values.
- _replace(self, /, **kwds) from collections.StackedBar
- Return a new StackedBar object replacing specified fields with new values
Class methods defined here:
- _make(iterable) from collections.StackedBar
- Make a new StackedBar object from a sequence or iterable
Static methods defined here:
- __new__(
_cls,
position_x: Number,
position_y: Number,
width: Number,
height: Number,
data: DataPoint,
graph: Graph
) from namedtuple_StackedBar.StackedBar
- Create new instance of StackedBar(position_x, position_y, width, height, data, graph)
Data descriptors defined here:
- position_x
- Alias for field number 0
- position_y
- Alias for field number 1
- width
- Alias for field number 2
- height
- Alias for field number 3
- data
- Alias for field number 4
- graph
- Alias for field number 5
Data and other attributes defined here:
- __classdictcell__ = <cell at 0x000001532566A620: dict object>
- __match_args__ = ('position_x', 'position_y', 'width', 'height', 'data', 'graph')
- __orig_bases__ = (<function NamedTuple>,)
- _field_defaults = {}
- _fields = ('position_x', 'position_y', 'width', 'height', 'data', 'graph')
Methods inherited from builtins.tuple:
- __add__(self, value, /)
- Return self+value.
- __contains__(self, key, /)
- Return bool(key in self).
- __eq__(self, value, /)
- Return self==value.
- __ge__(self, value, /)
- Return self>=value.
- __getitem__(self, key, /)
- Return self[key].
- __gt__(self, value, /)
- Return self>value.
- __hash__(self, /)
- Return hash(self).
- __iter__(self, /)
- Implement iter(self).
- __le__(self, value, /)
- Return self<=value.
- __len__(self, /)
- Return len(self).
- __lt__(self, value, /)
- Return self<value.
- __mul__(self, value, /)
- Return self*value.
- __ne__(self, value, /)
- Return self!=value.
- __rmul__(self, value, /)
- Return value*self.
- count(self, value, /)
- Return number of occurrences of value.
- index(self, value, start=0, stop=9223372036854775807, /)
- Return first index of value.
Raises ValueError if the value is not present.
Class methods inherited from builtins.tuple:
- __class_getitem__(object, /)
- See PEP 585
|
class Tick(builtins.tuple) |
| |
Tick(position: int, label: Union[str, Number])
Position and label of an axis tick. |
| |
- Method resolution order:
- Tick
- builtins.tuple
- builtins.object
Methods defined here:
- __getnewargs__(self) from collections.Tick
- Return self as a plain tuple. Used by copy and pickle.
- __replace__ = _replace(self, /, **kwds)
- __repr__(self) from collections.Tick
- Return a nicely formatted representation string
- _asdict(self) from collections.Tick
- Return a new dict which maps field names to their values.
- _replace(self, /, **kwds) from collections.Tick
- Return a new Tick object replacing specified fields with new values
Class methods defined here:
- _make(iterable) from collections.Tick
- Make a new Tick object from a sequence or iterable
Static methods defined here:
- __new__(_cls, position: int, label: Union[str, Number]) from namedtuple_Tick.Tick
- Create new instance of Tick(position, label)
Data descriptors defined here:
- position
- Alias for field number 0
- label
- Alias for field number 1
Data and other attributes defined here:
- __classdictcell__ = <cell at 0x000001532566B1C0: dict object>
- __match_args__ = ('position', 'label')
- __orig_bases__ = (<function NamedTuple>,)
- _field_defaults = {}
- _fields = ('position', 'label')
Methods inherited from builtins.tuple:
- __add__(self, value, /)
- Return self+value.
- __contains__(self, key, /)
- Return bool(key in self).
- __eq__(self, value, /)
- Return self==value.
- __ge__(self, value, /)
- Return self>=value.
- __getitem__(self, key, /)
- Return self[key].
- __gt__(self, value, /)
- Return self>value.
- __hash__(self, /)
- Return hash(self).
- __iter__(self, /)
- Implement iter(self).
- __le__(self, value, /)
- Return self<=value.
- __len__(self, /)
- Return len(self).
- __lt__(self, value, /)
- Return self<value.
- __mul__(self, value, /)
- Return self*value.
- __ne__(self, value, /)
- Return self!=value.
- __rmul__(self, value, /)
- Return value*self.
- count(self, value, /)
- Return number of occurrences of value.
- index(self, value, start=0, stop=9223372036854775807, /)
- Return first index of value.
Raises ValueError if the value is not present.
Class methods inherited from builtins.tuple:
- __class_getitem__(object, /)
- See PEP 585
|
class Zone(builtins.tuple) |
| |
Zone(position_low: Number, position_hight: Number, color: str, opacity: float)
SVG zone in charts. |
| |
- Method resolution order:
- Zone
- builtins.tuple
- builtins.object
Methods defined here:
- __getnewargs__(self) from collections.Zone
- Return self as a plain tuple. Used by copy and pickle.
- __replace__ = _replace(self, /, **kwds)
- __repr__(self) from collections.Zone
- Return a nicely formatted representation string
- _asdict(self) from collections.Zone
- Return a new dict which maps field names to their values.
- _replace(self, /, **kwds) from collections.Zone
- Return a new Zone object replacing specified fields with new values
Class methods defined here:
- _make(iterable) from collections.Zone
- Make a new Zone object from a sequence or iterable
Static methods defined here:
- __new__(
_cls,
position_low: Number,
position_hight: Number,
color: str,
opacity: float
) from namedtuple_Zone.Zone
- Create new instance of Zone(position_low, position_hight, color, opacity)
Data descriptors defined here:
- position_low
- Alias for field number 0
- position_hight
- Alias for field number 1
- color
- Alias for field number 2
- opacity
- Alias for field number 3
Data and other attributes defined here:
- __classdictcell__ = <cell at 0x000001532566AE00: dict object>
- __match_args__ = ('position_low', 'position_hight', 'color', 'opacity')
- __orig_bases__ = (<function NamedTuple>,)
- _field_defaults = {}
- _fields = ('position_low', 'position_hight', 'color', 'opacity')
Methods inherited from builtins.tuple:
- __add__(self, value, /)
- Return self+value.
- __contains__(self, key, /)
- Return bool(key in self).
- __eq__(self, value, /)
- Return self==value.
- __ge__(self, value, /)
- Return self>=value.
- __getitem__(self, key, /)
- Return self[key].
- __gt__(self, value, /)
- Return self>value.
- __hash__(self, /)
- Return hash(self).
- __iter__(self, /)
- Implement iter(self).
- __le__(self, value, /)
- Return self<=value.
- __len__(self, /)
- Return len(self).
- __lt__(self, value, /)
- Return self<value.
- __mul__(self, value, /)
- Return self*value.
- __ne__(self, value, /)
- Return self!=value.
- __rmul__(self, value, /)
- Return value*self.
- count(self, value, /)
- Return number of occurrences of value.
- index(self, value, start=0, stop=9223372036854775807, /)
- Return first index of value.
Raises ValueError if the value is not present.
Class methods inherited from builtins.tuple:
- __class_getitem__(object, /)
- See PEP 585
| |