jfreechart

Dynamic tool tip generator - Jfreechart

亡梦爱人 提交于 2019-12-19 10:42:35
问题 I am generating a dynamic chart (XYLineChart) using jFreeChart and I have a field which is not included in the dataset. The field is generated dynamically. I want to include that in my tooltip. Is there any possibility I can do it ? Here is the flow of the program: Create Chart using an empty dataset. Set chartPanel. (I guess here is the place where we define the TooltipGenerator). Receive dynamic data from socket. Add data to the dataset. ( Here is the only place where I have the data which

How to display a JFreeChart in a NetBeans project

走远了吗. 提交于 2019-12-19 06:46:35
问题 This is similar to a question I asked yesterday but more specific to the problem. What is the correct method to add a JFreeChart to a NetBeans project which already contains various widgets? My updateChart() hides the entire JFrame. I'd like to add the JFreeChart to the JFrame. public class MyClass extends javax.swing.JFrame implements TableModelListener { public MyClass() { initComponents(); ... updateChart(); } private void updateChart() { XYDataset dataset = createXYdataset(); JFreeChart

How to display a JFreeChart in a NetBeans project

夙愿已清 提交于 2019-12-19 06:46:12
问题 This is similar to a question I asked yesterday but more specific to the problem. What is the correct method to add a JFreeChart to a NetBeans project which already contains various widgets? My updateChart() hides the entire JFrame. I'd like to add the JFreeChart to the JFrame. public class MyClass extends javax.swing.JFrame implements TableModelListener { public MyClass() { initComponents(); ... updateChart(); } private void updateChart() { XYDataset dataset = createXYdataset(); JFreeChart

JFreeChart - change SeriesStroke of chart lines from solid to dashed in one line

旧城冷巷雨未停 提交于 2019-12-19 05:53:07
问题 The answer accepted here (JFreechart(Java) - How to draw lines that is partially dashed lines and partially solid lines?) helped me start down the path of changing my seriesstroke lines on my chart. After stepping through my code and watching the changes, I see that my seriesstroke does in fact change to "dashedStroke" when it is supposed to (after a certain date "dashedAfter"), but when the chart is rendered the entire series line is dashed. How can I get a series line to be drawn solid at

JfreeChart: Scroll XYBarChart Horizontally - (chart translation and navigation)

我怕爱的太早我们不能终老 提交于 2019-12-19 04:07:28
问题 I am trying to scroll my XYBarChart horizontally, I am following one of the JfreeChart's Demo "TranslateDemo1.java" in which the source code you can find here: http://code.google.com/p/cori-chenxx/source/browse/aliper/trunk/aliper-core/src/test/java/com/alibaba/aliper/TranslateDemo1.java?spec=svn148&r=148 The source code works fine for a "TimeSeriesChart". However I tried with "XYBarChart" and WHEN I SLIDE THE BAR the behavior is not the same. Just to be clear I replaced the line #157 with

Why do I have to call GraphicsEnvorinment.registerFont() even if I my Font were created from file?

三世轮回 提交于 2019-12-19 04:05:30
问题 I'm developing a web application which use JFreeChart to render chart. However, when server dose not have any Chinese font installed, JFreeChart dose not display Chinese character even if I have set the font. Then I write a small testing code and find out that add this line of code before drawing the chart can solve the problem. GraphicsEnvironment.getLocalGraphicsEnvironment().registerFont(font); So my questions are - Why do I have to register font into JVM even if I create my font from File

Make a custom ring chart in JFreeChart

时间秒杀一切 提交于 2019-12-18 16:52:50
问题 I am currently using itext-pdf to generate PDFs. In addition to that, I am also using JFreeChart to create charts on it. I have created a donut chart with a explosion effect and it looks like this. However I want to create a donut chart that looks more like this. I want certain pieces to stand out but not completely get detached from the donut chart. I would highly appreciate inputs on how to achieve this. Here is my current code: import java.awt.Color; import java.awt.Graphics2D; import java

Java jfreechart stick scatterplot?

荒凉一梦 提交于 2019-12-18 09:39:42
问题 I am using jfreechart at the moment and want to generate a kind of scatterplot. I have 100000s of datapoints. Now I want to change each 2D point into a (3D-) stick by usind the points z-value as the stick height. The whole plot should be zoomable! Thats it. Is this possible in jfreechart? How can I do this without bucking or delay within the zooming action? Thanks for any suggestions! Achim 回答1: For ~10 6 data points, FastScatterPlot is a good choice. For larger numbers, you'll have to test.

How to use writeChartAsPNG in JSP?

Deadly 提交于 2019-12-18 09:39:30
问题 Can anyone explain how to use writeChartAsPNG in JSP? 回答1: please check this link out.Its good. How to use writeChartAsPNG They have used ChartUtilities.writeChartAsPNG() methods in the example given over there. 回答2: <img src="/path/to/chart" /> and have this path handled by a servlet, where: ChartUtilities.writeChartAsPng(response.getOutputStream(), ....); 回答3: Not totally related, but you might also consider Cewolf (http://cewolf.sourceforge.net/new/), which provides a JSP tag-library on

Dynamic Chart using JFreeChart

前提是你 提交于 2019-12-18 09:39:30
问题 I have an array of 100,000 samples all of double type. I want to display or plot this array so that I get a moving chart/ plot (dynamic) instead of displaying it at once. Can anyone help me out. In plot ee[] and y[] is obtained after some processing. private byte[] FileR(String filename) { byte[] data = null; AudioInputStream ais; try { File fileIn = new File(filename); if (fileIn.exists()) { ais = AudioSystem.getAudioInputStream(fileIn); data = new byte[ais.available()]; ais.read(data); } }