Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add CustomJSTicker #13130

Open
bryevdv opened this issue May 13, 2023 · 0 comments
Open

Add CustomJSTicker #13130

bryevdv opened this issue May 13, 2023 · 0 comments

Comments

@bryevdv
Copy link
Member

bryevdv commented May 13, 2023

The asymmetry of having a CustomJSTIckFormatter while not offering a corresponding CustomJSTicker has low-level bothered me for years. However the utility of having one has come up in a few different support questions latetly, so we should go ahead and add one.

It should be fairly straightforward to adapt existing "CustomJS" code to be callable by Ticker.get_ticks (keeping in mind @mattpap current work to afford imports inside CustomJS code). The main questions to decide:

Ticker.get_ticks expects to return both major and minor tick locations:

export type TickSpec<T> = {
  major: T[]
  minor: T[]
}

Do we want to expose this fully to CustomJS code? Or just expect users to return major ticks? Or have some simpler path to return only major ticks in the common case?

Additionally get_ticks accepts a number of parameters:

get_ticks(data_low: number, data_high: number, range: Range, cross_loc: number):

Do we expose all of these to the CustomJS code or leave off some of the more esoteric ones like cross_loc. In any case how do we pass the data to user code, maybe cb_data?

cc @bokeh/dev

@bryevdv bryevdv added this to the 3.2 milestone May 13, 2023
@mattpap mattpap modified the milestones: 3.2, 3.3 Jun 9, 2023
@bryevdv bryevdv modified the milestones: 3.3, 3.4 Oct 5, 2023
@mattpap mattpap modified the milestones: 3.4, 3.x Feb 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants