Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Home Answers Viewqa Java3D radar graph in java
Login         

View Questions and Answers by Category

Advertisements


 
Have Programming Question? Ask it here!
 
 
 


Yogi
radar graph in java
1 Answer(s)      4 years and a month ago
Posted in : Java3D


Hi All I am developing a java application. In this application i need to show a radar grap.when some body assigne rating then each rating should show on x y z axis. please suggest me some good way to do this task. Thanks Yogi


Advertisement
View Answers

December 9, 2010 at 12:59 PM


Hi Friend,

Try the following code:

import java.awt.*;
import org.jfree.ui.*;
import org.jfree.chart.*;
import org.jfree.chart.plot.*;
import org.jfree.chart.labels.*;
import org.jfree.chart.title.*;
import org.jfree.data.category.*;

  public class RadarChart extends ApplicationFrame {
    public DefaultCategoryDataset dataset;
    public SpiderWebPlot plot;
    public RadarChart(String title) {
        super(title);
        String series1 = "First";
        String series2 = "Second";
        String series3 = "Third";

        String category1 = "Category 1";
        String category2 = "Category 2";
        String category3 = "Category 3";
        String category4 = "Category 4";
        String category5 = "Category 5";

        DefaultCategoryDataset dataset = new DefaultCategoryDataset();
        dataset.addValue(1.0, series1, category1);
        dataset.addValue(4.0, series1, category2);
        dataset.addValue(3.0, series1, category3);
        dataset.addValue(5.0, series1, category4);
        dataset.addValue(5.0, series1, category5);

        dataset.addValue(5.0, series2, category1);
        dataset.addValue(7.0, series2, category2);
        dataset.addValue(6.0, series2, category3);
        dataset.addValue(8.0, series2, category4);
        dataset.addValue(4.0, series2, category5);

        dataset.addValue(4.0, series3, category1);
        dataset.addValue(3.0, series3, category2);
        dataset.addValue(2.0, series3, category3);
        dataset.addValue(3.0, series3, category4);
        dataset.addValue(6.0, series3, category5);
        SpiderWebPlot plot = new SpiderWebPlot(dataset);
        plot.setStartAngle(54);
        plot.setInteriorGap(0.40);
        plot.setToolTipGenerator(new StandardCategoryToolTipGenerator());
        JFreeChart chart = new JFreeChart("", TextTitle.DEFAULT_FONT, plot, false);
        ChartUtilities.applyCurrentTheme(chart);
            ChartPanel chartPanel = new ChartPanel(chart);
        this.plot = (SpiderWebPlot) chartPanel.getChart().getPlot();
        this.dataset = (DefaultCategoryDataset) plot.getDataset();
        chartPanel.setPreferredSize(new Dimension(500, 270));
        setContentPane(chartPanel);
        }
        public static void main(String[] args) {
        RadarChart demo = new RadarChart("Chart");
        demo.pack();
        RefineryUtilities.centerFrameOnScreen(demo);
        demo.setVisible(true);
          }
}

Here we have used jfreechart api.

Thanks



