def histogram(displayObject):
    options = []
    options.append(chartSize())
    if (len(displayObject.getValueFields()) > 1):
        append(displayObject, options, {'name': 'histoChartType', 'description': 'Type', 'metadata': {'type': 'dropdown', 'values': ['stacked', 'subplots'], 'default': 'stacked'}})
    count = len(displayObject.getWorkingPandasDataFrame().index)
    default = math.sqrt(count)
    vals = len(displayObject.getWorkingPandasDataFrame().groupby(displayObject.getValueFields()[0]).size())
    options.append({'name': 'binsize', 'description': 'Bin Count', 'metadata': {'type': 'slider', 'max': int((max(vals, default) + 10)), 'min': int(max((min(vals, default) - 10), 2)), 'default': int(default)}})
    return options
def histogram(displayObject):
    options = []
    options.append(chartSize())
    if (len(displayObject.getValueFields()) > 1):
        append(displayObject, options, {'name': 'histoChartType', 'description': 'Type', 'metadata': {'type': 'dropdown', 'values': ['stacked', 'subplots'], 'default': 'stacked'}})
    count = len(displayObject.getWorkingPandasDataFrame().index)
    default = math.sqrt(count)
    vals = len(displayObject.getWorkingPandasDataFrame().groupby(displayObject.getValueFields()[0]).size())
    options.append({'name': 'binsize', 'description': 'Bin Count', 'metadata': {'type': 'slider', 'max': int((max(vals, default) + 10)), 'min': int(max((min(vals, default) - 10), 2)), 'default': int(default)}})
    return options