jfreechart

Setting label and value of the chart

一世执手 提交于 2019-12-17 07:54:47
问题 I am creating pie charts using JFreeChart , and I want to set the value and the label seperately like in iReport . In other words, I want the chart to show different results on the pie than in the legend. Is there any way that I can achieve this? 回答1: The MessageFormat ArgumentIndex values correspond to the series name , domain and range . You can set a different generator for each series or for all series in the base. PiePlot plot = (PiePlot) chart.getPlot(); plot.setLabelGenerator(new

Jfree chart Find Subplot

爱⌒轻易说出口 提交于 2019-12-17 07:52:12
问题 This may sound very basic as a question, but i am stuck in JFreechart use. Let me lay out my problem : I have a CombinedDomainXYPlot to which I add my subplots as and when required. I have used my custom JPopup menu and have included a menu item that is intended to provide user the facility to delete a particular subplot I am assuming that one can find a subplot using findSubplot method of the main plot. I am able to get mouse positions but not able to do anything with PlotRenderingInfo that

Jfree chart Find Subplot

自闭症网瘾萝莉.ら 提交于 2019-12-17 07:52:09
问题 This may sound very basic as a question, but i am stuck in JFreechart use. Let me lay out my problem : I have a CombinedDomainXYPlot to which I add my subplots as and when required. I have used my custom JPopup menu and have included a menu item that is intended to provide user the facility to delete a particular subplot I am assuming that one can find a subplot using findSubplot method of the main plot. I am able to get mouse positions but not able to do anything with PlotRenderingInfo that

jfreechart customize piechart to show absolute values and percentages

本小妞迷上赌 提交于 2019-12-17 07:49:16
问题 How can this compilable minimal code snippet example, which uses JFreeChart as plotting API, adapted in order to show both absoulte values AND percentages ? I couldn't extract this information neither from any code snippet on the internet nor from the JFreechart manual itself. The code snippet produces a pie chart showing only percentages. The absolute values in my case also matter, so i need to display them right under the percentages. Here is the code: (Note it lacks the imports) public

jfreechart customize piechart to show absolute values and percentages

不打扰是莪最后的温柔 提交于 2019-12-17 07:48:12
问题 How can this compilable minimal code snippet example, which uses JFreeChart as plotting API, adapted in order to show both absoulte values AND percentages ? I couldn't extract this information neither from any code snippet on the internet nor from the JFreechart manual itself. The code snippet produces a pie chart showing only percentages. The absolute values in my case also matter, so i need to display them right under the percentages. Here is the code: (Note it lacks the imports) public

Creating a time series with jfreechart

三世轮回 提交于 2019-12-17 06:55:09
问题 Right now I want to create a time series graph in jfreechart. However the examples online only have charts using classes like "Day", "Month", and so on. So I want to essentially create a XY line chart. However the problem I'm having is that Jfreechart doesn't connect the data points in the order in which they were added. Also it doesn't connect the points in the order of the "X Values". So basically I get a "Z" in my jfreechart. So my question is, is there a way to change the setting for the

Populate JFreechart TimeSeriesCollection from Mysql DB?

此生再无相见时 提交于 2019-12-17 06:54:43
问题 I'm trying to make a chart in my application that returns me the temperature of days during the months. This chart is a JFreechart TimeSeriesCollection, and I am unable to have the graph read correct data from the database. It shows some of the values, but not all of them, and does not show the correct time. To fix this, I tried to implement the graph as posted here, but still could not solve my problem, even having gone to see this question, as people suggested public class NewClass extends

How to set different colors to the bars in stacked bar chart in ireport?

可紊 提交于 2019-12-17 06:49:12
问题 I need to set a unique color to each bar in the stacked bar chart. Whatever the color I see in one bar it shouldn't be repeated in any other bar or any other stack. For example: I have 5 bars in the report. Each bar has 3 different stacks. I want to apply a red related colors to the first bar and its stacks. Second bar should have blue related colors. etc.. It is showed in the attached image. The image shows a very basic requirement what we want. Just created using a normal ms paint. Stacked

Java - how to receive point coordinates after mouse button release (JFreeChart)

只谈情不闲聊 提交于 2019-12-17 03:47:32
问题 I wrote a simple parabola plot using JFreeChart. I get graphic point coordinates, when mouse button pressed and i also want to get graphic point coordinates, when mouse button released. But chartMouseMoved don't work while mouse button pressing. How can I solve my problem and get graphic coordinates after mouse button releasing? This is my code: package parabolademo; import java.awt.event.MouseEvent; import java.awt.event.MouseListener; import java.awt.geom.Point2D; import java.awt.geom

Java - how to receive point coordinates after mouse button release (JFreeChart)

心不动则不痛 提交于 2019-12-17 03:47:25
问题 I wrote a simple parabola plot using JFreeChart. I get graphic point coordinates, when mouse button pressed and i also want to get graphic point coordinates, when mouse button released. But chartMouseMoved don't work while mouse button pressing. How can I solve my problem and get graphic coordinates after mouse button releasing? This is my code: package parabolademo; import java.awt.event.MouseEvent; import java.awt.event.MouseListener; import java.awt.geom.Point2D; import java.awt.geom