XAxis « Axis « JFreeChart Q&A





1. Setting the amount of tickmarks on the x-axis    jfree.org

Hi, I have some XY Data and want to display three different Area Charts. One for a week, one for a month and one for a year. The first two are working fine, giving me a range of 7 days and 30/31 (appropriately) days respectively. Now the yearly one is causing some problems: I am using setRange(Date startDate, Date endDate) and ...

2. Dynamic charting with fixed x-Axis    jfree.org

Dynamic charting with fixed x-Axis by ns_gds Tue Nov 08, 2011 6:40 pm Hi everyone, I have written a simple chart that uses the XYPlot and XYSeries to plot a simple line and I am dynamically adding values to it which correctly causes it to redraw. But my problem is that everytime a new value is added, not only the ...

3. xaxis label    jfree.org

7. x-axis labels    jfree.org

8. Passing X-axis parameter    jfree.org

9. jfreechart x-axis    jfree.org





11. Write only some numbers on X-Axis    jfree.org

12. Timeseries, Just to show the x-axis point which is existing?    jfree.org

hello, I am now working with TimeSeries Line chart, but the time range spaned too long, and many days have no values, so i just want to make the chart to show the day with records , how can i set the chart not to show the day without records. tks for your help!

13. Problems with labels in X-axis    jfree.org

Hi, I'm doing a XYPlot graph i'm having a strange behavior when look the result of the generation of graph. In my X-axis i have lables repeated. I.E.: I have the following Date values: 18-01-2006 19-01-2006 20-01-2006 21-01-2006 22-01-2006 When I see the image of the graph I llok in the X-Axis 18-01-2006 18-01-2006 19-01-2006 19-01-2006 20-01-2006 20-01-2006 21-01-2006 21-01-2006 22-01-2006 ...

14. Image on X-Axis    jfree.org

15. issue with the X-axis representation of the chart..    jfree.org

issue with the X-axis representation of the chart.. by Sunder1 Mon Feb 27, 2006 10:33 pm I've the following test program with the test data in it. Its supposed to generate the chart with 'Day' in X-Axis and TransactionCount in Y-Axis. I've hardcoded the values of Day and transaction counts here in this test program. But actually the data will ...

16. Log x-axis labels 1, 10, 100 not 1, 2, 3?!?    jfree.org

I'd like to get the log x-axis labels to be 1, 10, 100, 1e4...not 1, 2, 3, 4, 5 because it's a log plot & the labels are overlapping & too close together by default. I thought I had found the right page in the manual and correctly setup a "user defined" set of tick marks but the code below doesn't ...





17. jfreechart sorting my x-axis numbers -can it be stopped?    jfree.org

hi, I want to show multiple xy lines in one chart, and the x axis i am trying to hack in time values by inserting doubles. since xyseries only take numbers i put in a 6.50 instead of 6:30am. it works for < 12 hours, trouble is: say towards the end of my x-axis my time hits midnight (24) and continues ...

18. "Jump" in xAxis    jfree.org

I've found that sometimes the xAxis get draw once, very crowded (lots of tick marks), but if you click on the graph (or force it to redraw), it gets uncrowded (if only part of the axis is redrawn, this looks particularly ugly). It seems to depend only on the range of values in the xAxis, not on the size of the ...

19. How to Change x-axis value in timeline chart    jfree.org

hi, Am generating timeline chart for previous 4 weeks from the date which i has specified. My problem is whenever am generating a chart it took some default values like if starting month is may then last four weeks may 5,12,19,26. suppose if it is june 4,11,18,25. Ultimately i want to start with some particular day, how to change starting value ...

20. x-axis labels    jfree.org

I am drawing a bar chart that has category labels that can be quite long (in the order of 40-50 characters). I have rotated them to fit as much as possible into the space, but I accept some of the text will be lost and replaced with '...'. My question is regarding where this chop occurs. For example I have a ...

22. HELP - TimeChart with gaps in X-Axis    jfree.org

