public string get_widgets_messagetypeperminutetypecompare_WidgetSettingId(MessageTypePerMinuteModel input)
        {
            //TODO: Change so that we get the settings from raven
            //var widgetSetting = _session.Load<MessageTypePerMinuteTypeCompare>(input.WidgetSettingId);

            IList<Guid> messageTypes = new List<Guid>
                                           {
                                               Guid.NewGuid(),
                                               Guid.NewGuid()
                                           };

            var widgetSetting = new MessageTypePerMinuteTypeCompare
                                    {
                                        ForMinutesInThePast = 10,
                                        MessageTypeId = messageTypes
                                    };

            DateTime from = DateTime.Now.AddMinutes(widgetSetting.ForMinutesInThePast * -1);

            //TODO: Change so that we call the raven index
            //var messageTypePerMinuteIndexData =
            //    _session.Query<MessageTypePerMinuteIndexData, PhysicalMonitoring.Index.MessageTypePerMinute>().Where(
            //        x => widgetSetting.MessageTypeId.Contains(x.MessageTypeId) && x.Minute >= from).ToList();

            var messageTypePerMinuteIndexData = new List<MessageTypePerMinuteIndexData>
                                                    {
                                                        new MessageTypePerMinuteIndexData
                                                            {
                                                                MessageTypeId = messageTypes.First(),
                                                                Minute = DateTime.Now.AddMinutes(-5),
                                                                Count = 10
                                                            },
                                                        new MessageTypePerMinuteIndexData
                                                            {
                                                                MessageTypeId = messageTypes[1],
                                                                Minute = DateTime.Now,
                                                                Count = 7
                                                            }
                                                    };

            var pieChart = new PieChart();

            foreach (var typePerMinuteIndexData in messageTypePerMinuteIndexData)
            {
                pieChart.Item.Add(new PieChartItem
                                      {
                                          Label = typePerMinuteIndexData.MessageTypeId.ToString(),
                                          Value = typePerMinuteIndexData.Count.ToString(CultureInfo.InvariantCulture)
                                      });
            }

            return JsonConvert.SerializeObject(pieChart);
        }
        public string get_widgets_messagetypeperminute_WidgetSettingId(MessageTypePerMinuteModel input)
        {
            //TODO: Change so that we get the settings from raven
            //var widgetSetting = _session.Load<MessageTypePerMinute>(input.WidgetSettingId);

            var widgetSetting = new Domain.MessageTypePerMinute
                                    {
                                        HighChartsConfig = TestdataHelper.GetHighChart(),
                                        ForMinutesInThePast = 10
                                    };

            DateTime from = DateTime.Now.AddMinutes(widgetSetting.ForMinutesInThePast * -1);

            //TODO: Change so that we call the raven index
            //var messageTypePerMinuteIndexData =
            //    _session.Query<MessageTypePerMinuteIndexData, PhysicalMonitoring.Index.MessageTypePerMinute>().Where(
            //        x => x.MessageTypeId == widgetSetting.MessageTypeId && x.Minute >= from).ToList();

            var messageTypePerMinuteIndexData = new List<MessageTypePerMinuteIndexData>
                                                    {
                                                        new MessageTypePerMinuteIndexData
                                                            {
                                                                Minute = DateTime.Now.AddMinutes(-5),
                                                                Count = 10
                                                            },
                                                        new MessageTypePerMinuteIndexData
                                                            {
                                                                Minute = DateTime.Now,
                                                                Count = 7
                                                            }
                                                    };

            widgetSetting.HighChartsConfig.Series.Add(new HighChartsData
                                                          {
                                                              Data =
                                                                  messageTypePerMinuteIndexData.Select(
                                                                      x => (double) x.Count).ToList(),
                                                              Name =
                                                                  "Message count last " +
                                                                  widgetSetting.ForMinutesInThePast +
                                                                  " minutes"
                                                          });

            widgetSetting.HighChartsConfig.xAxis.Categories =
                messageTypePerMinuteIndexData.Select(x => x.Minute.ToShortTimeString()).ToList();

            return JsonConvert.SerializeObject(widgetSetting.HighChartsConfig);
        }