Statistic.TimeScale (charts v1.12.1)

Link to this section Summary

Functions

Define the data domain for the scale from a list of data. Extents will be calculated by the scale.

Define the data domain for the scale

Specifies the number of intervals the scale should display. Default is 10.

Creates a new TimeScale struct with basic defaults set

Link to this section Types

@type datetimes() :: NaiveDateTime.t() | DateTime.t()
@type t() :: %Statistic.TimeScale{
  custom_tick_formatter: term(),
  display_format: term(),
  domain: term(),
  interval_count: term(),
  nice_domain: term(),
  range: term(),
  tick_interval: term()
}

Link to this section Functions

Link to this function

domain(scale, data)

@spec domain(t(), [datetimes()]) :: t()

Define the data domain for the scale from a list of data. Extents will be calculated by the scale.

Link to this function

domain(scale, min, max)

@spec domain(t(), datetimes(), datetimes()) :: t()

Define the data domain for the scale

Link to this function

interval_count(scale, interval_count)

@spec interval_count(t(), integer()) :: t()

Specifies the number of intervals the scale should display. Default is 10.

@spec new() :: t()

Creates a new TimeScale struct with basic defaults set