How can I stack TimeSeries and fix the colors of items?

Hi,

I’ve started playing around with bokeh in a Jupyter notebook recently. I’ve come across the TimeSeries graph which is exactly what I need.

In one data source, I have values which monitor quality of network interfaces. The data source gives me 3 counts:

  • Number of interfaces in “normal” state

  • Number of interfaces in “warning” state

  • Number of interfaces in “critical” state

Example (as CSV):

timestamp;normal;warning;critical

2016-11-01;10;5;0

2016-11-02;9;6;0

2016-11-03;9;5;1

2016-11-04;10;5;0

2016-11-05;11;5;0

2016-11-06;5;5;6

I have a couple of questions:

  1. Is it possible to stack these values in a TimeSeries graph? If yes, how do I do that?

  2. Is it possible to “freeze” the colours as normal=green, wearning=yellow, critical=red?

Cheers,

Mich.

Hi Mich,

For now you will probably just want to use the "line" glyph method from bokeh.plotting in order to have more control over appearance, etc. There's some example of using bokeh.plotting on timeseries data here, e.g.

  http://bokeh.pydata.org/en/latest/docs/gallery/stocks.htm

There's nothing built into bokeh currently that will stack anything, except for the Area chart which does have some automatic features around this. So, if you want to have lines representing stacked series, you'll need to compute the stacked series yourself. Here is an example that does that:
  
  http://bokeh.pydata.org/en/latest/docs/gallery/brewer.html

The little function there assumes the series you want to stack line up on the time axis, if they don't you'd have to do some kind of interpolation to stack them.

Thanks,

Bryan

···

On Nov 25, 2016, at 1:37 AM, [email protected] wrote:

Hi,

I've started playing around with bokeh in a Jupyter notebook recently. I've come across the TimeSeries graph which is exactly what I need.

In one data source, I have values which monitor quality of network interfaces. The data source gives me 3 counts:

* Number of interfaces in "normal" state
* Number of interfaces in "warning" state
* Number of interfaces in "critical" state

Example (as CSV):

timestamp;normal;warning;critical
2016-11-01;10;5;0
2016-11-02;9;6;0
2016-11-03;9;5;1
2016-11-04;10;5;0
2016-11-05;11;5;0
2016-11-06;5;5;6

I have a couple of questions:

1) Is it possible to stack these values in a TimeSeries graph? If yes, how do I do that?
2) Is it possible to "freeze" the colours as normal=green, wearning=yellow, critical=red?

Cheers,

Mich.

--
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/c6dbdf12-a521-4710-b270-200a1ebf09a5%40continuum.io\.
For more options, visit https://groups.google.com/a/continuum.io/d/optout\.