Related Tutorials/Questions & Answers:
radar graph in java
radar graph in java  Hi All I am developing a java application. In this application i need to show a radar grap.when some body assigne rating then each rating should show on x y z axis. please suggest me some good way to do
Graph in JAVA SWING
Graph in JAVA SWING  Hi, How to draw a simple GRAPH in JAVA SWING ?  ..., Please visit the following link: Bar Graph in Java Swing Thanks
Advertisements
plot a graph in Java
plot a graph in Java   I need to plot a graph in Java but the samples are not known in advance. The samples keep on coming through callback and I... and the final graph may be quite congested. So please guide me on this. Thanks
plotting a graph - Java Beginners
plotting a graph  pls help me out regarding plotting a graph. I have done that through LiveGraph API. but now i required the graph to be displayed on the gui- window. and whatever inputs i will pass it must change the graph
java-graph help - Java Beginners
java-graph help  sir/madam I wanted to design a shortest path Algorithm. i wanted to show the shortest path in graphical format in the way it looks in the books.I have drawn circlec and lines between the circles but am not able
java + excel data +graph - JDBC
java + excel data +graph  i am doin' a project in which i need... a graph with the facility of drawing a trendline(in the graph)...also i need to be able to select points in the graph and draw the graph again between those
Graph
Graph  What is the code to generate the following graphs? 1.Simple Bar diagram 2.Sub-divided Bar diagram 3.Pie chart Please Help!!!!   Please visit the following link: Java charts and graphs
Multi line graph - Java Beginners
Multi line graph  Hi, I want a multi line graph on a single chart using jfree in java.... Can you please let me know the code... thanks in advance  Hi Friend, Loginto the below mentioned URl & download the file
make chart or graph from database - Java Beginners
make chart or graph from database  d, I want to ask about how to make a chart or graph. First i have Table name= "customer" and field =(cust_id... I am sending a link where u find many example related to chart and graph
Ask make graph from i report and view to java Language Programming
Ask make graph from i report and view to java Language Programming  Dear sir, Please help me, i want to make a graph from mysql to i report and view to java. Please help me, give me example source code please. thank you
Create Bar Graph from reading excel sheet in Java
Create Bar Graph from reading excel sheet in Java  I'm New to Java and I have to create a java program where I have to read data from multiple excel... and plot a bar graph between browser and test case pass/fail based on the data
Applet Graph
Applet Graph  hai, iam new to java plz help me.. 1..i have a table... columns-names by using check box and click on graph button, 3..then i have to get a graph between those columns in a applet plz send me the code thank u
How to draw to graph in Ms Excel from the data which is sent from an java application....?
How to draw to graph in Ms Excel from the data which is sent from an java application....?  How to draw to graph in Ms Excel from the data which is sent from an java application
to show graph
to show graph  by clicking on submit button how to show the graph by fetching data in mysql?   Please visit the following link: JSP graph by fetching data in mysql
line graph
line graph  I have developed an application and in that i have to compare 2 reports using line graph from the data taken from ms access database?please help
Autoupdating graph
Autoupdating graph  Hey Anyone who might help me making a XY graph, that autoupdates lets say every 5th minute. All the datasets comes from an mySQL database, and the dataset in the database, comes from a txt file and are being
Create Bar graph
Create Bar graph  hi............. In my project i want to create a BAR GRAPH to display the result. I HAVE certain values that want to show in graph form. Can u help me plzzzzzzz i require a very simple code in java swings were
about graph - Applet
about graph  How to draw a graph in applet and that should be display in web browser? How to make a running applet in our browser? for example ticker
datewise/monthwise bar graph
datewise/monthwise bar graph  How to make a datewise/monthwise bar graph using the values from the ms access database? please help its urgent
Changing 2D graph using slider.
Changing 2D graph using slider.  Code for changing a 2d graph with help of slider
To display the bar graph
To display the bar graph  hi........ I am able to get the output of bar graph. but now i want that to be displayed on my own form. The code which i am having in that the output is displayed in another form, its creating new form
statistical graph in jsp - JSP-Servlet
statistical graph in jsp  how to create a statistical graph to show the highest mark and the lowest mark of a table named test which consist of two... by a graph without hard coding the id's and the scores
Applet program for drawing picture and graph - Applet
the program(code) of drawing picture and graph in Applet.  Hi Friend, Please visit the following links: http://www.roseindia.net/java/example/java/applet/ http://www.roseindia.net/tutorial/java/swing/createHumanFace.html Hope
How to show database values into graph using jsp?
How to show database values into graph using jsp?  How to show database values into graph using jsp
How to show database values into graph using jsp?
How to show database values into graph using jsp?  How to show database values into graph using jsp
Draw graph using jsp without database connection
Draw graph using jsp without database connection  Draw graph using jsp code without database connection
How to show database values in Graph.(Like Cricket score board Graph)
How to show database values in Graph.(Like Cricket score board Graph)  Hi, Can Any one help out! How to show database values in Graph. i mean while....(Like Cricket score board Graph)   import java.sql.*; import
draw the running or moving graph using database in jsp
draw the running or moving graph using database in jsp  hi my question is how to draw the running or moving graph using jsp and take x and y co-ordinate value from database
draw the running or moving graph using database in jsp
draw the running or moving graph using database in jsp  hi my question is how to draw the running or moving graph using jsp and take x and y co-ordinate value from database
PHP GD line graph
,'Line Graph by: Roseindia Technologies',$red); imagepng($im); ?> After
graph generation from xml design file
graph generation from xml design file  how to search words in XML file with javascript. i have copied contents of XML file into word file. using searched keywords i would like to draw graph
Advertisements
 

 

 

DMCA.com