jfreechart

How to generate a bar chart in JFreeChart with default components' size?

怎甘沉沦 提交于 2019-12-12 01:32:46
问题 I am trying to generate one bar chart but it's forcing me to control width and height by calculating size of labels from domain axis and causing problems when they are too large (the start of the columns' values get in the middle of the chart). Do you have any suggestion ? Thank you. 回答1: You can change the renderer on the chart by creating a custom painter that repaints the graphics; the Painter code doesn't seem to display correctly here. I used a widthMultiplier to control the size of my

JFreeChart - how to reverse axis order

微笑、不失礼 提交于 2019-12-12 01:29:34
问题 I'm creating XYPlot and I need to reverse the order on y-Axis (that is, I need lower numbers to be higher on the axis). I would appreciate any hints how to do that. 回答1: I had the same problem as you. I found this: ChartPanel.getChart().getXYPlot().getRangeAxis().setInverted(boolean) 回答2: to reverse the Y-axis ... you can use ChartPanel.getChart().getXYPlot().getDomainAxis().setInverted(boolean) Source: Reverse X-axis numeric labels in JFreeChart 来源: https://stackoverflow.com/questions

JFreeChart : Dynamically change the Series list

女生的网名这么多〃 提交于 2019-12-12 01:08:30
问题 Please, how can I update the Series of the JfreeChart. My Jfreechart works like this, I have a set of CheckBox, when I select the checkboxes from which I want to retrieve informations I would like to see them on the series zone of my graph. The Series list are changing but there are not showing. How can do it inside the code ? thanks Edit This is how my code is written public DrawChart(JPanel panel){ this.refresh = new RefreshGraph(); this.displayChart (panel); } private void displayChart

JFreeChart using numeric query ORACLE

有些话、适合烂在心里 提交于 2019-12-12 00:48:04
问题 Good Evening! I have a Table named SWIMMER, and need to find(in the NUMERIC field named TIME)the number of ocorrence of some values in a given interval(I am using Oracle10g). I need to show something like that: 23 higher or equal TIME Shows HorizontalBar with value 300 22,3 higher or equal TIME minor or equal 23 Shows HorizontalBar with value 140 21,6 higher or equal TIME minor or equal 22,3 Shows HorizontalBar with value 15 20,9 higher or equal TIME minor or equal 21,6 Shows HorizontalBar

JFree TimeSeries Chart Spanning Nanoseconds

倾然丶 夕夏残阳落幕 提交于 2019-12-12 00:42:34
问题 I have to plot TimeSeries chart where the data is coming in nanoseconds. But, In my current implementation our date axis range is in Milliseconds. So how can I change the Date Axis range from milliseconds to nanoseconds. Thanks. :) 回答1: This is the answer I gave on your post in the JFreeChart forum: The DateAxis won't give you precision below milliseconds, because under the covers it is working with java.util.Date (which provides only millisecond precision). I don't think there would be any

Enabling/Disabling drawing of a JFreeChart

帅比萌擦擦* 提交于 2019-12-11 23:43:06
问题 I have a chart created as shown below, and I am adding values to the TimeSeries (in a different location in my program). The ChartPanel is actually contained within a JTabbedPane, and I would like to not redraw the chart unless it's tab is being displayed. Is there any way for me to signal that rendering should not occur when new data comes into the TimeSeries unless that tab is the one currently being shown? I'm guessing there is some call that signals the data has been updated and a new

How show less values in the X-axis in line chart (JFreechart)?

孤人 提交于 2019-12-11 23:10:12
问题 How can I do in order to show less values ​​on the X axis, to get the data organized? However I want the values ​​are all shown. One idea I had was to use the zoom so you can see all the records, but do not know if it was a good idea, or rather do not even know it. As you can see in the picture my idea is that data more legible, in order to realize the best of everything. Does anyone can help me please? //Code with result from query and chart create String query="select (CONCAT(`date`, ' ',

How CombinedDomainXYPlot and CombinedRangeXYPlot share Axis information with subplots

Deadly 提交于 2019-12-11 23:07:35
问题 Related to: How can I share DomainAxis/RangeAxis across subplots without drawing them on each plot? Note - I originally wrote this up as a question, and then realize my mistake, so I decided to just share the knowledge since I already had this all typed out. In JFreeChart, there are two plot types that share an axis range and draw only one axis, while sharing that information with their subplots. These are CombinedDomainXYPlot and CombinedRangeXYPlot . I will focus on CombinedDomainXyPlot ,

how to display image in html using jsp call?

纵饮孤独 提交于 2019-12-11 21:27:09
问题 I m trying to display an image in html page calling a jsp page in <img /> tag as follows. I have created dynamic web project, have added index.html under webcontent folder, timeseries.jsp under webcontent → jsp folder. When I run the project on server, adding apache tomcat 6.0.18, its synchronised, but when I enter url localhost:8080/jfree it displays only hello doctor and image icon on the page but no image there. My HTML is, <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"

JFreeChart Bar Chart dataset from database

最后都变了- 提交于 2019-12-11 21:18:20
问题 My goal is to generate this Bar Chart using JFreeChart. I am trying to obtain JFreeChart data from database using MVC; Bean, Data Access Object (DAO) and Servlet. I have problem in doing code at Servlet. Below codes are what I have so far. Help will be appeciate and thank you in advance! :) Database id | revenue R1 | 999 M3 | 832 G7 | 318 Bean public class Revenue { private String id; private Integer revenue; //getters and setters } DAO public ArrayList<Revenue> getAllRevenueList() { try { /