class_docstr: Trading visualization for TensorTrade using Plotly.
  
  Parameters
  ----------
  display : bool
      True to display the chart on the screen, False for not.
  height : int
      Chart height in pixels. Affects both display and saved file
      charts. Set to None for 100% height. Default is None.
  save_format : str
      A format to save the chart to. Acceptable formats are
      html, png, jpeg, webp, svg, pdf, eps. All the formats except for
      'html' require Orca. Default is None for no saving.
  path : str
      The path to save the char to if save_format is not None. The folder
      will be created if not found.
  filename_prefix : str
      A string that precedes automatically-created file name
      when charts are saved. Default 'chart_'.
  timestamp_format : str
      The format of the date shown in the chart title.
  auto_open_html : bool
      Works for save_format='html' only. True to automatically
      open the saved chart HTML file in the default browser, False otherwise.
  include_plotlyjs : Union[bool, str]
      Whether to include/load the plotly.js library in the saved
      file. 'cdn' results in a smaller file by loading the library online but
      requires an Internet connect while True includes the library resulting
      in much larger file sizes. False to not include the library. For more
      details, refer to https://plot.ly/python-api-reference/generated/plotly.graph_objects.Figure.html
  
  Notes
  -----
  Possible Future Enhancements:
      - Saving images without using Orca.
      - Limit displayed step range for the case of a large number of steps and let
        the shown part of the chart slide after filling that range to keep showing
        recent data as it's being added.
  
  References
  ----------
  .. [1] https://plot.ly/python-api-reference/generated/plotly.graph_objects.Figure.html
  .. [2] https://plot.ly/python/figurewidget/
  .. [3] https://plot.ly/python/subplots/
  .. [4] https://plot.ly/python/reference/#candlestick
  .. [5] https://plot.ly/python/#chart-events
class_docstr_tok: ["Trading","visualization","for","TensorTrade","using","Plotly",".","Parameters","--","--","--","--","--","display",":","bool","True","to","display","the","chart","on","the","screen",",","False","for","not",".","height",":","int","Chart","height","in","pixels",".","Affects","both","display","and","saved","file","charts",".","Set","to","None","for","100","%","height",".","Default","is","None",".","save_format",":","str","A","format","to","save","the","chart","to",".","Acceptable","formats","are","html",",","png",",","jpeg",",","webp",",","svg",",","pdf",",","eps",".","All","the","formats","except","for","'html","'","require","Orca",".","Default","is","None","for","no","saving",".","path",":","str","The","path","to","save","the","char","to","if","save_format","is","not","None",".","The","folder","will","be","created","if","not","found",".","filename_prefix",":","str","A","string","that","precedes","automatically-created","file","name","when","charts","are","saved",".","Default","'chart_","'",".","timestamp_format",":","str","The","format","of","the","date","shown","in","the","chart","title",".","auto_open_html",":","bool","Works","for","save_format='html","'","only",".","True","to","automatically","open","the","saved","chart","HTML","file","in","the","default","browser",",","False","otherwise",".","include_plotlyjs",":","Union","[","bool",",","str","]","Whether","to","include\/load","the","plotly.js","library","in","the","saved","file",".","'cdn","'","results","in","a","smaller","file","by","loading","the","library","online","but","requires","an","Internet","connect","while","True","includes","the","library","resulting","in","much","larger","file","sizes",".","False","to","not","include","the","library",".","For","more","details",",","refer","to","https",":","\/\/plot.ly\/python-api-reference\/generated\/plotly.graph_objects.Figure.html","Notes","--","--","-","Possible","Future","Enhancements",":","-","Saving","images","without","using","Orca",".","-","Limit","displayed","step","range","for","the","case","of","a","large","number","of","steps","and","let","the","shown","part","of","the","chart","slide","after","filling","that","range","to","keep","showing","recent","data","as","it","'s","being","added",".","References","--","--","--","--","--","..","[","1","]","https",":","\/\/plot.ly\/python-api-reference\/generated\/plotly.graph_objects.Figure.html","..","[","2","]","https",":","\/\/plot.ly\/python\/figurewidget\/","..","[","3","]","https",":","\/\/plot.ly\/python\/subplots\/","..","[","4","]","https",":","\/\/plot.ly\/python\/reference\/","#","candlestick","..","[","5","]","https",":","\/\/plot.ly\/python\/","#","chart-events"]
code: def _create_figure(self, performance_keys: dict) -> None:
      fig = make_subplots(
          rows=4,
          cols=1,
          shared_xaxes=True,
          vertical_spacing=0.03,
          row_heights=[0.55, 0.15, 0.15, 0.15],
      )
      fig.add_trace(
          go.Candlestick(
              name="Price", xaxis="x1", yaxis="y1", showlegend=False
          ),
          row=1,
          col=1,
      )
      fig.update_layout(xaxis_rangeslider_visible=False)
  
      fig.add_trace(
          go.Bar(
              name="Volume",
              showlegend=False,
              marker={"color": "DodgerBlue"},
          ),
          row=2,
          col=1,
      )
  
      for k in performance_keys:
          fig.add_trace(go.Scatter(mode="lines", name=k), row=3, col=1)
  
      fig.add_trace(
          go.Scatter(
              mode="lines",
              name="Net Worth",
              marker={"color": "DarkGreen"},
          ),
          row=4,
          col=1,
      )
  
      fig.update_xaxes(linecolor="Grey", gridcolor="Gainsboro")
      fig.update_yaxes(linecolor="Grey", gridcolor="Gainsboro")
      fig.update_xaxes(title_text="Price", row=1)
      fig.update_xaxes(title_text="Volume", row=2)
      fig.update_xaxes(title_text="Performance", row=3)
      fig.update_xaxes(title_text="Net Worth", row=4)
      fig.update_xaxes(title_standoff=7, title_font=dict(size=12))
  
      self.fig = go.FigureWidget(fig)
      self._price_chart = self.fig.data[0]
      self._volume_chart = self.fig.data[1]
      self._performance_chart = self.fig.data[2]
      self._net_worth_chart = self.fig.data[-1]
  
      self.fig.update_annotations({"font": {"size": 12}})
      self.fig.update_layout(
          template="plotly_white",
          height=self._height,
          margin=dict(t=50),
      )
      self._base_annotations = self.fig.layout.annotations
  
imports: import os
  import sys
  import logging
  import importlib
  from abc import abstractmethod
  from datetime import datetime
  from typing import Union, Tuple
  from collections import OrderedDict
  import numpy
  import pandas
  from IPython.display import display, clear_output
  from pandas.plotting import register_matplotlib_converters
  from tensortrade.oms.orders import TradeSide
  from tensortrade.env.generic import Renderer, TradingEnv
label_desc: Use image node_id 2 for calling the PlotlyTradingChart obj's underlying member method code with example usage: obj._create_figure(performance_keys) without return types