Convert length of time to percentages nvd3
Posted on 2014-09-24
I am looking for leads on how to convert time based events from seconds to hours into percentages which can be displayed properly on nvd3 graphs.
The problem currently is that when using a time based scale, the Y axis either dynamic or static, does not show all of the data properly.
For example, there are events which are 2 seconds long while there are others which are a few hours long. When putting both on the same scale, one ends up either being so small that it cannot be seen or so large that it just shows a huge bar on the graph.
Therefore, we need to convert the time based events to percentages so that a Y axis could work. Then users could mouse over each event to get finer details.
I am not the programmer, I am only looking for leads or input on how this could be done by others who may have done something similar.