Skip to main content

Posts

Showing posts with the label TimeSeriesChart

Example to draw “Time Series Line Chart” using jfreechart in Java

A very good example of “Time Series Chart” is available here : www.java2s.com/Code/Java/Chart/JFreeChartTimeSeriesDemo12.htm I am writing this example to explore it further means to describe which settings you can change as per your requirements. I have tried my best to document everything. Please let me know if you have any questions after going through the code. Let's start... TimeSeriesChart.java //Code Starts here /*  * To change this template, choose Tools | Templates  * and open the template in the editor.  */ package jfreecharts; /**  *  * @author sshankar  */ import java.awt.BasicStroke; import java.awt.BorderLayout; import java.awt.Color; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.awt.Stroke; import java.io.File; import java.text.SimpleDateFormat; import javax.swing.JButton; import javax.swing.JFileChooser; import javax.swing.JFrame; i...