private AreaSeries createPercentSeries(SemanticGraph semanticGraph)
        {
            AreaSeries series = new AreaSeries();
            series.Title = semanticGraph.SemanticLink.Semantics;

            series.MouseDown += (s, e) =>
            {
                if (e.ChangedButton == OxyMouseButton.Left)
                {

                    if (SelectedSemanticLinks.Count > 0)
                    {
                        var dialog = new MainPageCompareDialog
                        {
                            Message = { Text = semanticGraph.SemanticLink.Semantics },
                            TripDirection = this.TripDirection,
                            SelectedSemanticLinks = this.SelectedSemanticLinks.ToList(),
                            SemanticLink = semanticGraph.SemanticLink,
                            ViewModel = this
                        };

                        DialogHost.Show(dialog, "RootDialog");
                    }
                    else
                    {
                        var dialog = new MainPageShowDetailDialog
                        {
                            Message = { Text = semanticGraph.SemanticLink.Semantics },
                            TripDirection = this.TripDirection,
                            SemanticLink = semanticGraph.SemanticLink,
                            ViewModel = this
                        };

                        DialogHost.Show(dialog, "RootDialog");
                    }
                }
            };

            SemanticHistogramDatum datum = this.EnergyHistogramData
                .Where(v => v.SemanticLink.SemanticLinkId == semanticGraph.SemanticLink.SemanticLinkId)
                .ElementAt(0);

            series.Points.Add(new DataPoint(datum.MinLevel - datum.ClassWidth, 0));

            foreach (LevelAndValue item in datum.HistogramData)
            {
                series.Points.Add(new DataPoint(item.Level, item.Value * 100 / datum.HistogramData.Sum(v => v.Value)));
            }

            series.Points.Add(new DataPoint(datum.MaxLevel + datum.ClassWidth, 0));

            AreaSeriesList.Add(series);
            semanticGraph.Series = series;

            return series;
        }
        private AreaSeries createAreaSeries(SemanticGraph semanticGraph, int sensorID)
        {
            AreaSeries series = new AreaSeries();
            //series.TrackerFormatString = series.TrackerFormatString + "\n" + link.Semantics + " : {Tag}";
            series.Title = "Sensor ID: " + sensorID;

            System.Diagnostics.Stopwatch sw = new System.Diagnostics.Stopwatch();
            sw.Start();

            SemanticHistogramDatum datum = SemanticHistogramDatum.GetEnergyInstance(semanticGraph.SemanticLink, this.TripDirection, sensorID);
            //SemanticHistogramDatum datum = null;

            sw.Stop();
            Console.WriteLine("COST: " + sw.Elapsed);

            //series.Points.Add(new DataPoint(0.02, 0));
            
            foreach (LevelAndValue item in datum.HistogramData)
            {
                if(item.Level > 0.02 && item.Level < 0.15)
                series.Points.Add(new DataPoint(item.Level, item.Value));
            }

            //series.Points.Add(new DataPoint(0.15, 0));

            AreaSeriesList.Add(series);
            semanticGraph.Series = series;

            Console.WriteLine("SENSOR: " + sensorID + ", WIDTH: " + datum.ClassWidth);

            return series;
        }