Utils
pingthings.admin.utils.permalink_helper
¶
| FUNCTION | DESCRIPTION |
|---|---|
linechart_with_power_calc |
Create a linechart in MR Plotter with an active/reactive power chart side-by-side. |
permalink_from_streams |
Create a linechart in MR plotter with the streams at specified start and end times. |
Classes¶
Functions¶
linechart_with_power_calc
¶
linechart_with_power_calc(
power_mapping: StreamMapping,
admin_conn: AdminClient,
timeseries_conn: Client,
linechart_start_ns: int,
linechart_end_ns: int,
powerchart_start_ns: int,
powerchart_end_ns: int,
pane_title: str,
chart_titles: list[str],
color_list: Sequence[str] | None = None,
) -> Permalink
Create a linechart in MR Plotter with an active/reactive power chart side-by-side.
Pay Attention to Your Start and End Times
Your power chart start and end times must be the same as your line chart, or within the timerange specified by your linechart times.
Parameters¶
power_mapping : A mapping object that stores the 4 streams needed for the power calculation in MR Plotter
admin_conn : An active connection to the admin portion of the platform
timeseries_conn : An active connection to the timeseries portion of the platform
linechart_start_ns : The start time of the linechart in nanoseconds
linechart_end_ns : The end time of the linechart in nanoseconds
powerchart_start_ns : The start time for the power calculation in nanoseconds
powerchart_end_ns : The end time for the power calculation in nanoseconds
pane_title : Title of the MR Plotter pane (top level)
chart_titles : Title for the linechart and powerchart (linechart is first, powerchart is second)
color_list : List of colors to use for the streams in the linechart, if not provided a default will be used
Returns¶
A serializable Permalink representation.
permalink_from_streams
¶
permalink_from_streams(
streams: StreamSet,
admin_conn: AdminClient,
start_ns: int,
end_ns: int,
pane_title: str,
chart_title: str,
color_list: Sequence[str] | None = None,
) -> Permalink
Create a linechart in MR plotter with the streams at specified start and end times.
Parameters¶
streams : The timeseries streams you want to plot
admin_conn : An active connection to the admin portion of the platform
start_ns : Start time of the streams you want to plot, in nanoseconds
end_ns : End time of the streams you want to plot, in nanoseconds
pane_title : Title of the MR Plotter pane (top level)
chart_title : Title for the linechart itself
color_list : List of colors to use for the streams, if not provided a default will be used
Returns¶
A serializable Permalink representation.