MrTb123 / flot

Automatically exported from code.google.com/p/flot
MIT License
0 stars 0 forks source link

Redundant options for ticksize and ticks #718

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Should throw error when ticksize, min, max, and ticks are all defined as 
ticksize/ticks give redundant information.  Should suggest only specifying 
ticksize, perhaps?

Original issue reported on code.google.com by yael.elm...@gmail.com on 10 Jul 2012 at 10:57

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
I submitted a pull request to address this issue:

https://github.com/flot/flot/pull/58

Original comment by yael.elm...@gmail.com on 10 Jul 2012 at 11:08

GoogleCodeExporter commented 8 years ago
It's true that the options are redundant, but in this case I think it's better 
to remain silent.

Looking at issue #709 for comparison, using a time-mode axis without including 
the time plugin actually results in an error further on.  And since moving 
time-mode functionality into a plugin was a big change over previous versions, 
it makes sense to give the user more direct and friendly message.

In this case, while providing both options isn't good practice, it doesn't, as 
far as I can tell, cause any real problems.  By throwing an Error, anyone who 
happens to include both options will see their plots break, which is probably 
worse than just letting them continue with the weird options.

Generally one deals with this kind of thing by using the console API to log a 
warning.  Developers can then still see it, but it doesn't halt the execution 
of their script.  In this case, though, for a relatively minor options issue, 
it's probably not worth adding to the library's file-size, which is always 
something to keep in mind.

Thank you for thinking about this, though.

Original comment by dnsch...@gmail.com on 11 Jul 2012 at 3:55