Question regarding a BokehJS implementation

Hello,

I have a few months experience with Bokeh but am now working on a project that requires tight integration on the javascript side with bootstap elements and a jquery dataTable. Specifically I am searching and filtering the table and would like to redraw several bokeh figures on the page afterwards. My Plots are almost all categorical plots on the xaxis and numerical on the yaxis where the factors may change IE switch from column A to a subset of A to a subset of column B values for example. Long term I would like to have call backs to the jquery datatable.

Right now I am have alot of difficulty in setting up the categorical bar/scatter plot based on the python documentation.

Could someone provide an example of categorical factors in an x-axis for BokehJS?

David

Hi,

···

On Fri, Jun 30, 2017 at 5:36 PM, [email protected] wrote:

Hello,

I have a few months experience with Bokeh but am now working on a project that requires tight integration on the javascript side with bootstap elements and a jquery dataTable. Specifically I am searching and filtering the table and would like to redraw several bokeh figures on the page afterwards. My Plots are almost all categorical plots on the xaxis and numerical on the yaxis where the factors may change IE switch from column A to a subset of A to a subset of column B values for example. Long term I would like to have call backs to the jquery datatable.

Right now I am have alot of difficulty in setting up the categorical bar/scatter plot based on the python documentation.

Could someone provide an example of categorical factors in an x-axis for BokehJS?

currently we don’t have any bokehjs’ examples showing categorical axes. However, bokehjs’ API is supposed to be a mirror of bokeh’s Python API, so e.g. this https://github.com/bokeh/bokeh/blob/master/examples/models/file/colors.py should help, just with appropriate syntax changes. E.g.

xaxis_above = CategoricalAxis(major_label_orientation=pi/4)

plot.add_layout(xaxis_above, ‘above’)

becomes

var xaxis_above = new CategoricalAxis({major_label_orientation: Math.PI/4})

plot.add_layout(xaxis_above, ‘above’)

I will add some more examples in near future (you can track progress in https://github.com/bokeh/bokeh/issues/6574).

Mateusz

David

You received this message because you are subscribed to the Google Groups “Bokeh Discussion - Public” group.

To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].

To post to this group, send email to [email protected].

To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/bokeh/9a4d087e-dad1-47c6-850f-26c3f40d46a8%40continuum.io.

For more options, visit https://groups.google.com/a/continuum.io/d/optout.

Hello,

I am noticing a failure when running BokehJS 0.12.5 vs 0.12.6. I have created two fiddle examples to prototype the issue. Settings - JSFiddle - Code Playground

The console on the developer tools in chrome provides the following error trace. Let me know if I should issue a bug report for this issue or if the syntax has been updated moving to 0.12.5.

bokeh-0.12.6.js:11319 Uncaught Error: Range FactorRange is incompatible is Scale LinearScale
at CartesianFrame.exports.CartesianFrame.CartesianFrame._get_scales (bokeh-0.12.6.js:11319 )
at CartesianFrame.exports.CartesianFrame.CartesianFrame._configure_scales (bokeh-0.12.6.js:11348 )
at CartesianFrame.exports.CartesianFrame.CartesianFrame.initialize (bokeh-0.12.6.js:11267 )
at CartesianFrame.exports.HasProps.HasProps.finalize (bokeh-0.12.6.js:1365 )
at CartesianFrame.HasProps (bokeh-0.12.6.js:1350 )
at CartesianFrame.Model [as constructor] (bokeh-0.12.6.js:7198 )
at CartesianFrame.LayoutCanvas [as constructor] (bokeh-0.12.6.js:1880 )
at new CartesianFrame (bokeh-0.12.6.js:11261 )
at PlotCanvas.exports.PlotCanvas.PlotCanvas.initialize (bokeh-0.12.6.js:19588 )
at PlotCanvas.exports.HasProps.HasProps.finalize (bokeh-0.12.6.js:1365)

···

On Friday, June 30, 2017 at 7:03:22 PM UTC-4, mateusz.paprocki wrote:

Hi,

On Fri, Jun 30, 2017 at 5:36 PM, [email protected] wrote:

Hello,

I have a few months experience with Bokeh but am now working on a project that requires tight integration on the javascript side with bootstap elements and a jquery dataTable. Specifically I am searching and filtering the table and would like to redraw several bokeh figures on the page afterwards. My Plots are almost all categorical plots on the xaxis and numerical on the yaxis where the factors may change IE switch from column A to a subset of A to a subset of column B values for example. Long term I would like to have call backs to the jquery datatable.

Right now I am have alot of difficulty in setting up the categorical bar/scatter plot based on the python documentation.

