interval_pie_chart#
- interval_pie_chart(root: STKObjectRoot, df: DataFrame, numerical_columns: list[str], time_columns: list[str], start_column: str, stop_column: str, start_time: str, stop_time: str, title: str, dimension: str, cumulative: bool = False, color_list: list[Any] = None) Figure, Axes #
Create an interval pie chart from the provided dataframe.
- Parameters:
root :
STKObjectRoot
The STK object root.df :
DataFrame
The dataframe containing the data.numerical_columns :
list
ofstr
The list of dataframe columns with numerical values.time_columns :
list
ofstr
The list of dataframe columns with time values.start_column :
str
The column containing the start times of the intervals.stop_column :
str
The column containing the stop times of the intervals.start_time :
str
The start time of the calculation.stop_time :
str
The stop time of the calculation.title :
str
The title of the chart.dimension :
str
The dimension of the chart data.cumulative :
bool
Whether the intervals should be summed into durations and gaps (the default is False).color_list :
list
ofAny
The colors with which to color the pie chart slices (the default is None). Must have length >= 2.- Returns:
Figure
The newly created figure.Axes
The newly created axes.- Raises:
ValueError
If the length of color_list is less than 2.
Import detail#
from ansys.stk.extensions.data_analysis.graphs.graph_helpers import interval_pie_chart