Avoid item label overlap in time series 1D plots (JFreeChart)

 ̄綄美尐妖づ 提交于 2019-11-26 14:57:54

问题


I am trying to find the best strategy to produce a 1D time based plot with labels. It currently looks like this:

The problem is there is spans of time where very little happens, and others with high density.

What I would like to achieve is to distort the time axis so that in the dense areas the labels are spaced apart to avoid overlap. Alternatively, I could imagine to show the actual data points without axis distortion, but distribute the labels so that they do not overlap.


EDIT: This is my attempt to clean up the mess manually, to get an idea of which output I would like to have:


回答1:


You might experiment with some combination of pan and zoom using setDomainPannable() and setMouseWheelEnabled(), seen here and here. Right-click to see the context menu and control-click to pan (option-click on Mac OS X).



来源:https://stackoverflow.com/questions/19281374/avoid-item-label-overlap-in-time-series-1d-plots-jfreechart

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!