XYSeries « Series « JFreeChart Q&A





1. Adding Double Variable values Using XYDataset(JFreeChart) to XySeries    stackoverflow.com

"I have a Problem of adding double variable "gdataset" values to "series.add()". Any help please regarding this"

  private static XYDataset samplexydataset2() {
  double[][]gdataset;
  XYSeriesCollection xySeriesCollection = new XYSeriesCollection(); ...

2. Adding points to XYSeries dynamically with JfreeChart    stackoverflow.com

I am facing problems in adding points to XYSeries. I have two classes. One is Sample (it has a main method) and the other class is JfreeChart (it has JfreeChart Code). ...

3. Set Width of XYSeries JfreeChart    stackoverflow.com

Can someone help me to know how to set the width of bar in this x-y graph from JFreeChart. Thank you very much.

    final XYSeries ...

4. Concatenating two XYSeries in JFreeChart    stackoverflow.com

I'm using JFreeGraph API to plot real time graphs for read/write operations. To give real time feel i update the graph for every 1000 updates; with one XYSeries already added to ...

5. XYSeries and out of memory issue    jfree.org

Hi All, I'm trying to add huge data more than a million to XYSeries[]. Means i need multiple XYSeries with each having millions of data. The data comes from a file. Whenever the file size is about 40 MB it fails with a out of memory error. I just came up with a test code to verify this. Code: Select all ...

6. Marking Points on XYSeries, a diff. point for each series    jfree.org

Daniel - I understand it when you say I need to extend the class. But wouldnt that cause a problem with other classes which use the base class. How do I find out all the classes that are using my base class. The JFreeChart class does not use the "XYLineAndShapeRenderer" class directly. I am assuming one of the listeners is calling ...

8. draw on XYSeries on top of others    jfree.org

I use a selection JList widget with an XYPlot. If the user selects one or more names in the JList, I then 1) 'gray out' all the other XYSeries in the XYSeriesCollection 2) leave the color of the selected series unchanged 3) the selected lines stand out nicely against the background of the grayed-out lines -- most of the time This ...

9. How to allow nulls in XYSeries    jfree.org

Hi Daniel, As you said values as null would be shown as balnk in line graph, But in my case i want to show gap when data is not collected( ie not stored in database ) for certain period. so there would be no data in database in this particular period and i need to show it as blank. Thanks in ...





10. XYSeries and negative values    jfree.org

Hi! Is it possible to display a range of negative values without actually showing the negative sign ? My x-axis have a range of values between 330 and 0, I'm using XYSeries and I tried to build them using autoSort=false but that doesn't change anything... The chart is always displayed with values from 0 - 330 unless I use negative values... ...

11. XYSeries    jfree.org

13. XYSeries prob    jfree.org

