Hi,
I have been playing with your library for one of my side projects. I am far from being an Elm veteran but here are few things that I noticed when working with the Plot.Bars module.
From my understanding, in order to get my data into the Data type, I have to use the toBarData function with a data transformer. This seem to be trivial when using a list of records. During my experimentation, I have been using a Dict type to store my dataset and I have been plagued with type mismatches. So I am wondering if it wouldn't make the whole thing easier to directly expose your internal data type and let users handle the conversion. For example you could define
type alias BarDataSet =
List BarData
and
type alias BarData =
{ x : Float
, y : List Float
}
or even
type alias BarData =
( Float
, List Float
)
In an other hand, this is still inconsistent since all the other plots are using a list of Point. So one last solution could be to reuse Point for your bar chart but automagically stack points with the same x value.
In any case, I can live with the current implementation and it won't stop me from using your awesome library. :simple_smile:
Hi, I have been playing with your library for one of my side projects. I am far from being an Elm veteran but here are few things that I noticed when working with the
Plot.Bars
module.From my understanding, in order to get my data into the
Data
type, I have to use thetoBarData
function with a data transformer. This seem to be trivial when using a list of records. During my experimentation, I have been using aDict
type to store my dataset and I have been plagued with type mismatches. So I am wondering if it wouldn't make the whole thing easier to directly expose your internal data type and let users handle the conversion. For example you could defineand
or even
In an other hand, this is still inconsistent since all the other plots are using a list of
Point
. So one last solution could be to reusePoint
for your bar chart but automagically stack points with the samex
value.In any case, I can live with the current implementation and it won't stop me from using your awesome library. :simple_smile: