flartDataFromIterables<D extends Comparable, R extends Comparable> function

FlartData<MapEntry<D, R>, D, R> flartDataFromIterables <D extends Comparable, R extends Comparable>(
  1. List<D> domain,
  2. List<R> range,
  3. {String domainAxisId,
  4. String rangeAxisId,
  5. FlartAxis<D> domainAxis,
  6. FlartAxis<R> rangeAxis}
)

Implementation

FlartData<MapEntry<D, R>, D, R>
    flartDataFromIterables<D extends Comparable, R extends Comparable>(
  List<D> domain,
  List<R> range, {
  String domainAxisId,
  String rangeAxisId,
  FlartAxis<D> domainAxis,
  FlartAxis<R> rangeAxis,
}) {
  final Map<D, R> data = Map.fromIterables(domain, range);

  return FlartData<MapEntry<D, R>, D, R>(
    data.entries.toList(),
    rangeFn: (e, i) => e.value,
    domainFn: (e, i) => e.key,
    domainAxis: domainAxis,
    rangeAxis: rangeAxis,
    domainAxisId: domainAxisId,
    rangeAxisId: rangeAxisId,
  );
}