Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def render(df, encoding, output):
with output:
init_notebook_mode()
GraphRenderer._get_graph(encoding.chart_type).render(df, encoding, output)
def display_controls(chart_type):
display_x = GraphRenderer.display_x(chart_type)
display_y = GraphRenderer.display_y(chart_type)
return display_x or display_y
def display_controls(chart_type):
display_x = GraphRenderer.display_x(chart_type)
display_y = GraphRenderer.display_y(chart_type)
return display_x or display_y
def __init__(self, df, encoding, renderer=None, ipywidget_factory=None, encoding_widget=None, ipython_display=None,
nested_widget_mode=False, spark_events=None, testing=False, **kwargs):
assert encoding is not None
assert df is not None
assert type(df) is pd.DataFrame
kwargs['orientation'] = 'vertical'
if not testing:
super(AutoVizWidget, self).__init__((), **kwargs)
self.df = self._convert_to_displayable_dataframe(df)
if renderer is None:
renderer = GraphRenderer()
self.renderer = renderer
if ipywidget_factory is None:
ipywidget_factory = IpyWidgetFactory()
self.ipywidget_factory = ipywidget_factory
if encoding_widget is None:
encoding_widget = EncodingWidget(self.df, encoding, self.on_render_viz)
self.encoding_widget = encoding_widget
if ipython_display is None:
ipython_display = IpythonDisplay()
self.ipython_display = ipython_display
self.encoding = encoding