Been hooking with a graph in d3 using time scaling x axis events. Its pointless to explain entire situation with graph but I came in conclusion of a solution. For that I figured out this solution which I am in little confusion with.
Imgine I have an Object:
{
"values" : [ [ 1136005200000 , 1271000.0] , [ 1138683600000 , 1271000.0] , [ 1141102800000 , 1271000.0] , [ 1143781200000 , 0] , [ 1146369600000 , 0]
}
Lets say it has pairs: [x, y]. x looks like '1136005200000' which is ofcourse a UTC parse date.
What I just need to do is to create a dummy object. In that object, I need to se default dates, lets say 7 days with some parsed numbers. Besides, I need to make sure for the date which doesnt exist in above pair will enter 'y' as 0 and then to finalize the object for 7 days just inserting those values which are available.
Any ideas or approach anyone want to share, please go ahead!