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

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

Comments

Projects
None yet
2 participants
@vladminsky

This comment has been minimized.

Show comment
Hide comment
@vladminsky

vladminsky Mar 2, 2016

Contributor

@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.

Contributor

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

This comment has been minimized.

Show comment
Hide comment
@jlewis91

jlewis91 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?

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

This comment has been minimized.

Show comment
Hide comment
@vladminsky

vladminsky Mar 2, 2016

Contributor

@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?

Contributor

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

This comment has been minimized.

Show comment
Hide comment
@jlewis91

jlewis91 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)?

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

This comment has been minimized.

Show comment
Hide comment
@vladminsky

vladminsky Mar 2, 2016

Contributor

@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

Contributor

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

This comment has been minimized.

Show comment
Hide comment
@jlewis91

jlewis91 Mar 2, 2016

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

jlewis91 commented Mar 2, 2016

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

@vladminsky

This comment has been minimized.

Show comment
Hide comment
@vladminsky

vladminsky Mar 2, 2016

Contributor

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

Thank you!

Contributor

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

This comment has been minimized.

Show comment
Hide comment
@jlewis91

jlewis91 Mar 2, 2016

Thank you! :) 👍

jlewis91 commented Mar 2, 2016

Thank you! :) 👍

@vladminsky

This comment has been minimized.

Show comment
Hide comment
@vladminsky

vladminsky Mar 23, 2016

Contributor

@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.

Contributor

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

- Allow to define order for a bar charts (#105)
- 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