简体   繁体   English

速度与时间的关系图

[英]Flot Graph for speed vs time

I am trying to display a speed/time graph using flot. 我正在尝试使用flot显示速度/时间图。 I receive data from a servlet. 我从Servlet接收数据。 I have a large number of GPS tracking events with time-stamp,speed,locations etc. 我有大量带有时间戳,速度,位置等的GPS跟踪事件。
If a user choose to view graph for say 2 days , the graph looks like this : 如果用户选择查看图说2天,则该图看起来像这样: 在此处输入图片说明

this is because their is a long pause between gps events. 这是因为它们是GPS事件之间的长时间停顿。 ( horizontal is time in hours and vertical is speed in km/hr ) 水平是时间(小时),垂直是速度(公里/小时 ))

Now if a user choose to view graph for a small time say 10 hrs or something like that(where their is no long pause in gps events) the graph looks perfect like this : 现在,如果用户选择查看一小段时间(例如10小时)之类的图形(在gps事件中不再长时间停顿),则该图形看起来像这样: 在此处输入图片说明

The data which creates the graph is here 创建图形的数据在这里

As you can see, the first graph is just unreadable, My question is how can I make the first graph more readable. 如您所见,第一个图形是不可读的,我的问题是如何使第一个图形更具可读性。

Use something like a mirrored logaritmic scale. 使用类似镜像对数刻度的东西。 Flot allows you to configure the steps of the chart. Flot允许您配置图表的步骤。

Something like ( copied from here ): 类似于( 从此处复制 ):

xaxis: {
    transform: function (v) { return Math.log(v); },
    inverseTransform: function (v) { return Math.exp(v); }
}

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM