Last active
August 29, 2015 14:16
-
-
Save pjsvis/cb9c7e0cb5bca362e00e to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| // Format as per flot requirements | |
| var flotData = new[] | |
| { | |
| new {label = "Quantity Required", data = partAvailability.Select(x => new[] {x.TimeStamp, x.QuantityRequired})}, | |
| new {label = "Quantity Available", data = partAvailability.Select(x => new[] {x.TimeStamp, x.QuantityAvailable})} | |
| }; | |
| // Timestamp created as follows | |
| private static long GetJavascriptTimestamp(DateTime date) | |
| { | |
| return (long)date.Subtract(new DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc)).TotalMilliseconds; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment