jfreechart

How to use JFreeChart for custom renderer

喜欢而已 提交于 2019-12-11 15:08:30
问题 first of: I am really having a problem with JFreechart and mainly I really believe that this is my fault because I start using the library without fully understanding how it fully function or use second of: these are some helpful resource that helped me : check it out 1 check it out 2 check it out 3 my current state : my problem is in making use of the drawPrimaryLine() in my already build project so I am still having a problem in connecting the dots in my way, not in a sequence way example:

Date Time on x-axis using JFreeChart

末鹿安然 提交于 2019-12-11 14:12:48
问题 I would like to create a graph using data from a database (Oracle). The dataset contains DateTimeStamp values and numeric values The DateTimeStamp values are for intervals of 15 minutes and usually extend for a period greater than one calendar day. The DateTimeStamp values need to be graphed against the X-axis and the data values (numeric) will be graphed against the Y-yxis. The x-axis major tic marks should be the calendar days. I have purchased the enterprise version of JFreeChart but the

JFreeChart timeseries is not refreshing

拥有回忆 提交于 2019-12-11 14:07:25
问题 I have developed a timeseries JFreeChart by using code from this thread. I want to add this to my main panel, which contains four other panels. So I created a method package com.garnet.panel; import java.awt.*; import java.awt.event.*; import java.text.*; import java.text.SimpleDateFormat; import java.util.Calendar; import java.util.GregorianCalendar; import javax.swing.JPanel; import javax.swing.Timer; import org.jfree.chart.ChartFactory; import org.jfree.chart.ChartPanel; import org.jfree

How do I change the background / transparency of a 3dPieChart (JFreeChart API)?

那年仲夏 提交于 2019-12-11 14:02:45
问题 I have declared an 3DPieChart, and I want to change its background / transparency. In this case, by 'background' I mean that white space. Here's the function that implements this chart, if it's helpful somehow. //customize panel for visualising the statistics public void customizeStatisticsPanelWhenButtoninIsPressed() { transactionsCenterFinalPanel.setLayout(new BorderLayout()); //center side of then main panel JPanel statisticsPanelCenter = new JPanel(); statisticsPanelCenter.setBorder

JFreeChart XYSeries as Strings

依然范特西╮ 提交于 2019-12-11 13:18:45
问题 im working with jfreechart and try to make a XYLineChart which is working very well. My problem is, that the y label are double values and i need strings. My Code: DefaultXYDataset result = new DefaultXYDataset(); XYSeries series1 = new XYSeries("Words"); series1.add(0, 0.3); series1.add(1, 0.5); series1.add(2, 0.6); series1.add(3, 0.3); series1.add(4, 0.2); series1.add(5, 1); result.addSeries(getTitle(), series1.toArray()); I want something like: XYSeries series1 = new XYSeries("Words");

JFree chart selective point thickness

爱⌒轻易说出口 提交于 2019-12-11 13:17:09
问题 I am using jfree chart for graphically displaying metrics.Now I am working on a solution which randomizes graph elements in an XY line chart so that the graph looks smoother.The problem is I dont want the random elements to get the same thickness as the real values,in fact I dont wan't any thickness associated with them.Is there a way to selectively specify point thickness.I am currently using XYLineAndShapeRenderer to render the point thickness. 回答1: You can override getItemShapeVisible()

Custom JFreeChart title font is far too small

你说的曾经没有我的故事 提交于 2019-12-11 13:13:43
问题 I am trying to set a custom Font for the title in JFreeChart with the code: InputStream is = new FileInputStream("test.ttf"); java.awt.Font customFont = java.awt.Font.createFont(java.awt.Font.TRUETYPE_FONT, is); customFont.deriveFont(24f); chart.getTitle().setFont(customFont); Ends up with a very small font title(almost invisible): Any ideas how to add a custom Font to JFreeChart title? public class Function2DDemo1 extends ApplicationFrame { public Function2DDemo1(String title) { super(title)

Let users edit series in JFreeChart XY plots

僤鯓⒐⒋嵵緔 提交于 2019-12-11 12:57:01
问题 I'm using JFreeChart to make some graphs in a Java application. I'm trying to figure out how to let the user edit the series paint/stroke. In the Chart Properties window there's a spot for this, but it just says "No editor implemented". Is there a way through the API to provide JFreeChart with an editor for these properties, or do I have to implement one totally separately from the Chart Properties editing window? 回答1: Support for this is described as "incomplete" in org.jfree.chart.editor.

Java Swing Clickable JFree Charts, clicked each bar chart or pie chart to open new frame or new charts

╄→гoц情女王★ 提交于 2019-12-11 12:17:26
问题 I am making a desktop application based on java swing for my final year project. I have created different types of charts which is connected from my database. Now would like to make this dashboard more interactive and when click on the each bar i want to drill down further more to open another chart or maybe a frame or table for detailed information. Could anyone please help me how can i do to click a bar on the chart which opens a new frame or any new window or chart ? Below is my screenshot

JFreeChart background color setting is not respected

不羁岁月 提交于 2019-12-11 11:33:27
问题 In JFreeChart I used to generate the chart with CategoryDataset and with createLineChart . This looked like this: Due to some axis changes I had to switch to XYLineAndShapeRenderer , and now the chart looks like this: Please notice the gray area around the chart. I want to change it to transparent or at least white just like it was on the old one above. I tried doing it by: chart.getPlot().setBackgroundPaint(Color.WHITE); But it does not work. How can I change that background to white, and