Bokeh Charts#

Bar Chart#

bokeh.bar(y=None, data_points=None, add_interaction=True, aggregate_fn=None, step_size=None, step_size_type=<class 'int'>, title='', autoscaling=True, unselected_alpha=0.1, **library_specific_params)#
Parameters:
x: str

x-axis column name from the gpu dataframe

y: str, default None

y-axis column name from the gpu dataframe

data_points: int, default None

when None, it means no custom number of bins are provided and data_points will default to df[self.x].nunique()

add_interaction: {True, False}, default True
aggregate_fn: {‘count’, ‘mean’}, default ‘count’
step_size: int, default None
step_size_type: {int, float}, default int
title: str,

chart title

autoscaling: bool,

set whether chart scale is updated automatically for y_axis when data updates

unselected_alpha: float, default 0.1
**library_specific_params:

additional library specific keyword arguments to be passed to the function, a list of all the supported arguments can be found by running ```python

>>> import holoviews as hv
>>> hv.help(hv.Bars)
Returns:
A bokeh chart object of type vbar

Example#

import cudf
import cuxfilter


cux_df = cuxfilter.DataFrame.from_dataframe(cudf.DataFrame({'key': [0, 1, 2, 3, 4], 'val':[float(i + 10) for i in range(5)]}))
bar_chart_1 = cuxfilter.charts.bar('key', 'val', data_points=5, add_interaction=False)

d = cux_df.dashboard([bar_chart_1])
#view the individual bar chart part of the dashboard d
bar_chart_1.view()