Histogram.linear constructor

Histogram.linear({
  1. required String name,
  2. required String help,
  3. required double start,
  4. required double width,
  5. required int count,
  6. List<String> labelNames = const [],
  7. Collect<Collector>? collectCallback,
})

Construct a new Histogram with a name, help text, and optional labelNames. The count buckets are linear distributed starting at start with a distance of width. If labelNames are provided, use labels(...) to assign label values. The optional collectCallback is called at the beginning of collect and allows to update the value of the histogram before collecting it.

Implementation

Histogram.linear({
  required String name,
  required String help,
  required double start,
  required double width,
  required int count,
  List<String> labelNames = const [],
  Collect? collectCallback,
}) : this(
        name: name,
        help: help,
        labelNames: labelNames,
        buckets: _generateLinearBuckets(start, width, count),
        collectCallback: collectCallback,
      );