Axis 1 « Axis « JFreeChart Q&A





1. JFreeChart - Axis label positioning    stackoverflow.com

I want the label of one of my axis to be two words, each aligned to the beginning and end of said axis - I've been doing this by inserting spaces ...

2. createBufferedImage - abscissa axis truncated    jfree.org

createBufferedImage - abscissa axis truncated by pflo Wed Dec 07, 2011 5:57 pm Hello, I have a problem with the JFreechart transformation into image. Particularly with the Sub Category plot. I have extended SubCategoryAxis class to rotate labels of subcategories. If I generate the chart, all goes well. If I transform this JFreeChart into image by createBufferedImage method, all labels ...

3. Axis Label Problem while Using SWT and JFreeChart    jfree.org

Axis Label Problem while Using SWT and JFreeChart by rje0929 Wed Dec 14, 2011 3:52 pm Hello Everyone, This may be something really simple but I've tried searching the forums for someone who has had the same issue but I haven't run across any posts. I've run into this issue while creating a simple line chart and while running the ...

5. data.DefaultCategoryDataset - XYChart - Axis definition.    jfree.org

Hi, This is a Line Chart. I want in my Chart the X axis to be : (250, 500, 1500, 2K, 3K, 4K, 6K, 8K) Y axis to be: (-10, 0, 10, 20, 30, 40, 50, 60,70,80,90,10,110) How do I specify both the axis explicitly. Please give a sample code as an example if possible. The data for the chart to ...

6. Long Axis Labels getting clipped - No success setting insets    jfree.org

