Skip to content

Instantly share code, notes, and snippets.

@rid00z
Last active August 29, 2015 14:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rid00z/7a113dfe5e27d4c2b7be to your computer and use it in GitHub Desktop.
Save rid00z/7a113dfe5e27d4c2b7be to your computer and use it in GitHub Desktop.
JellyBeanGraphCalculator
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