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

first tick-mark often starts slightly to the right of the x-axis #145

Closed
jlewis91 opened this issue Feb 29, 2016 · 9 comments
Closed

first tick-mark often starts slightly to the right of the x-axis #145

jlewis91 opened this issue Feb 29, 2016 · 9 comments

Comments

@jlewis91
Copy link

@jlewis91 jlewis91 commented Feb 29, 2016

@vladminsky
Copy link
Contributor

@vladminsky vladminsky commented Mar 2, 2016

@jlewis91

We use native d3.time.scale() for continues time scale. It uses own algorithm to show the most appropriate ticks. It may look weird for some cases. There are not so much points of control over visual look for d3.time and we don't have plans to switch to another solution for time scale.

I will be keep in mind your claim but can't promise we will fix it in near future.

@jlewis91
Copy link
Author

@jlewis91 jlewis91 commented Mar 2, 2016

Thanks for the update. Would it be possible to align the y-axis with the d3.time.scale ticks, not the other way around?

@vladminsky
Copy link
Contributor

@vladminsky vladminsky commented Mar 2, 2016

@jlewis91

Would it be possible to align the y-axis with the d3.time.scale ticks, not the other way around?

Sorry I didn't get the question. Can you clarify please once again?

@jlewis91
Copy link
Author

@jlewis91 jlewis91 commented Mar 2, 2016

Sure. You are saying that the issue is that d3.time sets the x-axis tick marks and that d3 cannot be manipulated to align with the y axis limits, but why can't this issue be solved the other way around...i.e. that when autoScale = true, the nearest time-axis tick mark is chosen for the xmin (assuming the date axis is on the x axis)?

@vladminsky
Copy link
Contributor

@vladminsky vladminsky commented Mar 2, 2016

@jlewis91, do you mean something like this?
https://jsfiddle.net/ykycn16p/13/

It can work for some specific cases, but the issue returns once you change container size:
https://jsfiddle.net/ykycn16p/14/

Am I understand you correctly? I don't know good workaround for this.

NOTE: actually "autoScale" is applicable to linear scale only.. at least for now

@jlewis91
Copy link
Author

@jlewis91 jlewis91 commented Mar 2, 2016

yeah, that's it! What about using something like: https://github.com/mbostock/d3/wiki/Time-Scales#nice

@vladminsky
Copy link
Contributor

@vladminsky vladminsky commented Mar 2, 2016

Hm.. I missed that d3 feature for time scale. There is a chance it can help. I will experiment with a "nicing".

Thank you!

@jlewis91
Copy link
Author

@jlewis91 jlewis91 commented Mar 2, 2016

Thank you! :) 👍

@vladminsky
Copy link
Contributor

@vladminsky vladminsky commented Mar 23, 2016

@jlewis91

Taucharts gonna apply nice time scale by default. Actually I updated an API notation.. now instead of "autoScale" - use "nice" property. This name is more consistent. Backward compatibility with "autoScale" is saved as well.

The fix will be available in 0.8.1 release.

vladminsky added a commit that referenced this issue Mar 29, 2016
- Make time scale nice (#145)
- The "autoScale" property is deprecated (use "nice" instead)
- Remove shades for bars in Safari
- Allow to specify label for any field in tooltip
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.