def Donut(data, label='index', values=None, color=None, agg=None, hover_tool=True, hover_text=None, plot_height=400, plot_width=400, xgrid=False, ygrid=False, **kw):
 kw['label'] = label
 kw['values'] = values
 kw['color'] = color
 kw['xgrid'] = xgrid
 kw['ygrid'] = ygrid
 kw['plot_height'] = plot_height
 kw['plot_width'] = plot_width
 if (agg is not None):
  kw['agg'] = agg
 chart = create_and_build(DonutBuilder, data, **kw)
 chart.left[0].visible = False
 chart.below[0].visible = False
 (values, agg) = derive_aggregation(dim_cols=label, agg_col=values, agg=agg)
 if hover_tool:
  tooltip = build_agg_tooltip(hover_text=hover_text, aggregated_col=values, agg_text=agg)
  chart.add_tools(HoverTool(tooltips=[tooltip]))
 return chart

def Donut ( data , label = 'index' , values = None , color = None , agg = None , hover_tool = True , hover_text = None , plot_height = 400 , plot_width = 400 , xgrid = False , ygrid = False , ** kw ) : kw [ 'label' ] = label kw [ 'values' ] = values kw [ 'color' ] = color kw [ 'xgrid' ] = xgrid kw [ 'ygrid' ] = ygrid kw [ 'plot_height' ] = plot_height kw [ 'plot_width' ] = plot_width if ( agg is not None ) : kw [ 'agg' ] = agg chart = create_and_build ( DonutBuilder , data , ** kw ) chart . left [ 0 ] . visible = False chart . below [ 0 ] . visible = False ( values , agg ) = derive_aggregation ( dim_cols = label , agg_col = values , agg = agg ) if hover_tool : tooltip = build_agg_tooltip ( hover_text = hover_text , aggregated_col = values , agg_text = agg ) chart . add_tools ( HoverTool ( tooltips = [ tooltip ] ) ) return chart
create a donut chart containing one or more layers from table-like data .