public GraphDefinition(string title, bool isCurrency, DataMeter dataMeter, params GraphSeries[] graphSeriesSet)
        {
            DataMeter = QueryResult <DataMeter> .Create(dataMeter);

            Title          = title;
            IsCurrency     = isCurrency;
            GraphSeriesSet = graphSeriesSet;
        }
 public DataMeterResult(
     DataMeter dataMeter,
     int amount,
     decimal percentageScore,
     DataMeterValueCategory valueCategory
     )
 {
     _dataMeter      = dataMeter;
     PercentageScore = percentageScore;
     ValueCategory   = valueCategory;
     Amount          = amount;
 }
        private static IEnumerable <GraphDefinition> GetNumbarSummaryGraphs(
            Func <PersistedCityStatisticsWithFinancialData, PersistedNumberSummary> getNumberSummary,
            DataMeter dataMeter,
            string title,
            Color primaryColor,
            Color secondaryColor)
        {
            Func <PersistedCityStatisticsWithFinancialData, PersistedNumberSummary> getNumberSummarySafeFunc =
                x => getNumberSummary(x) ?? PersistedNumberSummary.EmptyInstance;

            yield return(new GraphDefinition(title, false,
                                             dataMeter,
                                             new GraphSeries(
                                                 x => getNumberSummarySafeFunc(x).Average,
                                                 "Average",
                                                 secondaryColor
                                                 ),
                                             new GraphSeries(
                                                 x => getNumberSummarySafeFunc(x).Max,
                                                 "Highest",
                                                 primaryColor
                                                 )
                                             ));
        }