Skip to content

Commit c43cd5b

Browse files
committed
fix: Update spec of Dataset.new - closes #104
1 parent cca7340 commit c43cd5b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/chart/dataset.ex

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ defmodule Contex.Dataset do
2828
headers: nil,
2929
title: nil
3030
}
31-
iex> Dataset.column_names(dataset)
31+
iex> Dataset.column_names(dataset) |> Enum.sort()
3232
[:category, :x, :y] # Note ordering of column names from map data is not guaranteed
3333
3434
or from a list of tuples (or lists):
@@ -90,7 +90,7 @@ defmodule Contex.Dataset do
9090
Data is expected to be a list of tuples of the same size or list of lists of same size. Headers provided with a list of maps
9191
are ignored; column names from map data are inferred from the maps' keys.
9292
"""
93-
@spec new(list(row()), list(String.t())) :: Contex.Dataset.t()
93+
@spec new([row(), ...], list(String.t())) :: Contex.Dataset.t()
9494
def new(data, headers) when is_list(data) and is_list(headers) do
9595
%Dataset{headers: headers, data: data}
9696
end

0 commit comments

Comments
 (0)