View Source Luminous.Query.DataSet (luminous v0.1.0)
a DataSet essentially wraps a list of 1-d or 2-d data points that has a label and a type (for visualization)
Link to this section Summary
Functions
extract and return the first value out of rows e.g. for use in stat panels
override the dataset's unit with the provided string only if it's not already present
calculate and return the basic statistics of the dataset in one pass (loop)
Link to this section Types
@type t() :: %Luminous.Query.DataSet{ attrs: Luminous.Query.Attributes.t(), label: binary(), rows: [row()] }
@type type() :: :line | :bar
Link to this section Functions
extract and return the first value out of rows e.g. for use in stat panels
override the dataset's unit with the provided string only if it's not already present
@spec new([row()], atom() | binary(), Luminous.Query.Attributes.t() | nil) :: t()
@spec statistics(t()) :: %{ label: binary(), min: any(), max: any(), n: non_neg_integer(), sum: Decimal.t() | nil, avg: Decimal.t() | nil }
calculate and return the basic statistics of the dataset in one pass (loop)