![]() |
| ||
| Plot Chart from a Txt file Hello my friends I have a txt file with the follow layout Quote:
this is the code that i'm using.... import java.io.File; |
| ||
| Re: Plot Chart from a Txt file and your point is??? |
| ||
| Re: Plot Chart from a Txt file Quote:
The graphic is not plotting can anyone help me to find where is the problem... |
| ||
| Re: Plot Chart from a Txt file The graph shows just fine for me. |
| ||
| Re: Plot Chart from a Txt file Quote:
:-O |
| ||
| Re: Plot Chart from a Txt file No of course not. I don't have that file and you have it commented out. You said the graphic was not plotting. |
| ||
| Re: Plot Chart from a Txt file Quote:
the file contents... Quote:
:) sorry about my fail |
| ||
| Re: Plot Chart from a Txt file I don't think you want an XYSeries for that. If you want it to be a line chart (bar chart seems more appropriate to me, but you seem to want the line chart), try this instead private CategoryDataset createDataset() throws Exception {All you have to do is build that category dataset with the first and second elements of your spilt() on the text file line. |
| ||
| Re: Plot Chart from a Txt file You are right... i want a bar chart... but as a newby i'm still trying to discover to potential of the javafreechart... reading trying reading trying... i'm too slowwww... thank you for your lights...~ to change for a bar type what should i dooo?? :( Quote:
|
| ||
| Re: Plot Chart from a Txt file something like this^?????? JFreeChart chart = ChartFactory.createBarChart( |
| ||
| Re: Plot Chart from a Txt file There is a bar chart demo file in the source\org\jfree\chart\demo directory of JFreeChart. |
| ||
| Re: Plot Chart from a Txt file Quote:
my problem is allways with the collectage of the data from the txt file.... thank you |
| ||
| Re: Plot Chart from a Txt file You already have the basic part of that in place. Read each line of the file, use split() to separate the elements, then add that pair of values to your series for the chart. |
| All times are GMT -4. The time now is 10:09 pm. |
Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2009 DaniWeb® LLC