How to use the beakerx.beakerx.plot.chart_models.HistogramChart function in beakerx

To help you get started, we’ve selected a few beakerx examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github twosigma / beakerx / beakerx / beakerx / plot / chart_models.py View on Github external
def limit_points(x):
        if len(x) >= HistogramChart.ROWS_LIMIT:
            return x[0:HistogramChart.ROWS_LIMIT_T0_INDEX]
        return x
github twosigma / beakerx / beakerx / beakerx / plot / chart.py View on Github external
def __init__(self, **kwargs):
        super(Histogram, self).__init__()
        self.chart = HistogramChart(**kwargs)
        data = getValue(kwargs, 'data', [])
        if len(data) > 1 and isinstance(data[0], list):
            for x in data:
                self.chart.graphics_list.append(x)
        else:
            self.chart.graphics_list.append(data)
        self.model = self.chart.transform()
github twosigma / beakerx / beakerx / beakerx / plot / chart_models.py View on Github external
def transform(self):
        self_copy = copy.copy(self)
        self_copy.totalNumberOfPoints = HistogramChart.total_number(self_copy.graphics_list)
        self_copy.tooManyRows = self_copy.totalNumberOfPoints >= HistogramChart.ROWS_LIMIT
        self_copy.rowsLimitItems = HistogramChart.ROWS_LIMIT
        self_copy.numberOfPointsToDisplay = str(HistogramChart.ROWS_LIMIT_T0_INDEX) + " items"
        self_copy.graphics_list = list(map(HistogramChart.limit_points, self_copy.graphics_list))
        return super(HistogramChart, self_copy).transform()
github twosigma / beakerx / beakerx / beakerx / plot / chart_models.py View on Github external
def transform(self):
        self_copy = copy.copy(self)
        self_copy.totalNumberOfPoints = HistogramChart.total_number(self_copy.graphics_list)
        self_copy.tooManyRows = self_copy.totalNumberOfPoints >= HistogramChart.ROWS_LIMIT
        self_copy.rowsLimitItems = HistogramChart.ROWS_LIMIT
        self_copy.numberOfPointsToDisplay = str(HistogramChart.ROWS_LIMIT_T0_INDEX) + " items"
        self_copy.graphics_list = list(map(HistogramChart.limit_points, self_copy.graphics_list))
        return super(HistogramChart, self_copy).transform()
github twosigma / beakerx / beakerx / beakerx / plot / chart_models.py View on Github external
def transform(self):
        self_copy = copy.copy(self)
        self_copy.totalNumberOfPoints = HistogramChart.total_number(self_copy.graphics_list)
        self_copy.tooManyRows = self_copy.totalNumberOfPoints >= HistogramChart.ROWS_LIMIT
        self_copy.rowsLimitItems = HistogramChart.ROWS_LIMIT
        self_copy.numberOfPointsToDisplay = str(HistogramChart.ROWS_LIMIT_T0_INDEX) + " items"
        self_copy.graphics_list = list(map(HistogramChart.limit_points, self_copy.graphics_list))
        return super(HistogramChart, self_copy).transform()
github twosigma / beakerx / beakerx / beakerx / plot / chart_models.py View on Github external
def transform(self):
        self_copy = copy.copy(self)
        self_copy.totalNumberOfPoints = HistogramChart.total_number(self_copy.graphics_list)
        self_copy.tooManyRows = self_copy.totalNumberOfPoints >= HistogramChart.ROWS_LIMIT
        self_copy.rowsLimitItems = HistogramChart.ROWS_LIMIT
        self_copy.numberOfPointsToDisplay = str(HistogramChart.ROWS_LIMIT_T0_INDEX) + " items"
        self_copy.graphics_list = list(map(HistogramChart.limit_points, self_copy.graphics_list))
        return super(HistogramChart, self_copy).transform()