Skip to content

Allow custom formatters for hoverformat and tickformat #2322

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

Closed
ianrcooke opened this issue Feb 1, 2018 · 1 comment
Closed

Allow custom formatters for hoverformat and tickformat #2322

ianrcooke opened this issue Feb 1, 2018 · 1 comment

Comments

@ianrcooke
Copy link

I'd like to be able to provide a callback to hoverformat and tickformat so that the data can be clearly separated from its presentation and I have finer-grained control than the mini-languages provided by D3.

The issue I'm trying to solve is showing data values over time where time is expressed in relative milliseconds. I want to have x values (time) accessible, e.g. in click events, in their original form (a millisecond count) while displaying the data in hovers and on the x axis ticks as hh:mm:ss.milliseconds. Currently I appear to have to convert the milliseconds to datetime strings and then when capturing a click event do the conversion back from a datetime string to milliseconds to get my original data.

Other Javascript charting libraries like Chart.js and Highcharts allow this sort of control of display without modification of the underlying data.

A feature like this would also address issues like: #1744

@etpinard
Copy link
Contributor

etpinard commented Feb 1, 2018

Duplicate of #1464

@etpinard etpinard marked this as a duplicate of #1464 Feb 1, 2018
@etpinard etpinard closed this as completed Feb 2, 2018
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