☰Read-only archive⌕
Looking for help with Bokeh?

This is a read-only archive. Ask questions and join the conversation on GitHub.

Visit Community Support on GitHub →
Archived discussions · Captured October 28, 2026

Why does CategoricalScale extend LinearScale?

Community Supportbokehjs
p-himik
p-himik

Just tried using an inspection tap tool on a bar chart to fire a custom callback with the data. Was a bit surprised that instead of a nice categorical value I got a number that ranges from 0 to the number of bars.
Is there any practical reason for this? Would it make sense for CategoricalScale to not be a subtype of LinearScale, just like with the axis types?

⌁   Link to post
mateusz
mateusz

This is because the categorical coordinate system allows for offsets and is effectively a composite coordinate system, a discrete coordinate system with linear coordinates defined for each factor. This is implemented this way due to bokeh’s design limitations, in particular lack of support for composite coordinate systems. This will be fixed in PR #8931.

⌁   Link to post

End of archived discussion · Replies are disabled