Jeffery Wang
Jeffery Wang

Reputation: 145

To get web browser full size in python bokeh

I use Bokeh to plot some interactive charts for my project, the Bokeh app runs on server. I like these charts can be plotted in full size on clients' browsers no matter what local resolution would be. Could someone give me a clue on how to get remote screen's max size?

  1. I tried selenium, which asks user install drivers on local computer. It is not a good idea.
  2. Also I tried python win32 API, which gets server's not remote computer's resolution.

Thanks

Upvotes: 0

Views: 1664

Answers (1)

dhjc
dhjc

Reputation: 141

I don't know how to get the screen's size, but I have made my bokeh figures take up the full browser window (not necessarily full screen, but would be if the browser was full screen).

Instead of:

figure(plot_width = ... , plot_height = ... , ...)

I used:

 figure(sizing_mode="stretch_both", ...)

("scale_both" is an alternative, which keeps the height/width ratio if you set those too).

Info from bokeh documentation.

Upvotes: 3

Related Questions