Could someone provide an example of categorical factors in an x-axis for BokehJS?

currently we don’t have any bokehjs’ examples showing categorical axes. However, bokehjs’ API is supposed to be a mirror of bokeh’s Python API, so e.g. this https://github.com/bokeh/bokeh/blob/master/examples/models/file/colors.py should help, just with appropriate syntax changes. E.g.

xaxis_above = CategoricalAxis(major_label_orientation=pi/4)

plot.add_layout(xaxis_above, ‘above’)

becomes

var xaxis_above = new CategoricalAxis({major_label_orientation: Math.PI/4})

plot.add_layout(xaxis_above, ‘above’)

I will add some more examples in near future (you can track progress in https://github.com/bokeh/bokeh/issues/6574).

Mateusz

David

You received this message because you are subscribed to the Google Groups “Bokeh Discussion - Public” group.

To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].

To post to this group, send email to [email protected].

To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/bokeh/9a4d087e-dad1-47c6-850f-26c3f40d46a8%40continuum.io.

For more options, visit https://groups.google.com/a/continuum.io/d/optout.

Hi,

···

On Mon, Jul 3, 2017 at 6:33 PM, [email protected] wrote:

Hello,

I am noticing a failure when running BokehJS 0.12.5 vs 0.12.6. I have created two fiddle examples to prototype the issue. https://jsfiddle.net/user/david56783/fiddles/

The console on the developer tools in chrome provides the following error trace. Let me know if I should issue a bug report for this issue or if the syntax has been updated moving to 0.12.5.

bokeh-0.12.6.js:11319 Uncaught Error: Range FactorRange is incompatible is Scale LinearScale
at CartesianFrame.exports.CartesianFrame.CartesianFrame._get_scales (bokeh-0.12.6.js:11319 )
at CartesianFrame.exports.CartesianFrame.CartesianFrame._configure_scales (bokeh-0.12.6.js:11348 )
at CartesianFrame.exports.CartesianFrame.CartesianFrame.initialize (bokeh-0.12.6.js:11267 )
at CartesianFrame.exports.HasProps.HasProps.finalize (bokeh-0.12.6.js:1365 )
at CartesianFrame.HasProps (bokeh-0.12.6.js:1350 )
at CartesianFrame.Model [as constructor] (bokeh-0.12.6.js:7198 )
at CartesianFrame.LayoutCanvas [as constructor] (bokeh-0.12.6.js:1880 )
at new CartesianFrame (bokeh-0.12.6.js:11261 )
at PlotCanvas.exports.PlotCanvas.PlotCanvas.initialize (bokeh-0.12.6.js:19588 )
at PlotCanvas.exports.HasProps.HasProps.finalize (bokeh-0.12.6.js:1365)

I should have commented there about this earlier. I reported this in https://github.com/bokeh/bokeh/issues/6576. I already fixed it locally and will submit a PR this week.

Mateusz

On Friday, June 30, 2017 at 7:03:22 PM UTC-4, mateusz.paprocki wrote:

Hi,

On Fri, Jun 30, 2017 at 5:36 PM, [email protected] wrote:

Hello,

I have a few months experience with Bokeh but am now working on a project that requires tight integration on the javascript side with bootstap elements and a jquery dataTable. Specifically I am searching and filtering the table and would like to redraw several bokeh figures on the page afterwards. My Plots are almost all categorical plots on the xaxis and numerical on the yaxis where the factors may change IE switch from column A to a subset of A to a subset of column B values for example. Long term I would like to have call backs to the jquery datatable.

Right now I am have alot of difficulty in setting up the categorical bar/scatter plot based on the python documentation.

Could someone provide an example of categorical factors in an x-axis for BokehJS?

currently we don’t have any bokehjs’ examples showing categorical axes. However, bokehjs’ API is supposed to be a mirror of bokeh’s Python API, so e.g. this https://github.com/bokeh/bokeh/blob/master/examples/models/file/colors.py should help, just with appropriate syntax changes. E.g.

xaxis_above = CategoricalAxis(major_label_orientation=pi/4)

plot.add_layout(xaxis_above, ‘above’)

becomes

var xaxis_above = new CategoricalAxis({major_label_orientation: Math.PI/4})

plot.add_layout(xaxis_above, ‘above’)

I will add some more examples in near future (you can track progress in https://github.com/bokeh/bokeh/issues/6574).

Mateusz

David

You received this message because you are subscribed to the Google Groups “Bokeh Discussion - Public” group.

To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].

To post to this group, send email to [email protected].