XYSeries prob by jaypee Thu Apr 27, 2006 5:05 am Hi all, I have this code for the chart: Code: Select all import org.jfree.chart.ChartFactory; import org.jfree.chart.ChartPanel; import org.jfree.chart.JFreeChart; import org.jfree.chart.plot.PlotOrientation; import org.jfree.data.xy.XYSeries; import org.jfree.data.xy.XYSeriesCollection; import org.jfree.ui.ApplicationFrame; import org.jfree.ui.RefineryUtilities; import org.jfree.data.time.Day; import java.sql.*; import java.awt.Dimension; import ca.edbc.util.EdbcEx; public class XYSeriesDemo extends ApplicationFrame { public XYSeriesDemo(final String title) ...

14. XYSeries not synchronized    jfree.org

I think it ought to be possible to make the dataset classes thread-safe, although this won't be sufficient to make JFreeChart thread-safe (for example, some charts use multiple datasets, and the integrity of the chart rendering can depend on synchronising updates to all of those datasets). I wonder if the Collections.synchronizedList() method is the best approach though. Does it allow multiple ...

15. how to use XYSeries can anybody tell?    jfree.org

hello, first of all i ll tell my problem..... i have a file which has two columns of data that contains thoussands of real nos,so the first column is stored in x[]and the second in y[].so i need to plot those two and i also need to get get the plotted point on the graph whereever i point the mouse so ...

16. XYSeries NullPointerException    jfree.org

XYSeries NullPointerException by whelanneil Wed Jun 07, 2006 2:36 pm Hi All, I've been having a little trouble with XYSeries. I've seen versions of it where a Comparable is required as an argument eg. new Integer(1), I've also seen examples where a string is simply valid to instantiate an XYSeries. I'm trying to use JFreeChart to present a graph in ...





18. XYSeries constructor problem when upgrade 1.0.1    jfree.org

Hi, according to the CVS version of JFreeChart, that method *is* there: "org.jfree.data.xy.XYSeries.(Ljava/lang/Comparable;)V" is declared at line 82 of file "XYSeries.java". So my guess is, that you have an older version of JFreeChart lurking around, which now causes you all the trouble. (If you recompiled your code and the compiler did not complain, then you can be almost 100% sure that ...

19. getting coordinates with XYSeries    jfree.org

Hello, try this: Code: Select all public void chartMouseClicked(ChartMouseEvent event) { if (null == event) return; // screen coordinates int screenX = event.getTrigger().getX(); int screenY = event.getTrigger().getY(); // data coordinates ChartEntity entity = event.getEntity(); if (entity instanceof XYItemEntity) { ...

21. XYSeries data order and Polar Chart line connect    jfree.org

XYSeries data order and Polar Chart line connect by me_dave Mon Nov 27, 2006 11:14 pm I have just started using JFreeChart and have been very pleased for the most part. I do however have a few issues that seem to have been raised before on this list before, but I cannot find a status for them and assume they ...

22. How to change the marker lables in XYSeries    jfree.org

Hi, Can anybody tell me how can I set my own markers or change the markers on the X axis and Y axis in XY Series Chart. Right now its starting from 0-1-2-3-4-5-.......and so on, but I need to set it to 1000-2000-3000-40000.....so on, on Y axis. What can I do for that.

24. Rotation angle of XYSeries line?    jfree.org

25. XYSeries    jfree.org

private XYSeriesCollection[] datasets; .... XYSeries channel0 = new XYSeries("Channel 0"); datasets[0] = new XYSeriesCollection (channel0); XYSeries channel1 = new XYSeries("Channel 1"); ...

27. TimeSeries vs XYSeries for time related data    jfree.org

what is the difference between TimeSeries and XYSeries if you are working with time related data. which is better to use. i need to draw stock chart on daily as well as minute by minute basis.so i was thinking of using XYSeries. (as i dont have to use Day and Minute class). but performance wise which is better. which is fast ...

28. XYSeries with XYBarRenderer    jfree.org

29. No stroke in a XYSeries chart    jfree.org

30. Question with XYSeries - Please reply David..really urgent    jfree.org

Hello, I am using XYSeries for for generating my graph. Now, the points on my graph are something like -- first two pints -- (0.14, 0) , (0.14, 10) second two points -- (0.18, 0) , (0.18, third two points -- (0.22, 0) , (0.22, 7) Now, I want the graph to show me just a straight line between first two ...

33. Determining xyseries from the crosshair    jfree.org

I am new to JFreeChart and I am struggling with the following simple issue. In XYPlot how one can determine which XYseries plot's crosshair overlays ? (In my application the crosshair is locked on data. Plot contains several XYseries each plotted against the same domain and range axis) Thanks in advance for help.

34. Item limited XYSeries in two datasets    jfree.org

Hi, perhaps I shouldn't be doing what I'm doing but anyway... I want two or more views (plots) of the same time series data. So, I am including the same XYSeries in two different datasets. The problem is when I use dataset.removeAllValuesForX to restrict the number of points in the DefaultTableXYDataset. I then get index out of bounds errors in the ...

36. XYSeries with date values and mondayThroughFriday timeline    jfree.org

i have daily data and minute data. so instead of using regulartime period i use XYSeries with millisecond values now daily data does not have any time values. when i use mondayThroughFriday timeline with DateAxis. it is messes up with all friday's data. and i can not see any friday data. can any one tell me how to fix this.

37. XYSeries update not work    jfree.org

I use: XYSeriesCollection DATASET XYSeries SERIES The chart displays dataset correctly. I check values of series as follows: for i DATASET .getSeries(0).getDataItem(i).getY() and it shows the same values of SERIES that was set. Next step is updating my series, I tried two ways: DATASET.getSeries(0).update(new Double(0), new Double(5)); DATASET.getSeries(0).updateByIndex(0, new Double(5)); Then, I check new value (in both ways): DATASET.getSeries(0).getDataItem(0).getY() and it ...

38. Problem with setKey in XYSeries    jfree.org

Hi, I don't know if this is a bug or I make something wrong. I generate the legend in a subtitle and after that I try to use setKey (change the text) but the item in the legend for that series disappear. This doesn't happen for the default legend. I use JFreeChart 1.0.0 Pre1

39. how do I add 2 XYSeries to 1 XYDataset? please..    jfree.org

PROBLEM SOLVED, XYSeries test1 = new XYSeries("random test"); XYSeries series = new XYSeries("random plotting"); for(int i=0;i

40. XYSeries - Coordinate (X,Y)    jfree.org

41. align of two XYSeries    jfree.org

Hi Peter, here is a tentative recipe. Note that I havent used most of the classes for myself. 1. When you click with the mouse, get the mouse coordinates and get the underlying dataset if there is one available. The ChartMouseEvent-class and the various subclasses of ChartEntity should help you to retrieve that information. 2. When you have dragged the mouse, ...

42. StackedXYBarRenderer problem with XYSeries adding & remo    jfree.org

I use: - DefaultTableXYDataset - StackedXYBarRenderer - XYPlot - XYSeries XYSeries method: - clear() does not work properly (there still remain all Items with null values) - add(x,y) does not work properly beacuse of: Exception in thread "AWT-EventQueue-0" org.jfree.data.general.SeriesException: X-value already exists. at org.jfree.data.xy.XYSeries.add(XYSeries.java:364) at org.jfree.data.xy.XYSeries.add(XYSeries.java:325) at org.jfree.data.xy.XYSeries.add(XYSeries.java:250) Is it possible to update/add/remove XYSeries from my StackedXYBarRendered Chart ??

43. Bug Fix - Can't add duplicate XYDataElements to XYSeries    jfree.org

I've found a bug in jfreechart-1.0.9 code for org.jfree.data.xy.XYSeries. There was a change some time ago which introduced the notion of allowing duplicate X values in XYSeries data. The method addOrUpdate(Number x, Number y) was never modified to support this, and therefore duplicate data were overwriting existing data. This is the fix I've made, but I don't know how to submit ...

44. Render XYSeries    jfree.org

Each renderer is matched up with a dataset and will be responsible for all the series in the dataset. If you want a different renderer per series, then you need to put each series into its own dataset. You can create bar charts on an XYPlot using the XYBarRenderer class, but it will expect to have an IntervalXYDataset. Since XYSeriesCollection doesn't ...

45. Addint a figure/shape to the end of the XYSeries    jfree.org

This is one way to do it (tested and works). Of course not knowing how you created your dataset/dataseries - plot/chart, I don't know if it will work for you. Code: Select all Drawable drawable= new Drawable(){ public void draw(Graphics2D graphics2D, ...

46. XYSeries throwing IndexOutOfBoundsException    jfree.org

XYSeries throwing IndexOutOfBoundsException by jacomoman Fri Oct 24, 2008 11:46 pm First, let me congratulate the JFreeChart developers on an excellent piece of software. I've purchased your developer guide and plan on supporting you folks as long as you're keeping up with its development. Now onto my issue. I did a few searches for this and didn't see anything, so ...

47. Showing alpha tick labels on XYSeries plot    jfree.org

I'm trying to generate a scatter plot using an XY series. Sometimes the field used for the domain axis has non-numeric data values (e.g. a date) - so I need to convert to a numeric value (e.g. ms from 1970) before adding an XYSeries member However I still want the original non-numeric data value to show in the domain axis tick ...

48. Only draw lines between currently visible XYSeries points?    jfree.org

I'm curious if anyone could recommend an efficient way to accomplish this. I have a graph with a very large range on the x-axis that can be viewed by zooming in and scanning along the axis. I'd like to prevent the connection of lines between points in my XYSeries if they are separated by a large distance on the x-axis. Or, ...

49. XYSeries addOrUpdate Function    jfree.org

50. XYSeries - How do I remove a single Y value?    jfree.org

I've got a X/Y scatter chart using XYSeries. Obviously for a scatter chart there are MULTIPLE Y values for every X value. I need to be able to remove a SINGLE Y value at a given X value. This means being able to do remove(Numberx, Number y). Unfortunately the implementations of the XYSeries class remove() only takes a x value. Under ...

51. How to hide connection/line between 2 Points of a XYSeries ?    jfree.org

Hi, I'm using jfreechart to plot mathematical function. Is it possible to hide a line between two Points? If I want to plot a function like 1/x from (x=-10 to x=10 with an stepsize from 1) there is also a line from -1 to 1 but thats mathematical wrong, therefore I want to hide this line.. How can I do this? ...

52. Update of Dynamic graph using XYSeries    jfree.org

Update of Dynamic graph using XYSeries by gunjannigam Mon Aug 31, 2009 11:54 am I am using XYSeries for plotting dynamic graph. I am using a class which adds data to the graph in every 200 secs but my graph does not redraw each time the new data is added. It redraws only after range value increases by one. Following ...

53. How to make the word wrap of the Legends in XYSeries    jfree.org

Hi, I have created MultiLine chart and one of the seriesName is too large say lenegth will be 500 charcters or more. But the chart area is 350*350. So some of the tailing seriesName characters in the Legends part are not visible. How to make the word wrap for the legends. If seriesName reached the chart area width, it will write ...

54. Regarding accuracy when plotting XYSeries Charts    jfree.org

Regarding accuracy when plotting XYSeries Charts by orjanh Sat Mar 13, 2010 1:34 pm I'm having some problems doing a plot with JFreeChart XYSeries. I'm implementing a software that uses two data sources combined with JFreeChart for plotting two charts. Chart1Data is a series of coordinates forming an electrocardiogram (ECG), while Chart2Data is a series of time intervalls illustrating each ...

55. XYseries customization    jfree.org

HI.. i want the x axis to have only the five values 0.5 , 1 , 1.5 , 2 and 2.5 But when i get the output , there are other values inserted in between , like 0.25, .75 etc How can i present only the 5 values ? Here's the code snippets which i am using . What values should ...

56. XYSeries without line compression    jfree.org

Hey, I'm trying to make transient recorder (oscilloscope), JFreeChart is great for this but when i add data to the chart, it keeps all the data inside the current view and compresses it, making the data harder to read as time goes on I need the chart to always go from 0 - 100 on the (time based) X-axis, any data ...

57. Extract Interval of XYDataItems (or indices) from XYSeries    jfree.org

Hello all, I've just started using JFreeChart and have been moving along rather nicely. API is great. What I'm trying to do now is extract a range of XYDataItems from a series given a range in data coordinates. Is this possible? I've tried to find the min and max index of the items in the list (series.getItems) by using Collections.binarySearch but ...

58. XYSeries in TimeSeriesChart    jfree.org

Hi, I'm new in this forum. First of all, I want to thank you all for reading this, and spending your time in order to help other people like me. I've searched here for a while but I cannot get a solution for my problem, so any help will be appreciated. My program uses a TimeSeriesChart based on a XYSeries instead ...

59. Interactive zooming + autosort XYSeries    jfree.org

private class XYDataItemCompteur extends XYDataItem { private static final long serialVersionUID = 1L; public XYDataItemCompteur(Number x, Number y) { super(x, y); } @Override ...

60. indexOf-method of XYSeries returns several negative Values??    jfree.org

index of the search key, if it is contained in the list; otherwise, (-(insertion point) - 1). The insertion point is defined as the point at which the key would be inserted into the list: the index of the first element greater than the key, or list.size(), if all elements in the list are less than the specified key. Note that ...

61. XYSeries and add method too slow    jfree.org

XYSeries and add method too slow by v_soares Thu Jun 09, 2011 6:55 pm Hi all, i've tried to insert 700,000 points in the chart. But It was too slow, and in the end I received java heap space. What is wrong? Could you help me? My code: Code: Select all List ...