Date Time on x-axis using JFreeChart

末鹿安然 提交于 2019-12-11 14:12:48

问题


I would like to create a graph using data from a database (Oracle). The dataset contains DateTimeStamp values and numeric values The DateTimeStamp values are for intervals of 15 minutes and usually extend for a period greater than one calendar day. The DateTimeStamp values need to be graphed against the X-axis and the data values (numeric) will be graphed against the Y-yxis. The x-axis major tic marks should be the calendar days. I have purchased the enterprise version of JFreeChart but the username password provided does not allow me to ask questions on their forum, and sending email to the owner results in no response.

Thanks for any help you can offer. A working code block/snippet would be ideal and much appreciated.


回答1:


Look at JDBCXYDataset, which uses the query's ResultSetMetaData to recognize Types related to date and time. Complete examples are seen here and here.

As an aside, access to the support forum is free; just click the register link.



来源:https://stackoverflow.com/questions/28904400/date-time-on-x-axis-using-jfreechart

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