AmadeusNing
AmadeusNing

Reputation: 107

Bokeh bar chart does not show correctly

I'm trying to build a bar chart in Bokeh and my data source (df_fac) is like following:

enter image description here

my code so far:

# source
source2 = ColumnDataSource(df_fac)


# Bar chart
bar = figure(plot_width=600, plot_height=600,
            x_axis_label='Faculty', 
            y_axis_label='Number of invoice processed & paid', 
            tools=['save', 'reset'])

bar.vbar(x='FACULTY', bottom=0, top='PAPER', width=50, color='STEELBLUE', source=source2)

reset_output()
show(bar)

However my output is like:

enter image description here

my Bokeh version is 0.12.7. I tried to view the output in both Chrome and IE and without luck. Thanks in advance.

Upvotes: 2

Views: 655

Answers (1)

Leehbi
Leehbi

Reputation: 779

If your plotting categories you need to reference this in your figure(x_range(category list,...)

Upvotes: 3

Related Questions