I am using JFreeChart-0.9.21. to develop a CombinedDomainXYPlot - which will ultimately display a parent plot with 17 child plots - most with long labels. Orientation for Range Axis is Horizontal, labels are displayed located on top. The labels are rotated 45 degrees as follows: Code: Select all NumberAxis2 rangeAxis1 = new NumberAxis2("Range 17777444444444444444444444444444444444444444444444555"); rangeAxis1.setLabelAngle(-1 * (Math.PI ...

7. How to Get the Complete labels on the Axis    jfree.org

Hi, I want to display the category item lables along horizontal axis without any dots in the text. ChartFactory.createBarChart(); renderer.setItemLabelsVisible(true); Category item labels are dispalyed on x axis, but some of them are not being displayed completely. They are being displayed with dots appened at the end of the label for example "compa...." I also saw the message posted on june ...

8. How to set the span of axis?    jfree.org

9. cutting an axis    jfree.org





10. Separating axis label from chart for scrolling purposes    jfree.org

Hi, We want to draw our axis labels on a jlabel so we can put them in rowheaderview and columnheaderviews in scrollpanes. This will enable us to always show the axis when looking at massive charts (otherwise the axis will get scrolled out of focus. We tried this but it paints funny - Code: Select all public class AxisLabel extends JLabel{ ...

11. Change the Axis positions    jfree.org

// (...) ValueAxis valueAxisDomain = plot.getDomainAxis(); double left = 0; double top = 0; double right = 0; double bottom = 0; double max = valueAxisDomain.getRange().getUpperBound(); double min = valueAxisDomain.getRange().getLowerBound(); left = -((4 - min)) / (max-min); // a negative offset to put the Axis in the ...

13. timeseries multi axis    jfree.org

NumberAxis axis2 = new NumberAxis( "Axis 2" ); axis2.setRange( 0, 100 ); XYPlot usagePlot = ( XYPlot ) jfreechart.getPlot(); usagePlot.setDomainCrosshairVisible( true ...

14. Axis Questions    jfree.org

You only have one item in your dataset, so there isn't a way for JFreeChart to determine an appropriate axis length for the domain axis based on the data, so it just uses the value from getAutoRangeMinimumSize(). For a DateAxis, this minimum size is 2 milliseconds (although you can change that) - which in turn drives the selection of the appropriate ...

15. Custom axis' label painter. Problems with bounds    jfree.org

Hello everyone. I have a class that extends NumberAxis, I can have multiple axis in a chart, located either at AxisLocation.TOP_OR_RIGHT or AxisLocation.TOP_OR_LEFT. My axis has to paint to labels, one at the top, and one at the bottom, both have to be painted horizontally not vertically like the default painter. The problem is that I don't know how to calculate/set ...





17. Axis in middle of chart area    jfree.org

18. Problem with axis    jfree.org

Excuse me for the small caos and for my english but I`m new and I try to explain the problem event if difficult for me. I have a spectrum analyzer and I communicate without problems using JNI and interface Java. Consequently I can obtain vary datas for example centre frequency, span, trace and so on. On the spectrum`s monitor is visualized ...

19. How to find the physical location of an axis.    jfree.org

//.... find origin x = plot.getRangeAxisEdge().coordinate(dataArea, RectangleEdge.LEFT); y = plot.getRangeAxisEdge().coordinate(dataArea, RectangleEdge.BOTTOM); //..use origin

20. axis steps    jfree.org

NumberAxis is the name of the class containing the setTickUnit method. So each instance of NumberAxis you have in the chart will have its own setTickUnit method. If myAxis1 and myAxis2 are your axes, then you would use, for example, myAxis1.setTickUnit(new NumberTickUnit(0.5); myAxis2.setTickUnit(new NumberTickUnit(0.1); to have ticks in myAxis1 be 0.5 apart and ticks in myAxis2 be 0.1 apart. TickUnitSource is ...

21. Show % sysmols in Vlaue axis    jfree.org

23. Get Axis of a SpiderWebPlot    jfree.org

25. Axis scrolling problems    jfree.org

Hi, I was hoping somebody would be able to help me with this problem I am having with the Domain Axis of my chart. chart.getXYPlot().getDomainAxis().setAutoRange(true); chart.getXYPlot().getDomainAxis().setAutoRangeMinimumSize(numPoints-1); I use the above code to set the axis however the values run from -25 to 25 and i would like them to run from 0 to 50. Initialy there are no series registered with ...

26. question about value axis    jfree.org

Dave Gilbert, I have used SymbolicAxis and change 1,2,3 to 0,1,2 the SymbolicAxis display 0,1,2 but NOT "valey","plain","peak"! Code as follows: double[] periods={1.0D,1.0D,1.0D,1.0D,2.0D,2.0D,2.0D,2.0D,0.0D,0.0D,0.0D,0.0D}; double[][] ad= { periods }; CategoryDataset categorydataset = DatasetUtilities.createCategoryDataset("", "",ad); CategoryStepRenderer categorysteprenderer = new CategoryStepRenderer(true); CategoryAxis categoryaxis = new CategoryAxis(""); String[] sv={"valey","plain","peak"}; SymbolicAxis symaxis=new SymbolicAxis("",sv); CategoryPlot categoryplot = new CategoryPlot(categorydataset, categoryaxis, symaxis, categorysteprenderer); Font titleFont=new Font("",Font.BOLD,12); JFreeChart jfreechart ...

27. AXIS AND SERIES COLORS    jfree.org

28. alignment of Value axis label    jfree.org

29. Rotating Axis Labels in JFreeChart    jfree.org

Hi All, I ran into a problem when rotating the Labels of a JFreeChart (Bar Chart). The labels get rotated but they are shortened and appended with "..." Please can anyone tell me how to remove this and show the complete string? That was the whole intent of rotating!! Thanks in Advance -Sameer

30. Changing an axis label/title.    jfree.org

Hi.. i'm creating a chart using a ChartFactory, and thus I specify a x-axis and y-axis label (a String) upon creation of the chart. I would like to automatically alter labels in my application, and I'm curious at how to go about doing so. I was hoping for something like chart.setYAxisLabel("Whatever") but there doesn't seem to be anything like that. Does ...

31. force axis labels    jfree.org

hi everybody. how can I force the chart to display the complete length or a deteminated caracters length of bottom axis labels. Code: Select all ex: | | | | | |________________ . ...

32. Rotate labels of numberic and symbol axis by defined angle.    jfree.org

Hi Dave, Thanks for all the responses. I am able to get the labels rotate for now by overriding the method On rc3 probably aka branch STABLE_1-0-0 Code: Select all public List refreshTicks(Graphics2D g2, AxisState state, Rectangle2D dataArea, RectangleEdge edge) This method is used internally in ValueAxis at Code: Select all drawTickMarksAndLabels(Graphics2D g2, ...

33. some questions on axis labeling    jfree.org

Im doing a bar chart display. Currently, the legend shows the series types, but I would like these types to appear on the axis just like how the values exist on the axis Y.. however, can i get the series types on the legends to appear on the axis X instead as legends? Thanks!

34. To make the Axis of the chart clickable    jfree.org

i want to make the axis of the chart clickable so that on clicking the axis, it drills in to some other graph. The first graph is not a stand alone graph but is embedded in an HTML page, and we have to drill down from the HTML page. How to do it?

35. How to create a fixed axis    jfree.org

Hi I have a chart, Line, created via the factory class, however I want to be able to alter the Y axis. In a this way. 1) set minimum and maximum values as the chart sizes to my values, which are quite a way from the max value, but the entire scale needs to be shown 2) force the intervals to ...

37. changes axis    jfree.org

38. width of value axis / left axis ??!! :-)    jfree.org

Hi there, can someone please tell me how to specify the width of the left (the value) axis ? Say, i want to set the width to 100px, so that it's aligned with some other charts, where i want to set the width to 100px as well .... I am searching and searching and can't find a solution. Thanks, Ulrich

39. I do not want to show axis values    jfree.org

I have a time series and a XY graph. I do not want to show the scale in the axis. Is this possible? The graph we need to generate is a 100x100 pixels graph, with the goal of giving the "shape" of the graph. I am able to reduce its size but the axis still show a scale and its number ...

40. axis labels different values then data values    jfree.org

ok i'm understanding a little bit better what i want to do within jfreechart. i don't want to use setStandardTickUnits to generate tick marks for me i want to generate my own tick marks. again my data goes from 0.0-1000.0 and basically every 83.333 i want to place a tick mark and label it as its correct mulitple of 30 degrees. ...

41. How to show text in axis instead of values?    jfree.org

Hello, I'm trying to make charts that represent different states for an item. This corresponds to values mesured at regular period of time, so I'm representing the using TimeSeries. It works fine, but I would like to show, instead of values, a label corresponding to the state of the item... I have 4 states to show... please help, I really did ...

42. help neede about axis interval    jfree.org

43. 3D effect on axis for XYPlot    jfree.org

44. Log Axis help    jfree.org

Hi, Steve, I've done something similar. I think the only way is to create a subclass of LogarithmicAxis that has the behavior you want. In my case, I override refreshTicksHorizontal() (the only axes I needed were horizontal; you may need vertical ones as well) I copied the entire refreshTicksHorizontal() method from LogarithmicAxis into my subclass, then changed the one line that ...

45. Editing Axis    jfree.org

hi there, i'm trying to edit the sticks (i think it is what it's called sticks but i'm french and not sure about it) well : my X axis display index of points (0 to 43200 actually) and i want to apply a transform to this index ti display a time (i have a point every 2 second from 0:00:00 to ...

46. Axis Only    jfree.org

Scenario - I have multiple histogram graphs showing data (none dispay the axis or range) in a self-developed listbox-like control - so the user can scroll through many graphs that are lined up and displayed on the same time scale. What I would like to show is a single axis (that has no histogram) on a different panel but on the ...

48. Axis fixedDimension question    jfree.org

Hi, I am trying to stack two separate graphs on top of each other in a html table. The upper graph has three y-axis whilst the lower on has two y-axis. I would really like to get the width (space between the 2 y-axis) of the lower graph to match the width of space between two of the upper graph's y-axis ...

49. [SpiderWebPlot] Axis caption rendering problem    jfree.org

Hi, We're using JFreeChart in a Servlet to produce a nice spider plot graph in a webpage and we have a rendering problem with the axis captions. With long axis captions the text just "spills out" of the frame. We've tried adding "\n" in our strings to force the caption to be on several lines but it has no effect. The ...

50. Axis values customization?    jfree.org

Hi there, I am new to JFreeChart and I have a question. My graph is going to be a time-based graph which means my X-axis is going to be time. But the problem is that my values will be related to some task completion status - For example, in case of a Java thread the states can be Ready, Waiting, Sleeping, ...

52. Axis trace Drawing inverted!!    jfree.org

53. Who eats my linebreaks for axis labels?    jfree.org

Hi! I've got a problem with axis labels if they contain newline characters ('\n'). What I want to do is create a TimeSeriesChart and set the DateFormat (using the method setDateFormatOverride()) to something like "dd.MM.yyyy\nhh:mm". The problem is that someone eats my linebreaks They simply disappear. I traced it down to org.jfree.text.TextUtilities.drawRotatedString(). This method still has the linebreak and passes the ...

54. Annotation/Crosshair drawing over axis labels - Help asap!!    jfree.org

I'm trying to deliver an implementation of JFreeChart but have found a big problem in the drawing of crosshairs and annotations. When these run over the edge of the chart (for example when scrolling zoomed in) they continue to be drawn even when they are outside the plot area. This makes the axes look very messy, as can be seen in ...

55. Aligning Axis    jfree.org

I've two Axis, both with 0 s129912667.websitehome.co.uk/test/graph.gif I'd like both the 0's to line up. There must be a way to do this!! I've been muddling my way through the code trying to find an answer, but felt I'd best consult the experts! There are two datasets; - one with the line - LEFT AXIS - the other with the two ...

56. Change axis values to string    jfree.org

I did the same thing overriding the numbertickunit. Basically override the "valueToString(double d)" function in there and have it output the string you are looking for. Then I create a new TickUnits object and load it up with the new NumberTickUnit that I created for the values I want displayed and then set that TickUnits object to the TickUnits on the ...

57. Fixed axis    jfree.org

58. Axis Label Alignment    jfree.org

by DLC Thu Aug 31, 2006 6:18 pm Here is a simple implementation for a NumberAxis... Code: Select all import java.awt.Font; import java.awt.FontMetrics; import java.awt.Graphics2D; import java.awt.Shape; import java.awt.geom.AffineTransform; import java.awt.geom.Rectangle2D; import org.jfree.chart.axis.AxisState; import org.jfree.chart.axis.NumberAxis; import org.jfree.text.TextUtilities; import org.jfree.ui.RectangleEdge; import org.jfree.ui.RectangleInsets; import org.jfree.ui.TextAnchor; public class AlignedNumberAxis extends NumberAxis { private static final long ...

59. Change Axis Labels?    jfree.org

60. TimeSeries on both Axis    jfree.org

61. setTickMarkPosition - distorted axis labels    jfree.org

setTickMarkPosition - distorted axis labels by bezalel_d Mon Sep 25, 2006 10:23 am When using DateTickMarkPosition.End in the setTickMarkPosition method for a TimeSeries chart, the axis labels miss out tickmarks for incomplete years at the beginning of the chart. In the code below, despite the data ranging from Apr 2003, no axis label is displayed until Dec 2004. I would ...

62. GridLines at the ends of the axis    jfree.org

Hi all! I've got a timeseries chart with a DateAxis as the DomainAxis. What I want to do is draw a chart starting at dayX 00:00:00 and ending at dayY 00:00:00. The number of days in between dayX and dayY variies between 1 to 28. What I did was calling xAxis.setRange(new DateRange(dayX,dayY)); The problems I have arose when I tried to ...

63. Selection of gridlines on multi axis chart?    jfree.org

Is it possible to explicitly select if gridlines for the range axises should be drawn? Is it possible to make gridlines for not only the first range axis, but for all range axises, visible at the same time? Is it possible to hide the gridlines for the first axis and make e.g. the gridlines follow the second range axis instead? Regards ...

64. Multiline axis labels    jfree.org

65. Labels of Axis get cut at edges    jfree.org

This problem still exists, unfortunately. What behaviour would you like to see? Options include: (1) Just hide the label; (2) Shift the label left to make it fully visible, but this will include checking that there isn't an overlap with the previous label on the axis (and then we'd need to decide what to do about that). (3) Something else? At ...

66. TimeSeries with two axis    jfree.org

67. Percentage Axis    jfree.org

I have StackedBarChart with some values. I want that the bars always reach the top but show percentage of their bar. Like this: Country A Water 1 Country A Earth 3 Country B Water 3 Country B Earth 6 Now it should show 2 bars, both same size, showing the relation between Water and Earth. It's difficult to explain. I have ...

68. axis labels are sqwashed and become unreadable    jfree.org

When charts are resized to be to small to fit the entire label text, the labels become squashed and as a result are unreadable. What we would like is for the text to remain at its size and be concatenated with 3 dots for example "Band Width Utilization" should be truncated to "Band Wi..." Is there a way to prevent this ...

70. Remove dots, different colors for axis label    jfree.org

Hi, I created a second renderer for my second axis. But the second renderer uses these marks on each value(triangles, rectangles, circles). How can I remove them? To make it more clear which series corresponds to which axis, I added the names of the serieses to the axis labels. Now I would like to use the series color for the axis ...

72. Right axis partially finished    jfree.org

by david.gilbert Mon Feb 19, 2007 10:56 am I wasn't able to reproduce the problem. The following program works fine for me, even if I swap the commented out lines: Code: Select all import javax.swing.JPanel; import org.jfree.chart.ChartFactory; import org.jfree.chart.ChartPanel; import org.jfree.chart.JFreeChart; import org.jfree.chart.axis.AxisLocation; import org.jfree.chart.axis.NumberAxis; import org.jfree.chart.axis.ValueAxis; import org.jfree.chart.plot.CategoryPlot; import org.jfree.chart.plot.DatasetRenderingOrder; import org.jfree.chart.plot.PlotOrientation; import org.jfree.chart.renderer.category.LineAndShapeRenderer; import org.jfree.data.category.CategoryDataset; import org.jfree.data.category.DefaultCategoryDataset; import ...

73. JFreeChart / gnujaxp with Axis    jfree.org

Hi, I have been using JFreeChart for some time with good results. I have just upgraded from vn 0.9.13 to vn 1.0.4 - which seems to have resolved the problems that I have had before - which looked to be due to memory leaks. I am still having a problem though when using JFreeChart with Apache Axis (Axis 1, vn 1.2.1 ...

74. Prefix/Suffix at axis data label    jfree.org

75. Symbolic Axis with Cewulf    jfree.org

Hello, I'm using JfreeChart and cewolf and I should represent some "text values" (dry, wet ...) in a chart. I guess I should use a "Symbolic Axis" for this (or maybe a special type of plot ?) but I can't think of a way for doing this with Cewolf ... Any tips or suggestions are welcome!!! Can anyone help me with ...

76. background of the axis labels    jfree.org

Hi, I would like to have a colored background for my axis labels and I was wondering how I can achieve it with jfreechart. Take for instance this image : www(dot)meteo(dot)be/nederlands/gfx/Klimatologisch/nl60390.png I would like to fill the the boxes surrounding the letter of the month with a certain color. Maybe I can draw this myself using java2d, but then I need ...

77. JFreeChart axis labelling.    jfree.org

78. Axis labes    jfree.org

The only method in DefaultXYDataset to add data is "addSeries(Comparable seriesKey, double[][] data)" which only let me add complete series of values. In my application this is very inconvenient since i need to add single values each time. I think I could use a DefaultCategoryDataset like now and then copy all data to a DefaultXYDataset prior to create my chart, but ...

80. axis changed    jfree.org

ValueAxis axis = xyplot[0].getDomainAxis(); xMinMax[0] = (0); xMinMax[1] = (10); ...

81. jfreechart Only axis in applet    jfree.org

jfreechart Only axis in applet by code453 Sat Jun 09, 2007 11:20 am hello, I've seen your example of dynamic chart on website. Then I've build the application that work like demo on netbean version 5.0 everything is fine. But when I tried to build the dynamic chart on web using applet. It can not show the chart (only axis ...

82. Problem to make the label axis clickable    jfree.org

Hi all, I'm trying to understand how can I make the label axis clickable. I would like to, when I click on the axis that this one is displayed in Logarithmic scale and when I reclick go back to linear. I have created that with a checkbox but now I would like to do from a clickable axis. So I have ...

83. common range/Domain axis    jfree.org

Hi, I am a newbie to JFreeCharts, working on a project that requires me to use common range and domain axes for multiple sub plots. I looked thru demo examples and searched online, no luck. I tried using Combined*Plot, but it provides me only one shared axis at any given time. I also tried plot.setDrawSharedDomainAxis(true); on the root plot... Any help ...

84. Pixellated Axis    jfree.org

85. Specifying the width of axis labels    jfree.org

Hi all, Is there any way I can specify the width of the labels used for the axes in a graph? Currently it is dependent on the number of digits in the values in the axes and the length of the labels. For e.g., the left axis would be thinner if the values are just 1 or 2 digit values. The ...

86. Problems with XYShapeAnnotation on a number/date axis    jfree.org

Yes, the shape is specified in data space, so your ellipse is 5 milliseconds (the units on the DateAxis) wide, which is probably pretty thin (depends on the axis range). If you just want a fixed size marker at a specific (x, y) location, you might want to create your own annotation class.

88. Setting marker on the correct axis    jfree.org

Setting marker on the correct axis by joolz Wed Jul 25, 2007 10:02 am I am trying to generate a graph which has a two range axis - one on the left, which is the value of the range - one on the right, which is a percentage I would like to have a horizontal marker at say, 80%, but ...

89. Align axis labels to top    jfree.org

hi there, i'm new to JFreeChart. i would like to know if it is possible to change the alignment of the label for the range and domain axes? for example, i have a range that has a title "Amount", what happens in default is that it is placed on the center. i would like to move the word "Amount" on top ...

90. Move the label of an Axis    jfree.org

91. chart axis labels are clickable    jfree.org

Hi, I am using Chart Creator jsf component to render bar chart in my applications. Till now, it's working great for me. But I came across a small problem where my axis labels are also clickable and break the application. Though I can handle this situation in the javascript method which gets called on the click of any bar in the ...

92. Axis and setFixedDimension    jfree.org

93. Relocating Axis Label    jfree.org

Hi, Thanks for the reply, as per your suggestions I tried modifying the jFree source code, but facing some problem in getting the co-ordinates of point of intersection if X and Y axis. I tried overridding drawLabel() method of Axis class, in which I require co-ordinates of X and Y intersection, to locate the position of the label. Can you please ...

94. Quadratic Axis    jfree.org

96. Percentage on Axis    jfree.org

97. Maximum value of Axis    jfree.org

How do i tell an XYPlot that, even though the y values keep going up, i want it's maximum value shown to be a certain number. i want the highest value that shows on the chart to be 1, even though the lines on the chart go up to 9 (still need to show the line going up past 1) let ...

98. A little help for multiline axis labels    jfree.org

Hello, I'm changeing the TextUtilities Class to allow multiline Axis Labels with the \n line break character. I get the String to be drawn in multiple lines, the remaining problem is that the dataArea and plotArea size do not change, so the axis label is being drawn out of sight due to the shifting caused by the width of the growing ...

99. HighLowChart with integer axis    jfree.org

100. Tool Tip for Sub Label Axis    jfree.org