Skip to content

Commit b5aaf92

Browse files
committed
add TODO for better "first tick" algo on date axes
1 parent 5f2fbe0 commit b5aaf92

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/plots/cartesian/axes.js

+5
Original file line numberDiff line numberDiff line change
@@ -739,6 +739,8 @@ axes.autoTicks = function(ax, roughDTick) {
739739
// being > half of the final unit - so precalculate twice the rough val
740740
var roughX2 = 2 * roughDTick;
741741

742+
// TODO find way to have 'better' first tick on axes with breaks
743+
742744
if(roughX2 > ONEAVGYEAR) {
743745
roughDTick /= ONEAVGYEAR;
744746
base = getBase(10);
@@ -797,6 +799,9 @@ axes.autoTicks = function(ax, roughDTick) {
797799
ax.tick0 = 0;
798800
base = getBase(10);
799801
ax.dtick = roundDTick(roughDTick, base, roundBase10);
802+
803+
// TODO having tick0 = 0 being insider a breaks does not seem
804+
// to matter ...
800805
}
801806

802807
// prevent infinite loops

0 commit comments

Comments
 (0)