To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/bokeh/9a4d087e-dad1-47c6-850f-26c3f40d46a8%40continuum.io.

For more options, visit https://groups.google.com/a/continuum.io/d/optout.

You received this message because you are subscribed to the Google Groups “Bokeh Discussion - Public” group.

To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].

To post to this group, send email to [email protected].

To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/bokeh/7c46bf23-016d-4ad5-8ce6-f6d9688d7bad%40continuum.io.

For more options, visit https://groups.google.com/a/continuum.io/d/optout.

Thanks

···

On Tuesday, July 4, 2017 at 5:07:36 AM UTC-4, mateusz.paprocki wrote:

Hi,

On Mon, Jul 3, 2017 at 6:33 PM, [email protected] wrote:

Hello,

I am noticing a failure when running BokehJS 0.12.5 vs 0.12.6. I have created two fiddle examples to prototype the issue. https://jsfiddle.net/user/david56783/fiddles/

The console on the developer tools in chrome provides the following error trace. Let me know if I should issue a bug report for this issue or if the syntax has been updated moving to 0.12.5.

bokeh-0.12.6.js:11319 Uncaught Error: Range FactorRange is incompatible is Scale LinearScale
at CartesianFrame.exports.CartesianFrame.CartesianFrame._get_scales (bokeh-0.12.6.js:11319 )
at CartesianFrame.exports.CartesianFrame.CartesianFrame._configure_scales (bokeh-0.12.6.js:11348 )
at CartesianFrame.exports.CartesianFrame.CartesianFrame.initialize (bokeh-0.12.6.js:11267 )
at CartesianFrame.exports.HasProps.HasProps.finalize (bokeh-0.12.6.js:1365 )
at CartesianFrame.HasProps (bokeh-0.12.6.js:1350 )
at CartesianFrame.Model [as constructor] (bokeh-0.12.6.js:7198 )
at CartesianFrame.LayoutCanvas [as constructor] (bokeh-0.12.6.js:1880 )
at new CartesianFrame (bokeh-0.12.6.js:11261 )
at PlotCanvas.exports.PlotCanvas.PlotCanvas.initialize (bokeh-0.12.6.js:19588 )
at PlotCanvas.exports.HasProps.HasProps.finalize (bokeh-0.12.6.js:1365)

I should have commented there about this earlier. I reported this in https://github.com/bokeh/bokeh/issues/6576. I already fixed it locally and will submit a PR this week.

Mateusz

On Friday, June 30, 2017 at 7:03:22 PM UTC-4, mateusz.paprocki wrote:

Hi,

On Fri, Jun 30, 2017 at 5:36 PM, [email protected] wrote:

Hello,

I have a few months experience with Bokeh but am now working on a project that requires tight integration on the javascript side with bootstap elements and a jquery dataTable. Specifically I am searching and filtering the table and would like to redraw several bokeh figures on the page afterwards. My Plots are almost all categorical plots on the xaxis and numerical on the yaxis where the factors may change IE switch from column A to a subset of A to a subset of column B values for example. Long term I would like to have call backs to the jquery datatable.

Right now I am have alot of difficulty in setting up the categorical bar/scatter plot based on the python documentation.

Could someone provide an example of categorical factors in an x-axis for BokehJS?

currently we don’t have any bokehjs’ examples showing categorical axes. However, bokehjs’ API is supposed to be a mirror of bokeh’s Python API, so e.g. this https://github.com/bokeh/bokeh/blob/master/examples/models/file/colors.py should help, just with appropriate syntax changes. E.g.

xaxis_above = CategoricalAxis(major_label_orientation=pi/4)

plot.add_layout(xaxis_above, ‘above’)

becomes

var xaxis_above = new CategoricalAxis({major_label_orientation: Math.PI/4})

plot.add_layout(xaxis_above, ‘above’)

I will add some more examples in near future (you can track progress in https://github.com/bokeh/bokeh/issues/6574).

Mateusz

David

You received this message because you are subscribed to the Google Groups “Bokeh Discussion - Public” group.

To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].

To post to this group, send email to [email protected].

To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/bokeh/9a4d087e-dad1-47c6-850f-26c3f40d46a8%40continuum.io.

For more options, visit https://groups.google.com/a/continuum.io/d/optout.

You received this message because you are subscribed to the Google Groups “Bokeh Discussion - Public” group.

To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].

To post to this group, send email to [email protected].

To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/bokeh/7c46bf23-016d-4ad5-8ce6-f6d9688d7bad%40continuum.io.

For more options, visit https://groups.google.com/a/continuum.io/d/optout.