Last active
August 29, 2015 14:05
-
-
Save rid00z/7a113dfe5e27d4c2b7be to your computer and use it in GitHub Desktop.
JellyBeanGraphCalculator
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class JellyBeanGraphCalculator | |
{ | |
IDataSource _datasource; | |
public JellyBeanGraphCalculator (IDataSource datasource) | |
{ | |
_datasource = datasource; | |
} | |
public IEnumerable<JellyBeanGraphData> GetGraphData() | |
{ | |
return _datasource.GetJellyBeanValues().Result | |
.Select(o => new | |
JellyBeanGraphData | |
{ | |
name = o.Name, | |
color = o.Name, | |
data = new List<decimal> { o.Jan, o.Feb, o.Mar, o.Apr, o.May, o.Jun, o.Jul, o.Aug, o.Sep, o.Oct, o.Nov, o.Dec } | |
}); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment