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

Allow millisecond date ticks #776

Closed
jtbandes opened this issue Sep 16, 2016 · 3 comments
Closed

Allow millisecond date ticks #776

jtbandes opened this issue Sep 16, 2016 · 3 comments

Comments

@jtbandes
Copy link

Hi, I just started using dygraphs and it's great! 😄

I noticed that dygraph-tickers.js seems to define DATEFIELD_MS, but this value is not used in any of the TICK_PLACEMENTs. It'd be great if Granularity had some values like {FIVE,TWO,ONE}_HUNDRED_MILLISECONDLY, {FIFTY,TWENTY,TEN}_MILLISECONDLY, and {FIVE_,TWO_,}MILLISECONDLY whose placements could use the milliseconds field.

On a broader note, though, as a client of the library, I wasn't able to do this myself very easily because of how the dateTicker is structured — even though getDateAxis is exported, the granularity passed to it is used to look up a value in the non-exported TICK_PLACEMENT array (and pickDateTickGranularity is also private). This might be improved by having getDateAxis accept the {datefield, step, spacing} as arguments, rather than the granularity — then users could replicate+modify the default dateTicker more easily. Just a thought 😺

@jtbandes
Copy link
Author

(I'd be up for implementing this and submitting a PR, but you'll have to let me know which approach you prefer.)

@PierrickKoch
Copy link
Contributor

Hi, I had started working on that but din't finish yet, I just opened #777

@jtbandes
Copy link
Author

Looks like this was done in #893

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants