Bokeh server app: Line graph

Dear all,

I am making a bokeh server app similar to the following example:

https://demo.bokehplots.com/apps/stocks

I am able to make the app which updates data with changes in the widget. However, I am not able to change the colour and line width of a line graph. The code for the graph is shown below. Could anyone please let me know how to change colour and line width of the line graph? After adding line_width and color command, the graph doesn’t appear.

source = ColumnDataSource(data=dict(x=time_step,y=load,l=[2],c=["blue"]))
load_graph = Figure(plot_height=500, plot_width=600, title="Demand")
load_graph.line('x','y',source=source,line_width ='l', color='c')

Regards,
Sundar.

Sundar,

You need to change the properties of the glyph itself, see:

  Appearance — Bokeh 3.3.2 Documentation

Thanks,

Bryan

···

On Aug 9, 2016, at 4:07 PM, sundaravelpandian Singaravel <[email protected]> wrote:

Dear all,

I am making a bokeh server app similar to the following example:

https://demo.bokehplots.com/apps/stocks

I am able to make the app which updates data with changes in the widget. However, I am not able to change the colour and line width of a line graph. The code for the graph is shown below. Could anyone please let me know how to change colour and line width of the line graph? After adding line_width and color command, the graph doesn't appear.

source = ColumnDataSource(data=dict(x=time_step,y=load,l=[2],c=["blue"]))
load_graph = Figure(plot_height=500, plot_width=600, title="Demand")
load_graph.line('x','y',source=source,line_width ='l', color='c')

Regards,
Sundar.

--
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/aead25af-7d87-4185-93f6-cb3ac0ef5a92%40continuum.io\.
For more options, visit https://groups.google.com/a/continuum.io/d/optout\.