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

logarithmic x-axis support #30

Closed
4b11b4 opened this issue Nov 20, 2019 · 3 comments
Closed

logarithmic x-axis support #30

4b11b4 opened this issue Nov 20, 2019 · 3 comments

Comments

@4b11b4
Copy link
Contributor

4b11b4 commented Nov 20, 2019

Is it possible to support a logarithmic x axis?

@4b11b4 4b11b4 changed the title log logarithmic x-axis support Nov 20, 2019
@4b11b4
Copy link
Contributor Author

4b11b4 commented Nov 20, 2019

from:
#10

iamstickfigure commented on Aug 1

Until this gets fixed, if you're also using the streaming plugin, you can get it to work with "realtime" scales by making a small change to the crosshair plugin's JS. Replacing all conditionals checking for "time" scales to use "realtime" as an alternative.
ie.
"linear"===a\|\|"time"===a
becomes
"linear"===a\|\|"time"===a\|\|"realtime"===a

Would a similar approach be possible for a logarithmic x-axis? Are there any other underlying problems?

edit: I actually don't know where to find the code above... maybe it is from a previous release?

@4b11b4
Copy link
Contributor Author

4b11b4 commented Nov 20, 2019

I tried modifying line 43 and line 172 in trace.js:
if (xScaleType !== 'linear' && xScaleType !== 'time' && xScaleType !== 'logarithmic')
and then changed my scales.xAxes.type: 'logarithmic'
but the crosshair no longer appears.

Is it something to do with the interpolation function no longer working?

@4b11b4
Copy link
Contributor Author

4b11b4 commented Nov 20, 2019

Nevermind, those changes to line 43 and line 172 seem to be the only necessary change as well as scales.xAxes.type: 'logarithmic'.

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