jfreechart

What is this: Exception in thread “AWT-EventQueue-0” java.lang.ExceptionInInitializerError?

偶尔善良 提交于 2019-12-11 07:45:28
问题 I copied a java program (called SwingAccumulator.java) which enables the user to enter integers one by one in a GUI and prints the current sum. I then copied a class written by someone else (called createGraph()) to plot a line graph. I'm trying to combine the 2, calling the program ODESolver.java. The second part (createGraph()) uses JFreeChart. I've just tried to call the createGraph() method from the SwingAccumulator part and I get the following error: Exception in thread "AWT-EventQueue-0

Getting values after dragging the points up and down using JFreeChart

扶醉桌前 提交于 2019-12-11 07:30:34
问题 The following code plot the points which can be dragged up an down.But now i want to get the updated values of Y-Axis (Velocity) of every point after dragging and plot again with those updated values. Initially Velocity which is on Y-Axis is set to 4 but after dragging I want to get the updated velocity values as well. import java.awt.*; import java.awt.event.MouseEvent; import java.awt.event.MouseListener; import java.awt.event.MouseMotionListener; import java.awt.geom.Point2D; import java

Data table with legends in JfreeChart/Java

谁说胖子不能爱 提交于 2019-12-11 07:26:50
问题 I am using JFreeChart to generate images. I am trying to create barchart like below. I am able to create it successfully without data table. I tried to get more information from the jfreechar forums and found this post. According to the post , its not supported by JfreeChart. Is it still not supported by jfreechart API ? If yes, can I use any other charting (open source) tool to generate chart with data table ? Thanks alt text http://img153.imageshack.us/img153/4550/jfree.png 回答1: I'm not

How to remove separator line in jfree chart- donut chart

a 夏天 提交于 2019-12-11 07:08:54
问题 I am creating Donut chart using Jfreechart. I want to remove separator line (ie.line between green section and white section)- This line is exceeding the chart part. i need to restrict that to just to chart width. Below is the actual and expected chart: In this added image you can clearly see the extented section break line outside the chart pie.(marked in blue circle). i need to get rid of that extended line , the section break line should not go beyond the actual pie area. Any one help me

Display days in TimeSeriesChart

♀尐吖头ヾ 提交于 2019-12-11 06:57:51
问题 How can I display the names of the days ("Sunday, Monday....") on the time axis, instead of just the date ? 回答1: You can use setDateFormatOverride(), as shown here. Addendum: isn't there a way to change only the top level? ChartPanel has methods related to the zoom state. You should be able to set the date format as desired either by overriding the chartChanged() method or in response to user input, as suggested in this example. 回答2: Yes: DateAxis xAxis = (DateAxis) plot.getDomainAxis();

JFreechart tick units

非 Y 不嫁゛ 提交于 2019-12-11 06:56:54
问题 I am using the following code which i got off the web TickUnits units = new TickUnits(); DecimalFormat df1 = new DecimalFormat("$0"); DecimalFormat df2 = new DecimalFormat("$0.00"); // we can add the units in any order, the TickUnits collection will // sort them... units.add(new NumberTickUnit(100, df1, 0)); units.add(new NumberTickUnit(50, df1, 0)); units.add(new NumberTickUnit(20, df1, 0)); units.add(new NumberTickUnit(10, df1, 0)); units.add(new NumberTickUnit(5, df1, 0)); units.add(new

JFreeChart Horizontal Charts

守給你的承諾、 提交于 2019-12-11 06:56:48
问题 I'm using CombinedDomainXYPlot to plot the charts. I have another requirement where, I need to show the two charts horizontally. Currently i'm having only one chart. what i need is, i need two charts in the first row. like Chart1 Chart2 Code: CombinedDomainXYPlot plot = new CombinedDomainXYPlot(); plot.add(getChart1(), 2); plot.add(getChart2(), 2); It is giving only one chart in the first row. and second chart2 in the another row. Is there any way I can make these two charts into single row?

Drawing blured shadow in JfreeChart?

早过忘川 提交于 2019-12-11 06:39:52
问题 That's is question is in the title of this post, but anyway: I use the JFreeChart to create chart in my app. And one of requirement is a soft blured shadow instead solid, which is presented by default. I know I can add my image instead the default shadow, using setShadowPaint(Paint paint); but this way implies the creating blured image and adding it to the my report. Is there built case to achive needed effect ? Thanks for all. 回答1: There's nothing built-in, but you can use a ConvolveOp to

Unable to Cast the List Values into Comparable Value for JFreeChart

这一生的挚爱 提交于 2019-12-11 06:27:25
问题 I have two classes viz. ExistInsert.java and TryExist.java . The complete code for ExistInsert is given below: package tryexist; import java.util.ArrayList; import java.util.List; import org.exist.xmldb.XQueryService; 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.DefaultCategoryDataset; import org.xmldb.api.DatabaseManager; import org.xmldb.api.base

JFreeChart Java JAR not running on a different machine

ⅰ亾dé卋堺 提交于 2019-12-11 06:03:49
问题 I have created an application using the JFreeChart library for use on another machine. Previously I have developed applications with JFreeChart (using the same libraries) which has worked fine on other machines. The only difference is this machine is running Vista. Please see below for the run-time exception I am getting: The class that cannot be found, however, is located in the highlighted jar in the below image showing my imported libraries for the JAR. I have also established that this