Hi everyone. I need to generate a chart with non-linear spaces in the x-axis. Example: i have the follow dates: 2006-01-01, 2006-01-08, 2006-01-21, and so on. When I use jfreechart, even if i dont submit the other dates, they appear in the chart. What can i do to avoid it? This is what happen: 2006-01-01 2006-01-02 ... 2006-01-07 2006-01-08 ... 2006-01-21 ...

23. Hot to disable x-axis labels    jfree.org

Hi i am using CEWOLF and i want to disable the X-axis labels. I know the code how to write in jfree. CategoryPlot plot = (CategoryPlot) chart.getPlot(); CategoryAxis axis = plot.getDomainAxis(); axis.setTickLabelsVisible(false); But i am not getting where the above code i have to insert in cewolf program. can any body guide me plz. I am pasting my cewolf code below. ...

24. large x-axis cordinate name    jfree.org

Hi, In my present code i am generating png image of Bar graph , i have following problem:: 1) At x-axis the name of the cordinate is little big for example "www.google.com" e.t.c. so this are not fully viewable , so can anybody suggest how should i make it visible or can we tilt it or make it vertical so that ...

25. How to set X-Axis Labels Series    jfree.org

hi, How to set the X-Axis Labels, I have Horizontal Chart , for this I have to set the fixed X-Axis labels starting from 0 - 20 - 40 - 60 - 80 - 100, but from my chart the X-Axis labels are displaying like 0 - 10 - 20 - 30 - ......- 100. plese Can anyone give me the ...

26. Tick marks along the X-Axis    jfree.org

Hi All, I am trying to display tick marks along the X-Axis. ie if I have 1,2,3 along the X-axis, I need a dot or a tiny line on top of 1,2,3 that clearly demarcates the category. [In fact, I am looking for a line that would be say 1 cm below x-axis and extends upto 1 cm above x-axis]. I ...

28. How to set the label tick on the X-Axis label?    jfree.org

hi, Can any one please give me the suggestion on the following? i have 4 or 5 X-Axis labels for the line, the line and labels are getting displayed well but label tick on the X-Axis is not getting. hence we could not identify which label is corresponding to the line's point. regards, Sumant

29. Is it possible to create labels for intervals on X-axis?    jfree.org

I found this (posted by David Gilbert) in one of the previous posts, but I don't see this attribute in documentation? Any ideas? Anyone, please? "In the current release, the tick marks are always drawn at the start of each time period. In the next release (0.9.7), a new attribute 'tickMarksAtStartOfUnit' will control whether the marks appear at the start or ...

30. TimeSeries chart adds/subt months along X-axis automatically    jfree.org

Hi all, I am using TimeSeries charts and my current chart has data for 4 months - Jan , Feb , Mar, Apr . When I increase the width of the chart, the chart automatically spreads out and becomes this way .. Jan , Jan , Feb , Feb, Mar, Mar, Apr, Apr. I did not have this problem when I ...

31. Histogram -- set x-axis numbers    jfree.org

32. Draw text/annotaion on the x-axis    jfree.org

34. X-axis Labels are not coming properly    jfree.org

Hi All, I am using JFreeChart to generate line charts and i have around 24 data points and the X-Axis lables are like 200601,200602 ....etc. Since the X-Axis labels are of longer lengths i get "..." for the X-Axis labels. If i have 8 data points i get the X-axis lables properly. How to have my X-Axis labels to be displayed ...

35. length of X-axis in pixels    jfree.org

36. X-Axis Labeling (non-linear)    jfree.org

Hi all. I'm new to JFreeChart and I've been able to use it to create a ScatterPlot from an XYSeriesCollection. I have labeled both axes but I'm kind of stuck on how to label specific sections of the X-Axis. For instance, if I have 23 items, each of which span a different portion of the scatter plot, is it possible to ...

37. X-Axis Values to be treated as numeric    jfree.org

