Skip to content

Line Attributes

In addition to the line style and legend the following attributes can be adjusted:

Color

By default the color will come from the palette that is in use. However the color for a line can also be set explicitly using the :color operator:

/api/v1/graph?
  e=2012-01-01T00:00
  &no_legend=1
  &q=
    name,sps,:eq,
    f00,:color
  &s=e-1w

Note, that for a group by all results will get the same attributes, so in this case all would end up being the same color:

/api/v1/graph?
  e=2012-01-01T00:00
  &no_legend=1
  &q=
    name,sps,:eq,
    (,nf.cluster,),:by,
    f00,:color
  &s=e-1w

Transparency

The transparency of a line can be set using the :alpha operator or by explicitly setting the alpha channel as part of the color.

/api/v1/graph?
  e=2012-01-01T00:00
  &no_legend=1
  &q=
    name,sps,:eq,
    :dup,
    6h,:offset,
    :area,
    40,:alpha
  &s=e-2d

Setting the alpha explicitly as part of the color:

/api/v1/graph?
  e=2012-01-01T00:00
  &no_legend=1
  &q=
    name,sps,:eq,
    :dup,
    6h,:offset,
    :area,
    40ff0000,:color
  &s=e-2d

Line Width

Adjust the stroke width used for a line:

/api/v1/graph?
  e=2012-01-01T00:00
  &no_legend=1
  &q=
    name,sps,:eq,
    :dup,
    6h,:offset,
    3,:lw
  &s=e-1w