public HistogramBinsViewModel(GroupedExposuresHistogram groupedExposuresHistogram)
        {
            if (groupedExposuresHistogram == null) throw new ArgumentNullException("groupedExposuresHistogram");
            PressureViewModel = new FourAxisSeriesViewModel
            {
                BottomAxis =
                {
                    Visibility = Visibility.Visible,
                    AxisTicks = new ObservableList<DataAxisTick>(),
                    AxisType = AxisType.Enumerated,
                    Label = string.Format("Peak pressure per ping (±{0:0}dB) [dB re: 1 µPa]", groupedExposuresHistogram.BinWidth / 2)
                },
                LeftAxis =
                {
                    Visibility = Visibility.Visible,
                    AxisType = AxisType.Linear,
                    Label = "Exposure count",
                },
                TopAxis = { Visibility = Visibility.Collapsed },
                RightAxis = { Visibility = Visibility.Collapsed },
                PlotTitle = groupedExposuresHistogram.GroupName,
            };

            EnergyViewModel = new FourAxisSeriesViewModel
            {
                BottomAxis =
                {
                    Visibility = Visibility.Visible,
                    AxisTicks = new ObservableList<DataAxisTick>(),
                    AxisType = AxisType.Enumerated,
                    Label = string.Format("Sound exposure level per ping (±{0:0}dB) [dB re: 1 µPa²•s]", groupedExposuresHistogram.BinWidth / 2)
                },
                LeftAxis =
                {
                    Visibility = Visibility.Visible,
                    AxisType = AxisType.Linear,
                    Label = "Exposure count",
                },
                TopAxis = { Visibility = Visibility.Collapsed },
                RightAxis = { Visibility = Visibility.Collapsed },
                PlotTitle = groupedExposuresHistogram.GroupName,
            };

            PressureViewModel.BottomAxis.AxisTicks.Add(new DataAxisTick(-1, null, false));
            EnergyViewModel.BottomAxis.AxisTicks.Add(new DataAxisTick(-1, null, false));
            for (var binIndex = 0; binIndex < groupedExposuresHistogram.BinNames.Length; binIndex++)
            {
                PressureViewModel.BottomAxis.AxisTicks.Add(new DataAxisTick(binIndex, groupedExposuresHistogram.BinNames[binIndex], false));
                EnergyViewModel.BottomAxis.AxisTicks.Add(new DataAxisTick(binIndex, groupedExposuresHistogram.BinNames[binIndex], false));
            }
            PressureViewModel.BottomAxis.AxisTicks.Add(new DataAxisTick(groupedExposuresHistogram.BinNames.Length, null, false));
            EnergyViewModel.BottomAxis.AxisTicks.Add(new DataAxisTick(groupedExposuresHistogram.BinNames.Length, null, false));

            PressureViewModel.DataSeriesCollection.Add(groupedExposuresHistogram.GroupedBarSeriesViewModels[0]);
            EnergyViewModel.DataSeriesCollection.Add(groupedExposuresHistogram.GroupedBarSeriesViewModels[1]);

            PressureViewModel.LeftAxis.VisibleRange.Update(.9, 100);
            PressureViewModel.BottomAxis.DataRange.Update(-1, 12);
            EnergyViewModel.LeftAxis.VisibleRange.Update(.9, 100);
            EnergyViewModel.BottomAxis.DataRange.Update(-1, 12);

            //var barSeries = new StackedBarSeriesViewModel();
            //HistogramBinCollection.CollectionChanged += HistogramBinsCollectionChanged;
        }
 static FourAxisSeriesViewModel()
 {
     var axisRanges = new RangeCollection();
     axisRanges.Add(new Range(0.1, 10));
     DesignTimeData = new FourAxisSeriesViewModel
     {
         BottomAxis = { Visibility = Visibility.Visible },
         LeftAxis = { Visibility = Visibility.Visible },
         TopAxis = { Visibility = Visibility.Visible },
         RightAxis = { Visibility = Visibility.Visible }
     };
     DesignTimeData.BottomAxis.DataRange = axisRanges;
     DesignTimeData.LeftAxis.DataRange = axisRanges;
     DesignTimeData.TopAxis.DataRange = axisRanges;
     DesignTimeData.RightAxis.DataRange = axisRanges;
 }