> For the complete documentation index, see [llms.txt](https://docs.flightwatching.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.flightwatching.com/user-manual/designer-user-manual/edit-dashboards/dashboards/dashboard-rules/graphs/draw-a-serie-curve.md).

# draw a serie (curve)

`drawSerie(name, data, opts)`

* `name`: the name of the serie. Has to be unique in the chart. It will identify the curve among others.
* `data`: an array of {x, y} elements, where x is a date and y a number
* `opts`: it is an object that defines customizations:
  * `autoScaleX`: The X axis is recomputed to match the data.
  * `autoScaleY`: The Y axis is recomputed to match the data.
  * `color`: the color as web color or RGB hex
  * `width`: the width
  * `opacity`: the opacity of the curve (0..1)
  * `type`: can be `AREA` or `LINE`. If not defined, then it is a line.
  * style: is an object where you can add any attribute to fill the css style of the serie
  * svg: is an object where you can add a path attribute of the serie (eg: dash...)

####
