[rrd-developers] Re: Dashed lines, LINE-syntax

John yffffffff4271ef37 at f4n.org
Sun May 28 22:38:04 MEST 2006


On Sun, May 28, 2006 at 12:11:00 +0200, Tobias Oetiker wrote:
> the argument separator is : and adding optional key[=value]
> arguments is fine ... the only thing that is bugging me, is that we
> now do have a mix of positional and optional named arguments, this is not
> good since it turns things unnecessarily complex.
> 
> see also the DEF command ...

If using ":" as a separator, how should "LINE:incoming:stack" be
interpreted? Is it a line with legend "stack", or is it a "new" style
for "LINE:incoming::STACK"?

"LINE:incoming/stack" is unambiguous and allows keeping the old syntax
for backward compatibility, that's why I suggested to use something
other than ":" or "#". Of course, one could use named arguments just
for new stuff, say "LINE2:in#ff0000:Incoming::dash=2,3", but "::" is a
bit unintuitive, isn't it? (Note that this isn't a problem for DEF
since all previous arguments are required.)

I agree that having two different syntaxes isn't optimal, but aren't
the positional arguments getting a bit complex themselves? Say we want
to add support for multiple y-axes (for example to allow different
scales for incoming and outgoing) as well as dashed lines, how would
the positional LINE-syntax look? Keeping track of ":::" for the unused
arguments isn't very easy.

Naturally, XML (mentioned in the old thread) is superior to both
positional and named arguments in some respects, but I don't want to
be held responsible when the users ask why they need expat to draw
some graphs... ;)

--
Unsubscribe mailto:rrd-developers-request at list.ee.ethz.ch?subject=unsubscribe
Help        mailto:rrd-developers-request at list.ee.ethz.ch?subject=help
Archive     http://lists.ee.ethz.ch/rrd-developers
WebAdmin    http://lists.ee.ethz.ch/lsg2.cgi



More information about the rrd-developers mailing list