That sounds good, just so long as includeDefault defaults to true.

Or actually, it's generally better to have booleans default to false, so
how about:

.get(name, onlyUserOptions)

or something like that?


On Thu, Jan 3, 2013 at 3:27 PM, Robert Konigsberg
<notifications@github.com>wrote:

> In plugins/axes.js:
>
> >      if (g.getOption('xAxisHeight')) {
> >        h = g.getOption('xAxisHeight');
> >      } else {
> > -      h = g.getOption('axisLabelFontSize') + 2 * g.getOption('axisTickSize');
> > +      h = g.getOptionForAxis('axisLabelFontSize', 'x') + 2 * g.getOption('axisTickSize');
>
> I believe the best option is this:
>
> DygraphOptions has three methods:
>
> get(name)
> getForSeries(name, series)
> getForAxis(name, axis)
>
> Just expand them:
>
> get(name, [includeDefault])
> getForSeries(name, series, [includeDefault])
> getForAxis(name, axis, [includeDefault])
>
> In the xAxisHeight case, just call get('xAxisHeight', false)
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/danvk/dygraphs/pull/193/files#r2543343>.
>
>