130 questions
1
vote
0
answers
45
views
How to update and render Bokeh plots immediately, without reloading, using AJAX JS?
So I am working on a dashboard in which there are bunch of KPIs and Graphs. The dashboard have filters that when applied, filter whole dashboard. Before I was totally reloading the page and every ...
0
votes
2
answers
90
views
Hide Bokeh's toolbar (JavaScript)
I'm trying to hide the toolbar from the following Bokeh example without any success:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
...
0
votes
1
answer
71
views
Bokeh does not plot when I provide strings for datetimes
I don't understand why my graphs are not showing up. When I introduce 2 values, capacity and efficiency, the graphs are supposed to show up in my Bokeh interface. Can you tell me why this doesn't ...
1
vote
1
answer
334
views
Show/Hide columns in Bokeh DataTable based on selection
I have a data table with 40+ columns. I can choose which columns to show in the data table by changing the TableColumn attribute visible to True or False. Here's a small example
filtered_table_data=df[...
0
votes
1
answer
87
views
How to customise distance between tickers on the 2nd y-axis in BokehJS
So I'm trying to create a plot with BokehJS. This plot needs 3 axes (left, right, bottom):
The plot looks like this
As you can see, the right y-axis is pretty ugly, you can't read any data from ...
0
votes
0
answers
61
views
DatetimeRangeSlide updating network graph with bokeh
I would like to update a network graph using a datetime range slider with Bokeh. So appearing/disappearing nodes depending on the datetime range, and also width of edges is proportional to the number ...
0
votes
1
answer
38
views
Can not get any Bokeh graphs show up when the check boxes are ticked
I have tried the below code to generate bokeh graphs for each of the element when the their respective check boxes are ticked.
data is a df with columns like 'id', 'data_point', 'max', 'min'
I am ...
0
votes
0
answers
491
views
How to proportionally size plots' height in Bokeh?
I want two plots that stretch to fill up the entire window, like this:
# to run this, use: bokeh serve --show test.py
from bokeh.layouts import column
from bokeh.plotting import figure, curdoc
...
1
vote
0
answers
2k
views
How to add onclick event in Bokeh?
I am using python3.10 with Bokeh2.4.3. My goal is to create a simple scatter plot with only a few points (around 10-15 data points). But if I click one of those data points, I want it to open a new ...
0
votes
1
answer
660
views
Bokeh JS save plot as PNG programmatically
How to save plots in Bokeh JS as PNG programmatically?
The documentation gives the following example in Python:
from bokeh.io import export_png
export_png(plot, filename="plot.png")
I ...
1
vote
1
answer
2k
views
Bokeh - save plot as svg (ValueError: OutputDocumentFor expects a sequence of Models)
I made a plot in Bokeh but when I try to export it as a svg file I get the following error: OutputDocumentFor expects a sequence of Models.
My code is:
# plot 2D histogram
def plot_hist(ch1, ch2, ...
0
votes
1
answer
254
views
BokehJS FreehandDrawTool does not plot line when dragging mouse in canvas
In BokehJS 2.4.2 the FreehandDrawTool documentation is showing in the toolbar, but no line is drawn when dragging the mouse in the canvas.
Here is a minimal example to reproduce the problem. This ...
0
votes
1
answer
329
views
How can I optimize this Bokeh CustomJS plot so changes load more quickly?
Here is a MRE for a plot I made using Bokeh 2.3.2. The actual data set contains around a hundred projects which each have up to 10 tasks and are stored in a df with apprixmately 40k rows. When I save ...
0
votes
1
answer
695
views
Bokeh: Generate graph server side, update graph from JS client side (change data source, axes ...)
I just took Bokeh for a spin on a Django site. Lot of fine tutorials out there and really easy to get a quick example running. For example, I have a Django view that offers something like:
...
...
0
votes
1
answer
2k
views
Filtering data source for Bokeh plot using MultiChoice and CustomJS
To preface, I have never used JavaScript. After hours of searching I still do not quite understand how to solve my particular problem.
I have been utilizing bokeh to make interactive plots for a ...
1
vote
0
answers
179
views
Network graph not updating with js_on_change for a Select widget on Bokeh
Following this example, I am trying to build a network graph using Bokeh where I can use a select widget to filter my data. My data will look something like this:
source target var1 var2
...
1
vote
0
answers
252
views
Bokeh DataRange1d: return to automatic updates of start/end
In order to set axis ranges dynamically I use
x_range = DataRange1d(follow='end', follow_interval=duration, range_padding=0, range_padding_units="percent")
which updates the start/end ...
1
vote
0
answers
185
views
Is it possible to use normal html (Further Vue/React components) to send data to a Bokeh plot?
I've been trying almost everything from Bokeh documentation and I don't know if this is possible.
What I want is to use regular html (input/textbox/table and later a Vue/React component) to get the ...
0
votes
1
answer
470
views
Bokeh layout update on CustomJS callback
I am new to bokehJS and I need to update the plot based on dropdown values.
For initial load am using below code to add arrow in layout of the plot. But, whenever I change the value on dropdown plot ...
0
votes
1
answer
236
views
Typescript linter: reference to external library
I want to write a custom component for Bokeh, that means that I have to edit a TypeScript file that is somewhat "disconnected" from its environment. My question is how to make linting work ...
1
vote
1
answer
2k
views
Update text dynamically in Bokeh with js_on_change
Is it possible to use js_on_change with bokeh to dynamically update text that is placed next to a plot?
For example, using this code snippet from a different question
from random import random
from ...
0
votes
1
answer
620
views
How to modify the DateTimeTickFormatter class?
import pandas as pd
from math import pi
from datetime import datetime as dt
from bokeh.io import show
from bokeh.models import DatetimeTickFormatter
from bokeh.plotting import figure
d = {'col1': [dt(...
1
vote
1
answer
1k
views
Interactively change a plot in Bokeh using sliders to select column
My question is very similar to this one, but I still cannot find how to adapt the answers to my problem.
I have a dataframe with 100 columns. I want to use two sliders in Bokeh to select one column to ...
0
votes
1
answer
234
views
bokeh: custom callback for hovertool for figure.line
I'm trying to write a code which adds hovertool performing customer js-code over figure.line object. In order to do it I used userguide code as example (https://docs.bokeh.org/en/latest/docs/...
0
votes
2
answers
386
views
Resize bokeh plot from CustomJS
Resize bokeh plot from CustomJS.
window.setXYDimension = function (width, height) {
fig.plot_width = width;
fig.plot_height = height;
console.log({fig});
fig.reset(); //reset doesn't exist
...