MCPcopy Index your code
hub / github.com/plotly/plotly.py / _get_jconfig

Function _get_jconfig

plotly/offline/offline.py:106–178  ·  view source on GitHub ↗
(config=None)

Source from the content-addressed store, hash-verified

104
105
106def _get_jconfig(config=None):
107 configkeys = (
108 "staticPlot",
109 "typesetMath",
110 "plotlyServerURL",
111 "editable",
112 "edits",
113 "editSelection",
114 "autosizable",
115 "responsive",
116 "fillFrame",
117 "frameMargins",
118 "scrollZoom",
119 "doubleClick",
120 "doubleClickDelay",
121 "showAxisDragHandles",
122 "showAxisRangeEntryBoxes",
123 "showTips",
124 "displayNotifier",
125 "showLink",
126 "linkText",
127 "sendData",
128 "showSources",
129 "displayModeBar",
130 "showSendToCloud",
131 "showEditInChartStudio",
132 "modeBarButtonsToRemove",
133 "modeBarButtonsToAdd",
134 "modeBarButtons",
135 "toImageButtonOptions",
136 "displaylogo",
137 "watermark",
138 "plotGlPixelRatio",
139 "setBackground",
140 "topojsonURL",
141 "mapboxAccessToken",
142 "logging",
143 "notifyOnLogging",
144 "queueLength",
145 "locale",
146 "locales",
147 )
148
149 if config and isinstance(config, dict):
150 # Warn user on unrecognized config options. We make this a warning
151 # rather than an error since we don't have code generation logic in
152 # place yet to guarantee that the config options in plotly.py are up
153 # to date
154 bad_config = [k for k in config if k not in configkeys]
155 if bad_config:
156 warnings.warn(
157 """
158Unrecognized config options supplied: {bad_config}""".format(bad_config=bad_config)
159 )
160
161 clean_config = config
162 else:
163 clean_config = {}

Callers 3

__init__Method · 0.90
to_htmlFunction · 0.90
to_mimebundleMethod · 0.90

Calls 3

formatMethod · 0.45
getMethod · 0.45
replaceMethod · 0.45

Tested by

no test coverage detected