private void recreateLabels(IPopulationDataCollector populationDataCollector, PopulationAnalysisNumericField numericField)
        {
            var labels = _groupingLabelGenerator.GenerateLabels(populationDataCollector, numericField, this);

            GroupingItems.Each((item, i) => item.Label = labels[i]);
        }
        public virtual void CreateLimits(IPopulationDataCollector populationDataCollector, PopulationAnalysisNumericField numericField)
        {
            int numberOfBins = CalculateNumberOfBins(populationDataCollector);

            var sortedValues = numericField.GetValues(populationDataCollector)
                               .Where(x => x.IsValid())
                               .OrderBy(x => x).ToFloatArray();

            var limits = new List <double>();

            for (var i = 1; i < numberOfBins; i++)
            {
                limits.Add(sortedValues.Quantile((double)i / numberOfBins));
            }

            Limits = limits;
        }
 public override void CreateLimits(IPopulationDataCollector populationDataCollector, PopulationAnalysisNumericField numericField)
 {
     base.CreateLimits(populationDataCollector, numericField);
     recreateLabels(populationDataCollector, numericField);
 }