code: def get_forecast_component_props(
      fcst,
      comp_name,
      plot_name=None,
      multiplicative=False,
      bar=False,
      rolling=None,
      add_x=False,
      fill=False,
      num_overplot=None,
      **kwargs,
  ):
      """
      Prepares a dictionary for plotting the selected forecast component with plotly.
  
      Parameters
      ----------
          fcst : pd.DataFrame
              Output of m.predict
          comp_name : str
              Name of the component to plot
          plot_name : str
              Name of the plot
          multiplicative : bool
              Flag whetther to plot the y-axis as percentage
          bar : bool
              Flag whether to plot the component as a bar
          rolling : int
              Rolling average to underplot
          add_x : bool
              Flag whether to add x-symbols to the plotted points
          fill : bool
              Add fill between signal and x(y=0) axis
          num_overplot: int
              the number of forecast in focus
      Returns
      -------
          Dictionary with plotly traces, xaxis and yaxis
      """
      cross_symbol = "x"
      cross_marker_color = "blue"
  
      if plot_name is None:
          plot_name = comp_name
  
      # Remove empty rows for the respective component
      fcst = fcst.loc[fcst[comp_name].notna()]
  
      text = None
      mode = "lines"
      fcst_t = fcst["ds"].dt.to_pydatetime()
  
      traces = []
      if rolling is not None:
          rolling_avg = (
              fcst[comp_name]
              .rolling(rolling, min_periods=1, center=True)
              .mean()
          )
          if bar:
              traces.append(
                  go.Bar(
                      name=plot_name,
                      x=fcst_t,
                      y=rolling_avg,
                      text=text,
                      color=prediction_color,
                      opacity=0.5,
                      showlegend=False,
                  )
              )
          else:
              traces.append(
                  go.Scatter(
                      name=plot_name,
                      x=fcst_t,
                      y=rolling_avg,
                      mode=mode,
                      line=go.scatter.Line(
                          color=prediction_color, width=line_width
                      ),
                      text=text,
                      opacity=0.5,
                      showlegend=False,
                  )
              )
  
              if add_x:
                  traces.append(
                      go.Scatter(
                          x=fcst_t,
                          y=fcst[comp_name],
                          mode="markers",
                          marker=dict(
                              color=cross_marker_color,
                              size=marker_size,
                              symbol=cross_symbol,
                          ),
                          showlegend=False,
                      )
                  )
  
      y = fcst[comp_name].values
  
      if "uncertainty" in plot_name.lower():
          if num_overplot is not None:
              y = (
                  fcst[comp_name].values
                  - fcst[f"yhat{num_overplot}"].values
              )
          else:
              y = fcst[comp_name].values - fcst["yhat1"].values
      if bar:
          traces.append(
              go.Bar(
                  name=plot_name,
                  x=fcst_t,
                  y=y,
                  text=text,
                  marker_color=prediction_color,
                  showlegend=False,
              )
          )
      elif "uncertainty" in plot_name.lower() and fill:
          filling = "tozeroy"
          traces.append(
              go.Scatter(
                  name=comp_name,
                  x=fcst_t,
                  y=y,
                  text=text,
                  fill=filling,
                  mode="lines",
                  line=dict(color="rgba(45, 146, 255, 0.2)", width=1),
                  fillcolor="rgba(45, 146, 255, 0.2)",
                  showlegend=True,
              )
          )
      else:
          traces.append(
              go.Scatter(
                  name=plot_name,
                  x=fcst_t,
                  y=y,
                  mode=mode,
                  line=go.scatter.Line(
                      color=prediction_color, width=line_width
                  ),
                  text=text,
                  showlegend=False,
              )
          )
  
          if add_x:
              traces.append(
                  go.Scatter(
                      x=fcst_t,
                      y=fcst[comp_name],
                      mode="markers",
                      marker=dict(
                          color=cross_marker_color,
                          size=marker_size,
                          symbol=cross_symbol,
                      ),
                      showlegend=False,
                  )
              )
      padded_range = get_dynamic_axis_range(list(fcst["ds"]), type="dt")
      xaxis = go.layout.XAxis(
          title="ds", type="date", range=padded_range
      )
      yaxis = go.layout.YAxis(
          title=plot_name,
          rangemode="normal" if comp_name == "trend" else "tozero",
      )
  
      if multiplicative:
          yaxis.update(tickformat=".1%", hoverformat=".4%")
  
      return {"traces": traces, "xaxis": xaxis, "yaxis": yaxis}
  
file_path: neural_prophet/neuralprophet/plot_forecast_plotly.py
imports: import logging
  import numpy
  import pandas
  from neuralprophet.plot_model_parameters_plotly import get_dynamic_axis_range
  from neuralprophet.plot_utils import set_y_as_percent
label_desc: Use image node_id 3 for calling a global function with example usage: get_forecast_component_props(fcst, comp_name, plot_name, multiplicative, bar, rolling, add_x, fill, num_overplot) and returns: dict