Page 1 of 2 12 LastLast
Results 1 to 20 of 25
  1. #1
    Manfizy's Avatar
    Manfizy is offline Senior Member
    Join Date
    Nov 2008
    Location
    Germany
    Posts
    193
    Rep Power
    6

    Post HOw to run ant javadoc

    I just downloaded jfreechart class library and am supposed to run ant javadoc to generate javadoc.
    How hv no idea on how to go about it
    Any1 with an idea??

  2. #2
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,372
    Blog Entries
    1
    Rep Power
    20

    Default

    Can you explain bit more clearly what you want to do? Looking to generate Javadoc for a library?

  3. #3
    Manfizy's Avatar
    Manfizy is offline Senior Member
    Join Date
    Nov 2008
    Location
    Germany
    Posts
    193
    Rep Power
    6

    Default

    Quote Originally Posted by Eranga View Post
    Can you explain bit more clearly what you want to do? Looking to generate Javadoc for a library?
    Exactly, i want to generate javadoc for jfreechart class library.How do i go about it??

  4. #4
    MK12's Avatar
    MK12 is offline Senior Member
    Join Date
    Jan 2009
    Posts
    185
    Rep Power
    6

    Default

    Most IDE's do it by just clicking an option, but I don't know how to do it manually. Maybe try downloading NetBeans if you can't figure out how to do it manually.
    -MK12
    Tell me if you want a cool Java logo avatar like mine and I'll make you one.

  5. #5
    Manfizy's Avatar
    Manfizy is offline Senior Member
    Join Date
    Nov 2008
    Location
    Germany
    Posts
    193
    Rep Power
    6

    Default

    am actually using netbeans IDE,but for it to work on netbeans u must generate it and add it as you add the class library.I dont know whether you understand what am trying to say?

    -----------------
    how about the avatar?it looks cool.mk for me one!

  6. #6
    MK12's Avatar
    MK12 is offline Senior Member
    Join Date
    Jan 2009
    Posts
    185
    Rep Power
    6

    Default

    Oh ok I wasn't thinking of the same thing then sorry.
    I'll make you a java avatar today though, I'll post it in this thread.
    -MK12
    Tell me if you want a cool Java logo avatar like mine and I'll make you one.

  7. #7
    neeraj.singh is offline Member
    Join Date
    Feb 2009
    Location
    Delhi
    Posts
    63
    Rep Power
    0

    Default

    hello manfizy,

    i am also using jfreechart with netbeans.
    what you exactly want? you want add the javadoc to the IDE? or what?

  8. #8
    Manfizy's Avatar
    Manfizy is offline Senior Member
    Join Date
    Nov 2008
    Location
    Germany
    Posts
    193
    Rep Power
    6

    Default

    Quote Originally Posted by neeraj.singh View Post
    hello manfizy,

    i am also using jfreechart with netbeans.
    what you exactly want? you want add the javadoc to the IDE? or what?
    Yep,thats what i want to do.
    Btw,how do you find jfreechart?are you good in it?
    Am trying to create a line graph using vaues read from a file and am in total darkness.
    May be we can share ideas on this if u dont mind.
    Can you please give me a simple code of plotting a line graph?

  9. #9
    neeraj.singh is offline Member
    Join Date
    Feb 2009
    Location
    Delhi
    Posts
    63
    Rep Power
    0

    Default

    Quote Originally Posted by Manfizy View Post
    Yep,thats what i want to do.
    Btw,how do you find jfreechart?are you good in it?
    Am trying to create a line graph using vaues read from a file and am in total darkness.


    May be we can share ideas on this if u dont mind.
    Can you please give me a simple code of plotting a line graph?
    i downloaded it from sourceforge.com
    its not that much hard.. i usually use it to plot a 3D bar chart for my application.
    ya sure, we can share.. actually i too have not used it completely...

    see below there is a sample code for a line graph chart
    Java Code:
    // i am having data in double.. you can read your file and manipulate them in double array
    final double[][] data = new double[][] {
                {5.0, 12.0, 4.0, 6.0, 16.0, 5.0, 7.0, 15.0},
                {6.0, 5.5, 7.0, 5.0, 3.0, 4.0, 0.0, 3.0},
                {3.0, 4.0, 3.0, 3.0, 7.0, 4.0, 3.0, 2.0},
               {1.0, 2.0, 3.0, 4.0}
            };
    
    
            Comparable[] series = {"Series A", "Series B", "Series C", "Series D"};
            Comparable[] type = {"N 1","N 2","N 3","N 4","N 5","N 6","N 7","N 8"};
    
            final CategoryDataset dataset = DatasetUtilities.createCategoryDataset(series, type, data);
    JFreeChart chart = null;
    // here we plot the graph
    chart  = ChartFactory.createLineChart("Bar Chart", "", "", dataset, PlotOrientation.VERTICAL, true, true, true);
    thanks
    /\/

  10. #10
    Manfizy's Avatar
    Manfizy is offline Senior Member
    Join Date
    Nov 2008
    Location
    Germany
    Posts
    193
    Rep Power
    6

    Default

    Quote Originally Posted by neeraj.singh View Post
    i downloaded it from sourceforge.com
    its not that much hard.. i usually use it to plot a 3D bar chart for my application.
    ya sure, we can share.. actually i too have not used it completely...

    see below there is a sample code for a line graph chart
    Java Code:
    // i am having data in double.. you can read your file and manipulate them in double array
    final double[][] data = new double[][] {
                {5.0, 12.0, 4.0, 6.0, 16.0, 5.0, 7.0, 15.0},
                {6.0, 5.5, 7.0, 5.0, 3.0, 4.0, 0.0, 3.0},
                {3.0, 4.0, 3.0, 3.0, 7.0, 4.0, 3.0, 2.0},
               {1.0, 2.0, 3.0, 4.0}
            };
    
    
            Comparable[] series = {"Series A", "Series B", "Series C", "Series D"};
            Comparable[] type = {"N 1","N 2","N 3","N 4","N 5","N 6","N 7","N 8"};
    
            final CategoryDataset dataset = DatasetUtilities.createCategoryDataset(series, type, data);
    JFreeChart chart = null;
    // here we plot the graph
    chart  = ChartFactory.createLineChart("Bar Chart", "", "", dataset, PlotOrientation.VERTICAL, true, true, true);
    thanks
    /\/
    thanx for your sample code.its actually working properly but there is something that is not clear to me.why do you have type on the x axis as in can i compare two variables lets say time and power level in a power plant where we have time on the x axis and power level on the y axis

  11. #11
    MK12's Avatar
    MK12 is offline Senior Member
    Join Date
    Jan 2009
    Posts
    185
    Rep Power
    6

    Default

    I'll try to make the Java pic tonight, might be finished in a few hours. check back then. (By the way to make them I'm just using pictures from google and then editing with GIMP)
    -MK12
    Tell me if you want a cool Java logo avatar like mine and I'll make you one.

  12. #12
    neeraj.singh is offline Member
    Join Date
    Feb 2009
    Location
    Delhi
    Posts
    63
    Rep Power
    0

    Default

    Quote Originally Posted by Manfizy View Post
    thanx for your sample code.its actually working properly but there is something that is not clear to me.why do you have type on the x axis as in can i compare two variables lets say time and power level in a power plant where we have time on the x axis and power level on the y axis
    hello,

    i could not understand what you exactly want to say..
    please make it clear...

    and if you are working on jfreechart then please tell me... i have an issue with it. then we can discuss about this.

    thanks
    /\/

  13. #13
    Manfizy's Avatar
    Manfizy is offline Senior Member
    Join Date
    Nov 2008
    Location
    Germany
    Posts
    193
    Rep Power
    6

    Default

    Quote Originally Posted by neeraj.singh View Post
    hello,

    i could not understand what you exactly want to say..
    please make it clear...

    and if you are working on jfreechart then please tell me... i have an issue with it. then we can discuss about this.

    thanks
    /\/
    Ok,to me the example code that u gave me looks like you were trying to plot a bar chart coz you have comparable type N1 - N8 on the x axis and the variables on the y axis. Now,my question is very simple,what if i want to plot a line graph of two variables,lets say time against powerlevel. How can i modify your code to do that? I hope now am clear enough.

    Initially i was working on Scientific graphing tool(SGT), pretty powerful tool but it was alil bit difficult for me coz i couldnt achieve what i wanted. So now have just turned back to jfreechart which i hope we are going to share ideas and achieve something.

    thanks for your kind response

  14. #14
    neeraj.singh is offline Member
    Join Date
    Feb 2009
    Location
    Delhi
    Posts
    63
    Rep Power
    0

    Default

    Quote Originally Posted by Manfizy View Post
    thanx for your sample code.its actually working properly but there is something that is not clear to me.why do you have type on the x axis as in can i compare two variables lets say time and power level in a power plant where we have time on the x axis and power level on the y axis
    ya you r abs rt...
    the two varibales there are for barchart...
    try your code and if find any bug then please discuss...

    if you goto the bar chart then pls do tell me
    i hv something to discuss..

    thanks
    /\/

  15. #15
    Manfizy's Avatar
    Manfizy is offline Senior Member
    Join Date
    Nov 2008
    Location
    Germany
    Posts
    193
    Rep Power
    6

    Default

    Quote Originally Posted by neeraj.singh View Post
    ya you r abs rt...
    the two varibales there are for barchart...
    try your code and if find any bug then please discuss...

    if you goto the bar chart then pls do tell me
    i hv something to discuss..

    thanks
    /\/
    hey, the bar chart is working properly.no bug..
    Am trying to modify it to xy plot.
    Any idea on which method to apply here?

    you can bring up the discussion now.think am good to go..

    cheerz!!

  16. #16
    Manfizy's Avatar
    Manfizy is offline Senior Member
    Join Date
    Nov 2008
    Location
    Germany
    Posts
    193
    Rep Power
    6

    Default

    Quote Originally Posted by Manfizy View Post
    hey, the bar chart is working properly.no bug..
    Am trying to modify it to xy plot.
    Any idea on which method to apply here?

    you can bring up the discussion now.think am good to go..

    cheerz!!
    what was your discussion about??

  17. #17
    neeraj.singh is offline Member
    Join Date
    Feb 2009
    Location
    Delhi
    Posts
    63
    Rep Power
    0

    Default

    for xy chart you have to use xyseries
    like this
    final XYSeries series = new XYSeries("Random Data");
    series.add(99, 400.2);
    series.add(5.0, 294.1);
    then
    final XYSeriesCollection dataset = new XYSeriesCollection(series);
    here you get the dataset for the graph now do the same with JChartFactory to plot the graph

  18. #18
    Manfizy's Avatar
    Manfizy is offline Senior Member
    Join Date
    Nov 2008
    Location
    Germany
    Posts
    193
    Rep Power
    6

    Post

    Quote Originally Posted by neeraj.singh View Post
    for xy chart you have to use xyseries
    like this
    final XYSeries series = new XYSeries("Random Data");
    series.add(99, 400.2);
    series.add(5.0, 294.1);
    then
    final XYSeriesCollection dataset = new XYSeriesCollection(series);
    here you get the dataset for the graph now do the same with JChartFactory to plot the graph
    This is how i implemented it but i still get an error.
    check it out
    Java Code:
    package myjfreechart;
    
    import org.jfree.chart.ChartFactory;
    import org.jfree.chart.ChartFrame;
    import org.jfree.chart.JFreeChart;
    import org.jfree.chart.plot.PlotOrientation;
    import org.jfree.data.category.CategoryDataset;
    import org.jfree.data.xy.XYSeries;
    import org.jfree.data.xy.XYSeriesCollection;
    
    /**
     *
     * @author MANFRIZYM
     */
    public class Main {
    
        /**
         * @param args the command line arguments
         */
    public static void main(String[] args) {
    
    final XYSeries series = new XYSeries("Random Data");
    series.add(99, 400.2);
    series.add(5.0, 294.1);
            
    final XYSeriesCollection dataset = new XYSeriesCollection(series);
    
    JFreeChart chart = null;
    
    chart  = ChartFactory.createLineChart("Line Graph", "Time(Hrs)", "Power Level(%)",(CategoryDataset) dataset, PlotOrientation.VERTICAL, true, true, false);
    
    // create and display a frame...
    ChartFrame frame = new ChartFrame("First", chart);
    frame.pack();
    frame.setVisible(true);
        }
    
    }
    where am i makin errors?

    thanx

  19. #19
    neeraj.singh is offline Member
    Join Date
    Feb 2009
    Location
    Delhi
    Posts
    63
    Rep Power
    0

    Default

    hey dear
    you are created dataset with XYSeries and
    ploting the LineChart graph .....
    plot the xy... chart

    thanks
    /\/

  20. #20
    Manfizy's Avatar
    Manfizy is offline Senior Member
    Join Date
    Nov 2008
    Location
    Germany
    Posts
    193
    Rep Power
    6

    Default

    Quote Originally Posted by neeraj.singh View Post
    hey dear
    you are created dataset with XYSeries and
    ploting the LineChart graph .....
    plot the xy... chart

    thanks
    /\/
    Scheiße!!why was i not seeing this??
    Its now working after using the xy plot.

    I can now see light at the end of the turnel.hehehehe!!

    Thanx so much :-)

Page 1 of 2 12 LastLast

Similar Threads

  1. javadoc question
    By orchid in forum New To Java
    Replies: 3
    Last Post: 02-14-2014, 12:07 AM
  2. Javadoc-tool
    By tskumarme in forum New To Java
    Replies: 1
    Last Post: 05-30-2008, 01:31 PM
  3. JavaDoc
    By javarishi in forum Eclipse
    Replies: 1
    Last Post: 04-10-2008, 08:41 AM
  4. JavaDoc (method)
    By Java Tip in forum Java Tip
    Replies: 0
    Last Post: 12-04-2007, 10:48 AM
  5. what can I do with javadoc
    By christina in forum Advanced Java
    Replies: 1
    Last Post: 07-25-2007, 11:08 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •