Search code examples
pythonbokehrapids

How to rotate X-axis labels in bokeh figure in Cuxfilter?


I have the exact same issue as this question, except the implementation within cuxfilter (RAPIDS)

enter image description here

cux_df = cuxfilter.DataFrame.from_dataframe(test)
chart0 = cuxfilter.charts.bar('index', 'count')
chart0.xaxis.major_label_orientation = "vertical"
chart0.view()

yields:

AttributeError: 'Bar' object has no attribute 'xaxis'

Solution

  • As @mosc9575 rightly mentioned in the comments, doing the following should resolve your issue:

    chart0.chart.xaxis.major_label_orientation = "vertical"
    

    The underlying chart0.chart is a bokeh object, and its possible to apply all the bokeh properties to it directly.