I have a simple Line graph. In which there are two domain values e.g. 28 and 38, these are appearing equally spaced as if they were domain items. I would like them to domain axis to be treated as a numeric range say 0 - 100 and it should show 28 and 38 in the appropriate place. How can I achieve ...

38. CategoryDataSet overlapping labels on x-axis    jfree.org

Hello, I am creating a chart as: JFreeChart chart = ChartFactory.createBarChart(title, keyDesc, valDesc, dataSet, PlotOrientation.VERTICAL, false, true, true); The dataSet is an implementation of CategoryDataSet, since there are too many points on the x-axis the labels overlap and nothing is readable. I tried to resolve this by blanking out every x-th key but this causes duplicate keys and the chart does ...

40. X-axis overlap issue    jfree.org

41. X-Axis problem    jfree.org

42. Problems duplicate x-axis labels with TimeSeries Month.class    jfree.org

Problems duplicate x-axis labels with TimeSeries Month.class by lion_b1 Fri Apr 13, 2007 2:51 pm Hello, when I create a chart with TimeSeries and Moth.class the month label names from the x-axis will be repeated. If I have January, February, March with data and the x-axis renderes the lables: January January February March March Tested with JFreeChart V1.0.5 Is there ...

43. why jfreechart always show double value on X-axis    jfree.org

Hi By the same way I try to set String values and not Integer or Double. I'm looking since one hour... I think it's easy, but I can't find it. I explain : my YAxis goes from 0 to 12 and i want 0 to be replaced by "John", 1 by "Robert"... any ideas ? Thank you Mehdi

44. Labels On X-Axis    jfree.org

45. Make values on X-axis clickable    jfree.org

47. Get value between ticks on X-axis    jfree.org

48. Timestamp items on X-Axis: Does JFreeChart support this?    jfree.org

Hi all, I've asked this question but answered yet. This is an other try. Hopefully this time someone can help! Any help is appreaciated! The class DateAxis supports dates, but unfortunately does not care about the time of the corresponding date. Here is my scenario: I need to display DateTime items on one axis. If I use a DateAxis, then Exceptions ...

49. Customizing X-Axis    jfree.org

50. hello, I get a x-axis value Um...Using Chartmouseevent....    jfree.org

