jfreechart

mouse events in JfreeChart

hi, I need a way to distinguish when a mouse event occurs in the chart itself and not in the chartPanel (the plot area). Thanks ...

dashed line in Jfreechart

hi, Does anybody knows how to draw a vertical dashed line in Jfreechart at some given coordinates ? Thanks ...

mouse over chart line in jfreechart

Hi, I'd like to know if there is a way to detect when the mouse is over the graph line/lines and to be able to acces the data from the dataset corresponding to that point. ...

ohlc chart in jfreechart

hi, Is there a way to detect when the mouse goes over a bar in the chart ? ...

How can I draw a straight line in jfreechart?

How could I draw a straight line with the equation y=m*x+n in a jfreechart chart? ...

JFreeChart Annotations

hi, I'm having trouble understanding how the annotations system works. For example I can draw a vertical line as an annotation using some coordinates I get from the mouse, but I can't draw a line between 2 different points. This works: HighLowRenderer hlr=(HighLowRenderer)plot.getRenderer(); XYLineAnnotation a1=new XYLineAnnotation(...

Modify the OHLC bars in a OhlcSeries

Hi, I need advice on how could I modify the parameters (high, low, close, open) of a data item in a OHLCSeries. Thanks. ...

mouse clicks in jfreechart !

Hi, In my JfreeChart application I need to perform some actions when the user clicks the mouse on the chart. For this, I have a inner class that implements the ChartMouseListener and an instance of this class added as a chartMouseListener to the chartPanel. The strange thing , which I cannot comprehend why , is that sometimes when I cli...

multiple dataset in jfreechart !

Hi, How could I add to a plot an OHLCSeriesCollection and a TimeSeriesCollection , in order to represent their values in the same chart ? ...

Colours to PieChart in JFreeChart

I want to generate random colours which can be attractive in pie charts.I have a very poor sense when it comes to GUI.Can anyone help in writing a piece of function which generates 6 good colors that may look good in a pie chart in a random order.Right now I have hardcoded.But I don't like those colors.Please help me. plot.setSectionPai...

Jfreechart help

Is it possible to draw a 3D chart using JfreeChart like in the following link.If possible can anyone give some hints and some snippets of code on what parameters of Plot can be used to do this. link text ...

Java event handling

import java.awt.Color; import java.awt.Dimension; import javax.swing.JPanel; import javax.swing.Timer; import org.jfree.chart.ChartFactory; import org.jfree.chart.ChartMouseEvent; import org.jfree.chart.ChartMouseListener; import org.jfree.chart.ChartPanel; import org.jfree.chart.JFreeChart; import org.jfree.chart.entity.ChartEntit...

JFreechart Realtime Combined Plot - Rendering the previous value for a step subchart if no data point has been received

I have a combined plot in JFreechart consisting of 4 timeseries charts with a common time domain axis. The data for the subplots arrives at different rates. For example I may receive a price change event every couple of miliseconds and a position change every minute. I'm currently rendering these series with the XYStepRenderer to produc...

JFreechart Rendering a timeseries on a tick scale

I have a timeseries of data which i'd like to plot on a tick scale rather than a time scale. e.g. If the series contains points received at times: 10, 15, 30, 100. Instead of plotting these against a regular time series axis where the distance between the 30 and 100 point would be 70, i'd like the distance between each of these points ...

Annotations on a JFreeChart Pie Chart

Specifically I am looking to add text annotations to specific locations to a JFreeChart that is being output to a png file for web use. Can/how do annotations get added to pie charts. I have been able to successfully add annotations to XYPlots, but don't know how to overlay or add one to a PiePlot. My full task is to use the PiePlot to ...

Dynamically generate JFreeChart in servlet

I'm trying to generate graphs dynamically using JFreeChart as a result of some checkboxes the user selects, but I can't figure out how best to get the generated datasets into chart form (I have code that makes charts from these, but need to produce pngs) and into the JSP view. Currently, I can only think of sending the Datasets to the J...

Remove Specific Plot Key Entries in JFreeChart

I have an XYPlot in JFreeChart with multiple XYDatasets. JFreeChart creates a key at the bottom of the plot with an entry for each series by default. I would like to disable the drawing of entries for all of the series in one of my datasets. I do not want to disable the drawing of entries altogether. Is this possible without modifyin...

Charting amount of dated events in columns/bars

I want to create bar charts similar to web server logs. I have events in my database which all took place at a certain moment, I would like to grab all these events and then chart how many occurred each day, week, month, whatever on a bar (column) graph. For example I want to chart how many visitors I had in a month in 31 columns, each ...

JFreeChart for dynamic xy plots in java swing gui application

Has anyone worked with JFreeChart-open source library for plotting xy plots? Could someone post an example of how to create an xy plot dynamically with the x and y values generated from the program? And where can i get a turorial doc or something of that kind to know about how to use the JFreeChart for developing applications? Thanks ...

Saving a PNG file on a server in a Java bean, using JSTL

I am writing an update page in JSTL where the user inputs some numbers. I then call a java bean - passing the numbers as parameters - which, using JFreeChart, creates a PNG image. All of this works fine when I save the file directly on my hard drive using ImageIO.write(myBufferedImage, "png", new File("C:/testChart.png")); I can al...