☰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

Draw line between two points based on data source

Community Support
quite68
quite68

I want to draw a line based on columns in my data source between (‘TimeStart’, ‘EventGroup’) and (‘TimeEnd’, ‘EventGroup’). I tried

        event_view = CDSView(source=self._data_source, filters=[event_filter])
        r_event = self._figure.line(x=['TimeStart', 'TimeEnd'],
                                    y=['EventGroup', 'EventGroup'],
                                    line_width=2,
                                    line_color='EventColor',
                                    source=self._data_source, view=event_view)

But that gives me

Expected x and y to reference fields in the supplied data source.

What is the correct syntax to use?

‘TimeStart’, ‘TimeEnd’ and ‘EventGroup’ are definitely columns in the data source.

⌁   Link to post

End of archived discussion · Replies are disabled