Using Chartmouseevent, I can get a (x,y) value source code is following ------------------------------------------------------- public void chartMouseClicked(ChartMouseEvent event) { // TODO Auto-generated method stub System.out.println(event.getEntity().getToolTipText()); } ---------------------------------------------------------- Result is following ---------------------------------------------------------- HDL 2B: (237, 102) ---------------------------------------------------------- HDL 2B is label.This is not important. I get a x value:237 I don't know this method How method?

51. Two labels for X-Axis    jfree.org

Please consider the last reply as incomplete .. pressed the submit accidently .. It seems there is some problem in uploading the image. I will describe my problem here. I need to show labels on the X-axis as follows : 65 67 69 71 73 55 60 65 70 75 The labels on the graph appear as above ... as seen ...

52. How to add duplicate samples on x-axis?    jfree.org

How to add duplicate samples on x-axis? by vikasyadav Fri Aug 03, 2007 6:43 am In my chart some samples on x-axis are duplicate (e.g Category 1 Category 1 Category 2 Category 3), but when I try to add it, internally it override duplicate samples, how to avoid it? Please help. Sample code: Code: Select all package demo; import java.awt.*; ...

53. How to make all the values of x-axis visible    jfree.org

Hi, I have created a TimeSeries Chart Day wise and the Chart has displayed and the Values are seen for all the days but the labels on the x-axis are seen for every 7 days..i.e first label is 04/01/2007 and second label is 11/01/2007... What I have to do to make all the labels visible i.e first label shoul be 01/01/2007 ...

54. Tick Labels: need x-axis offset after rotation    jfree.org

solution by stefan21 Fri Nov 02, 2007 9:41 am I have found a solution for my problem by creating a CategoryLabelPosition from scratch. I use TextAnchor.CENTER_LEFT for the Bottm Axis as rotation point. Now my tick labels are rotated and are placed at the correct position at the axis. Code: Select all double angle = Math.PI/3; // create special categoryLabelposition ...

58. An integer x-axis how to ...    jfree.org

An integer x-axis how to ... by cLaSic Tue Dec 11, 2007 12:19 am hello, i'm a newbie on jfreechart and i'm trying to make a dynamic chart ... here is my code and my question is how can i make the x-axis vals like 1 2 3 4 .... Any hints are welcome Code: Select all public class Charge1 ...

60. time Series x-axis    jfree.org

Hello, i want to show two time series (monthly values of this year compared to monthly values of last year) in one chart with an axis showing only the month. At the moment i only have a workaround (changing the actual year to the previous one). But the consequence is a wrong date in the ItemLabel where i want to show ...

61. X-axis issue    jfree.org

62. how to fix the x-axis values ?    jfree.org

how to fix the x-axis values ? by Sir_Nano Sat Jan 19, 2008 4:21 pm well, i have this code for create a multiple axis chart...but i want fix de domain axis values to 1,2,3...20. how I can do this? thanks! Code: Select all private JFreeChart createChart() { ...

63. x-axis tick label fromatting    jfree.org

64. Normal Distribution and X-Axis tick marks    jfree.org

I have a normal distribution graph that has a mean and three standard deviations up and three standard deviations down. I want the X-Axis to only show those seven values and to draw grid lines at those values. Is there a way to do that? I want the tick marks to show: -2.5, -0.5, 1.5, 3.5, 5.5, 7.5 and 9.5 but ...

65. Can X-axis label clicks be detected?    jfree.org

I have a scenario in which I would like to implement different behaviors for a barchart depending on whether I click on a bar, or on the corresponding label. I have started going through the documentation, but so far have not found the answer. I am wondering if anyone has knowledge of this. Thank you.

66. High-Low-Open-Close chart with x-Axis as Number    jfree.org

Hi The current DefaultHighLowDataSet or DefaultOHLCDataset only uses Date as X-Axis. My requiremnt is to plot a high-low-open-close chart with number as X-Axis. Is there a class that extends OHLCDataset using Number as X-Axis ? If not, what is the best way to achieve that ? Thanks for your help ! David

67. x-Axis subdivision    jfree.org

Hi I will try to explain my problem. i hope you understand: i create a chart using version 0.9.8, where the x-axis is set by setRange(start, end). The range is computed automatically. Start and end are Date-Values (Month/Year-Pair). Depending on start and end i see 3 or more dotted lines, as shown here (the numbers are the month) |______|______|______| |______|______|______| 01____04_____07_____10 ...

68. Strings on the x-Axis    jfree.org

69. customize the x-axis lables    jfree.org

can u tell me how to customize the x axis lables. I want to display the labels on x axis according to the user selection. i am using cetegory plot. i am displaying date on x axis. i want to plot the graph with months on x axis. the jfree takes all the months by default. now i want to display ...

70. How to set up X-axis    jfree.org

71. How to have Fixed X-axis values    jfree.org

72. X-Axis and particular values    jfree.org

Hi there, ive looking in this forum, for a similary solution for my outstanding problem, but it fails. Ive some interactive tests on my online-thesis-page, where can be seen some performance-tests on databases. So, every tests have multiple testmarks, which can having only(!) values 2,4,8,16 on X-Axis. When testmarks only exists for 2 and 16, the chart will be display x-values ...

73. personalize X-Axis    jfree.org

Hi all, I have a big problem with the X-Axis. iIm building a chart using the class TimeSeries with this values: ('01/01/03' , 23.4) ('05/01/03' , 4) ('17/04/05' , 44.1) ('20/05/06' , 55.2) ('27/06/08' , 2) ('28/06/08' , 31) ('30/06/08' , 12.4) Well, when my program started, i saw that JfreeChart set values on X-Axis in automatic and show it in ...

74. Having an x-axis in the middle to show negative values- how?    jfree.org

Hello all. I'm showing multiple axes on my graphs and everything is working well, however, I'm having a bit of trouble getting it to display negative y-values. I've searched the forums and got a post from 2003 where apparently the y-axis's zero could be only put on the bottom and top which would mean only either negative or positive values, but ...

75. Value vetically aligned on X-axis    jfree.org

77. How to selectively show points label on the x-axis    jfree.org

Hi, I am currently using CategoryAxis for my x-axis. As i have 1000 point on my x-axis with label 10000 to 11000, how to i make my chart show the label every 5 point i.e. 10000, 10005, 10010, ... 10990, 10995, 11000 on the x-axis? This will make the display on the x-axis less cluttered and able to see the values, ...

78. How to create angle(45) x-axis value of x-y series chart?    jfree.org

Hi, I have to create a XY series chart. In this chart X axis value is date.So i have used this following code: ValueAxis timeAxis = new DateAxis(""); timeAxis.setVerticalTickLabels(true); NumberAxis valueAxis = new NumberAxis(""); valueAxis.setStandardTickUnits(NumberAxis.createIntegerTickUnits()); XYPlot plot = new XYPlot(xyDataset, timeAxis, valueAxis, null); DateAxis axis = (DateAxis) plot.getDomainAxis(); axis.setDateFormatOverride(new SimpleDateFormat("dd-MM-yyyy")); But i want to show the date value in X axis ...

79. How to define exact lowest and highest x-axis value    jfree.org

Whenever I create chart it automaticly defines lower and upper bound for x-axis. I have tryied using: axis.setMaximumDate(new Date(2009-1900,3-1,4)); axis.setMinimumDate(new Date(1500-1900,3-1,4)); which work OK if used separately but when used together only one max/min value is taken into account. I have also tried using all of the bellow functions but nothing works when used simultaniously: //axis.setsetRange(new Date(1500-1900,3-1,4).getTime(), new Date(2009-1900,3-1,4).getTime()); //axis.setFixedDimension(new Date(2009-1900,3-1,4).getTime()-new ...

80. How to get x-axis value?    jfree.org

Hi, I have drawn a XY timeline chart.Here x axis holds date and y axis holds number. I can get y axis value in a certain point using:--- double temp = getPlot().getDataset().getYValue(row, item); But when i used getPlot().getDataset().getXValue(row, item); it gives double value but at that point i have a date value. How can i retrieve x axis value in certain ...

81. How can I have x-axis values only be integers in    jfree.org

Hi, I have created an xychart and am only inputting integers for the x-axis values (i.e. 1,2,3,4,5). However, depending on the size of the dataset graphed and also when I zoom into the graph, decimals show up (i.e. 1, 1.5, 2, 2.5, 3, 3.5, etc). Does anyone know how I can fix this? I am using JfreeChart 1.0.9 Thanks for any ...

82. Remove series value from x-axis    jfree.org

Following is the part of Line chart: // create the dataset... final DefaultCategoryDataset dataset = new DefaultCategoryDataset(); dataset.addValue(15.0, series1, "type1"); dataset.addValue(4.0, series1, "type2"); dataset.addValue(3.0, series1, type3); dataset.addValue(5.0, series1, type4); return dataset; .......................... After drawing Line chart, values, type1, type2,type3, type4 are shown on x-axis How can I remove these values from x-axis. Thanks in advance Ranjan Yengkhom

83. How do I autoscale the X-Axis so that the values are visible    jfree.org

I have problem finding this solution on the net and hopefully someone here might be able to help me. Basically the values in Y-Axis has range from 0 - 1000000 and JFreeChart knows to autorange it and make the values visible. However for X-Axis the values ranges from 0-1000 and JFreeChart does not to autoscale it and the numbers from 0-1000 ...

84. Changing x-axis values interpretation    jfree.org

When I use data in the form of seconds as integers 50000, 50001, 50002 for the time axis in a time series plot the x-axis labels show up as 19:00:50.000, 19:00:50.001... Is there a way to change the default interpretation of x-axis data so that it will properly divide the number by 60 etc so that it will show up as ...

85. How to provide x-axis value to the url generator    jfree.org

How to provide x-axis value to the url generator by aayush Wed Sep 02, 2009 12:21 pm Hi, I am new to jfreechart. I have xy graph. I want to click a point so that pie chart will be opened. When clicking a point I want to send the value of x-axis to url generator(which is used to open pie ...

86. Change the labels of the x-axis?    jfree.org

89. SegmentedTimeline.addException results in X-axis overlap    jfree.org

Re: SegmentedTimeline.addException results in X-axis overlap by skunk Tue Dec 01, 2009 2:41 pm The tick drawing routines do not take excluded/exception segments into account. I use the following subclass as a workaround in my code. It simply iterates over the list of ticks returned and deletes any tick that would be overwritten by the next tick. Code: Select all ...

90. How to create a chart with two-step x-axis values    jfree.org

Hi, I would like help on how to create a time series chart with dual,or two-step x-axis values. Am trying to recreate charts previously created in Excel. I would want to have values in X-axis for year and month. The months should run from January to December and the second set of values should be years, say from 2005 to 2010, ...

92. Change hours as double values to TimeSeries values on x-axis    jfree.org

Hi! Regarding 1., a day has 24 hours, so for monday, just multiply your actual value by 4, cast it to integer and you're done. For the other days, you would have to perform some simple modulo calculations. Regarding 2., just use any day and use an appropriate DateFormat that doesn't output the date but just the day of the week ...

94. Change renderering of X-axis values in ScatterPlot    jfree.org

Hi, I have a Scatterplot which plots numbers (y-axis) against time of day (x-axis). For this I am using an XYSeriesCollection to hold my data and I am storing my time-of-day value in milliseconds. I would like to get hold of the renderer in the XYPlot which outputs the x-value on the plot and transform this millisecond value back into a ...

95. JDBCXYDataSet - problem with XAxis    jfree.org

JDBCXYDataset xyDataSet=null; try { xyDataSet = new JDBCXYDataset(this.con, this.query); } catch (SQLException e) { // TODO Auto-generated catch block e.printStackTrace(); ...

97. changing x-axis values of XYSeries    jfree.org

HI, i'm generating graphs with Jfreechart, specifically XYSeries. However, when a new value is added, I must necessarily add value to the x-axis as shown in the following example. Code : // final XYSeries series = new XYSeries("Random Data"); series.add(1.0, 400.2); // But, While I want to change the values that are in the x-axis to strings. I''ve found that it's ...

98. x-axis.    jfree.org

Hello, I'm using XYPlot. last week I had a problem that the values on x-axis didn't act like FIFO, and hen with your help it solved. the change was: domainAxis.setAutoRange(true); domainAxis.setFixedAutoRange(240000 ); domainAxis.setDateFormatOverride(new SimpleDateForma("hh:mm:ss")); BUT NOW It cause another problem, which the value start a few minutes before I start the graph. I mean that if we enter the screen on ...

99. Overlapping Labels on X-Axis    jfree.org

Hi, I am working on vertical BarCharts.I am trying to draw BarCharts for Countries(x-axis) and products(y-axis).This data is comming from data_base. For four to six countries my code is working well.Whenever I am trying to display chart for more than six countries, it is overlapping on one another.How can I extend the x-axis to overcome this problem? If you have any ...

100. JFreeChart - Linegraph / x-axis values get altered    forums.oracle.com

It does seem rather inactive and most threads seem to be left unanswered so if anyone can answer my question please don't restrain from doing so. I will give it a go over there as well and if I do get an answer I'll make sure to update this thread for people with the same question.