Created
October 23, 2014 12:56
-
-
Save benhysell/e377f0e57897e474bf69 to your computer and use it in GitHub Desktop.
oxplot data point mapping
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
Func<object, DataPoint> dataPointMapping; | |
if (weightRepository.Units == WeightRepository.LBS) | |
dataPointMapping = item => new DataPoint (DateTimeAxis.ToDouble (((WeightEntry)item).Date), ((WeightEntry)item).WeightLbs); | |
else | |
dataPointMapping = item => new DataPoint (DateTimeAxis.ToDouble (((WeightEntry)item).Date), ((WeightEntry)item).WeightKg); | |
weightLinePlot.Mapping = dataPointMapping; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment