Transformations II

from lesson 03_Data_ Sources_&_Transformations

The text says:

cumsum transform … can be usefull (sic) for pie or donut type charts

  • Why is cumsum useful to pies and donuts in particular?
  • More so than bars?
  • Aren’t both binning operations?
  • What about all the other glyphs? Is there some guide mapping transforms to glyphs and use cases?

Thx

Why is cumsum useful to pies and donuts in particular?

The tutorial notebook demonstrates the wedge glyph – where the start and end angles are measured from the horizontal (ref docs: Wedge — Bokeh 2.4.2 Documentation), which is where cumsum is useful. pies and donuts are mentioned as they would be constructed in bokeh, using wedge and annulus wedge glyphs. Another example is the arc glyph. Does that make sense?

Is there some guide mapping transforms to glyphs and use cases?

Not that I’m aware of, but the transformations docs include useful notes+examples about where to use them: bokeh.transform — Bokeh 2.4.2 Documentation. The user+reference guides for various glyphs also include examples that help give a sense of how your data can be structured.