msticpy.vis.timeline_values module

Timeline values Bokeh plot.

class msticpy.vis.timeline_values.PlotParams(time_column: str | None = None, height: int | None = None, width: int = 900, title: str | None = None, yaxis: bool = True, range_tool: bool = True, group_by: str | None = None, legend: str | None = None, xgrid: bool = True, ygrid: bool = False, hide: bool = False, color: str = 'navy', kind: str | List[str] = 'vbar', ylabel_cols: Iterable[str] = NOTHING, ref_event: Any | None = None, ref_time: datetime | None = None, ref_events: DataFrame | None = None, ref_col: str | None = None, ref_time_col: str | None = None, ref_times: List[Tuple[datetime, str]] | None = None, source_columns: List = [])

Bases: object

Plot params for time_duration.

Method generated by attrs for class PlotParams.

color: str
classmethod field_list() List[str]

Return field names as a list.

group_by: str | None
height: int | None
hide: bool
kind: str | List[str]
legend: str | None
range_tool: bool
ref_col: str | None
ref_event: Any | None
ref_events: DataFrame | None
ref_time: datetime | None
ref_time_col: str | None
ref_times: List[Tuple[datetime, str]] | None
source_columns: List
time_column: str | None
title: str | None
width: int
xgrid: bool
yaxis: bool
ygrid: bool
ylabel_cols: Iterable[str]
msticpy.vis.timeline_values.display_timeline_values(data: DataFrame, value_column: str | None = None, time_column: str = 'TimeGenerated', source_columns: list | None = None, **kwargs) bokeh.models.LayoutDOM

Display a timeline of events.

  • data (pd.DataFrame) – DataFrame as a single data set or grouped into individual plot series using the group_by parameter

  • time_column (str, optional) – Name of the timestamp column (the default is ‘TimeGenerated’)

  • value_column (str) – The column name holding the value to plot vertically

  • source_columns (list, optional) – List of default source columns to use in tooltips (the default is None)

  • x (str, optional) – alias of time_column

  • y (str, optional) – alias of value_column

  • value_col (str, optional) – alias of value_column

  • title (str, optional) – Title to display (the default is None)

  • ref_event (Any, optional) – Add a reference line/label using the alert time (the default is None)

  • ref_time (datetime, optional) – Add a reference line/label using ref_time (the default is None)

  • ref_label (str, optional) – A label for the ref_event or ref_time reference item

  • group_by (str) – (where data is a DataFrame) The column to group timelines on

  • legend (str, optional) – “left”, “right”, “inline” or “none” (the default is to show a legend when plotting multiple series and not to show one when plotting a single series)

  • yaxis (bool, optional) – Whether to show the yaxis and labels

  • range_tool (bool, optional) – Show the the range slider tool (default is True)

  • height (int, optional) – The height of the plot figure (the default is auto-calculated height)

  • width (int, optional) – The width of the plot figure (the default is 900)

  • color (str) – Default series color (default is “navy”). This is overridden by automatic color assignments if plotting a grouped chart

  • kind (Union[str, List[str]]) – one or more glyph types to plot., optional Supported types are “circle”, “line” and “vbar” (default is “vbar”)

  • hide (bool, optional) – If True, create but do not display the plot. By default, False.

  • ref_events (pd.DataFrame, optional) – Add references line/label using the event times in the dataframe. (the default is None)

  • ref_time_col (str, optional) – Add references line/label using the this column in ref_events for the time value (x-axis). (this defaults the value of the time_column parameter or ‘TimeGenerated’ time_column is None)

  • ref_col (str, optional) – The column name to use for the label from ref_events (the default is None)

  • ref_times (List[Tuple[datetime, str]], optional) – Add one or more reference line/label using (the default is None)


The bokeh plot figure.

Return type: