flot:不能在窄屏上使用折线图概览

flot: can not use line-chart overview on narrow screen

我现在尝试将这个项目适配为响应式设计,并根据屏幕大小显示图表。

我的问题:在窄屏上,当 'overview' 中的范围太小(以像素为单位?)时,我无法获得概览图selected 事件。

如何强制 'overview' selection?

在下图中,可以看到最近 3 天的 selection。这有效。但是 selection of last-1-day 不起作用:

Flot 选择插件有一个 minSize 选项,默认设置为 5 像素。由于概览中一天的数据大约为 3 像素宽,因此 plotselected 事件不会触发。将 minSize 设置为 1,它应该适用于尺寸小至 100 像素的图表。

来自 jquery.flot.selection.js 文件中的评论:

"minSize" is the minimum size a selection can be in pixels. This value can be customized to determine the smallest size a selection can be and still have the selection rectangle be displayed. When customizing this value, the fact that it refers to pixels, not axis units must be taken into account. Thus, for example, if there is a bar graph in time mode with BarWidth set to 1 minute, setting "minSize" to 1 will not make the minimum selection size 1 minute, but rather 1 pixel. Note also that setting "minSize" to 0 will prevent "plotunselected" events from being fired when the user clicks the mouse without dragging.