Skip to content

Bokeh Grouped Bar Plots Not Updating Bar Width Correctly #9145

@ashvin777

Description

@ashvin777

I am using Bokehjs 1.3.0 version and trying to update the Group vbar chart dynamically. However, it is not working properly and not setting the bar width and placement properly.

Here is the live URL - https://jsitor.com/ZJUc8ZXGt where this issue is reproducing.

In sort - there are 2 vbars

p.vbar({
  x: {
    field: 'time',
    transform: new Bokeh.Dodge({
      value: -0.20,
      range: p.x_range
    })
  },
  top: { field: '2015' },
  width: 0.2,
  source: source,
  legend: '2015 ',
  color: 'orange'
});

p.vbar({
  x: {
    field: 'time',
    transform: new Bokeh.Dodge({
      value: 0.20,
      range: p.x_range
    })
  },
  top: { field: '2016' },
  width: 0.2,
  legend: '2016 ',
  source: source,
  color: 'green'
});

And I am dynamically adding data in source.

This is how it looks like when I am adding more than one single data -
Screenshot 2019-08-05 at 10 33 13 PM
it is supposed to show 2 bars side by side and width of bars should be big enough.

It works properly when I set only single data -
image

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions