日期使用JFreeChart在X轴上的时间 [英] Date Time on x-axis using JFreeChart
问题描述
我想使用数据库中的数据创建图表(Oracle)。
数据集包含 DateTimeStamp
值和数值
DateTimeStamp
值的间隔为15分钟并且通常延长超过一个日历日。
DateTimeStamp
值需要针对X轴绘制图形,而数据值(数值)将针对Y轴进行绘图。
x轴主要tic标记应该是日历天数。
我已经购买了 JFreeChart
的企业版,但是提供的用户名密码不允许我在他们的是免费的;只需点击注册链接即可。
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.
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.
这篇关于日期使用JFreeChart在X轴上的时间的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!