c3 icon indicating copy to clipboard operation
c3 copied to clipboard

axis.x.tick.fit documentation is incorrect (backwards)

Open Zerim opened this issue 9 years ago • 3 comments

From the docs:

If true set, the ticks will be positioned nicely. If false set, the ticks will be positioned according to x value of the data points.

In this example however, setting 'fit' to 'true' causes the ticks to be positioned according to the x value of the data points while setting to false actually makes the ticks appear nicely spaced.

Zerim avatar Jul 29 '16 20:07 Zerim

"If true set, the ticks will be positioned nicely."

This is true. In given example when fit is set true, it positioned nicely - ticks appear only where data is. If it's false, ticks have even spacing, but are not necessarily where the exact points are - 'not nicely'.

I think your picture of 'positioned nicely' is simply different than one of the author of documentation.

Skotu avatar Aug 01 '16 10:08 Skotu

Hmmm, I can see how the first sentence may be read subjectively. However,

If false, the ticks will be positioned according to the x value of the data points.

This part appears to be objectively incorrect. If set to false the ticks are positioned evenly, without regard to what the x value of the data points are.

In either case the wording should probably be changed to be more explicit.

Zerim avatar Aug 01 '16 19:08 Zerim

I, too, was confused by the documentation regarding this feature. "Positioned nicely" is vague language, and the documentation for the false case is indeed just wrong as @Zerim pointed out.

How about changing it to: "If true, ticks will be positioned according to the x value of the data points. If false, ticks will be evenly spaced along the x-axis." It's wordier, but more clear about what to expect from the setting.

mjlangan avatar Oct 28 '16 22:10 mjlangan