timeserieschart « Chart « JFreeChart Q&A





1. Display days in TimeSeriesChart    stackoverflow.com

How can I display the names of the days ("Sunday, Monday....") on the time axis, instead of just the date ?

2. Where is DateTickUnit documentation?    stackoverflow.com

I need to change the default DateTickUnit settings for different zoom levels for a TimeseriesChart, but canĀ“t find the place i need to read in the documentation? I would greatly appreciate ...

3. Labels in TimeSeriesChart?    jfree.org

5. TimeSeriesChart    jfree.org

TimeSeriesChart by cheewee855 Tue Jun 28, 2005 5:44 am I will like to connect it to mySql and the chart into Jsp, but i new to it. anyone can teach me step by step or any code for me to learn, thank in advance, this is the java code i have. TimeSeriesTest.java package org.jfree.chart; import java.text.SimpleDateFormat; import java.sql.Connection; import java.sql.DriverManager; ...

7. TimeSeriesChart    jfree.org

hi, oops, sorry, i pasted the wrong code segment. sorry about that; this is what i have for that particular graph that i am after: BasicStroke stroke = new BasicStroke(3f, BasicStroke.CAP_ROUND, BasicStroke.JOIN_ROUND); XYAreaRenderer2 xyrenderer = new XYAreaRenderer2(); xyrenderer.setSeriesPaint(0, Color.blue); xyrenderer.setStroke(stroke, true ); xyrenderer.setSeriesStroke(0, stroke, true); // System.out.println(BasicStroke.JOIN_ROUND + "," + BasicStroke.CAP_BUTT); // System.out.println( ((BasicStroke)(xyrenderer.getSeriesStroke(0))).getEndCap() ); plot.setRenderer(xyrenderer); thank you in advance ... ...

8. custom tooltip on TimeSeriesChart    jfree.org

Hi If anyone would have suggestions on how I can customize my tooltip text on my timeseries chart, it would be great. I am now showing the date (x-axis info) and the y-axis number. Instead I want to show an event number and the y-axis number. The event number is kind of like a counter. How do I pass this event ...

9. Changing color for one point in a TimeSeries-chart    jfree.org

I would like to make a graph that display the points in different colors depending on value. Is that possible. I know there is many questions about this at the forum but I don't understand how to succeed to just change the color of a point without changing the color of the line between the points. I have been subclassing the ...





10. Problem with TimeSeriesChart    jfree.org

Hey guys, I am trying to plot two lines and one bar on a graph on a TimeSeriesChart, the problem am facing is tat the point of the line is not falling on the bar for a particlar value, say for 14-Dec-2005, am getting two point (one on each line), but the bar graph for the same point is coming in ...

16. TimeSeriesChart: Problem with duplicates    jfree.org

[...] TimeSeriesCollection dataset = new TimeSeriesCollection(); while (parameters not empty) { TimeSeries series = new TimeSeries(parameter, Day.class); while (dayList not empty) { series.addOrUpdate(new Day(calendar.getTime()), value); } dataset.addSeries(series); } JFreeChart chart = ChartFactory.createTimeSeriesChart(chartTitle, xAxisLabel, yAxisLabel, dataset, true, false, ...





17. Show Area and Lines in TimeSeriesChart    jfree.org

I made a TimeSeriesChart with several series in a series collection. Now I'm tring to work with one plot and two different types of Renderers (XYAreaRenderer, XYItemRenderer) to show areas in the background and two lines in the front. But it does not work, only the defined areas appear. I'm working with jsp. This is part of the code: ---------------------------------------------- valueCollection.addSeries(timeMin); ...

18. Marking Points on TimeSeriesChart    jfree.org

Hi all, iam a little confused how to set marking Points on lines. My Problem is that i have special values at my TimeSeries, as example y:=3 x:=03.07.2006 is a special point and should be marked, with a point or something else. the next point y:=2 x:=04.07.2006 is not a special-point - so it shouldnt get a mark. Now i've done ...

19. Help needed with TimeSeriesChart    jfree.org

TimeSeries timeSeries = new TimeSeries("Service Request Location Update", Day.class); timeSeries.add(new Day(6, 1, 2006), 6); timeSeries.add(new Day(1, 1, 2006), 1); timeSeries.add(new Day(2, 1, 2006), 2); timeSeries.add(new Day(3, 1, 2006), 3); timeSeries.add(new Day(4, 1, 2006), 4); timeSeries.add(new Day(5, 1, 2006), 5); timeSeries.add(new Day(7, 1, 2006), 7); TimeSeriesCollection timeSeriesCollection = new ...

20. ignore weekends on timeSeriesChart    jfree.org

Hello, I am trying to create a TimeSeriesChart. on the x-axis it's a daily values, while on the y-axis a simple floats values. my dataset does not contains weekend and holidays, but the line chart I get all the range of dates between the first and the last day on the dataset for example : (22/10/06, 560.5) (23/10/06, 570.5) (24/10/06, 565) ...

21. XYToolTipGenerator with TimeSeriesChart    jfree.org

Hi, I have a chart created with ChartFactory.createTimeSeriesChart() with the tooltip argument at true. The tooltips of the first dataset displays perfectly. Then i add another axis for a second dataset with a standardXYItemRenderer. I set the tooltipGenerator of the renderer to show the X and Y values, but the tooltips give me a strange number for the X (the date). ...

22. Custom ItemLabelGenerator on TimeSeriesChart    jfree.org

Hi all. I'd like to create custom item labels for TimeSeriesChart by extending StandardXYItemLabelGenerator and overriding generateLabel method but my generateLabel method isn't called during chart creation. getItemLabelGenerator(int series, int item) shows that myStandardXYItemLabelGenerator is propperly set for each item. So what am I doing wrong / missing ? Why generateLabel() in myStandardXYItemLabelGenerator isn't called ? Code: Select all static class ...

23. 3 questions about TimeSeriesChart    jfree.org

You can use the NumberAxis class of JFreeChart with NumberFormat for Y axis to format the values as desired and also DateAxis class of JFreeChart with SimpleDateFormat to format the value of X axis Let's take an example below: 2/ private void buildRangeAxis(JFreeChart chart) { XYPlot plot = chart.getXYPlot(); ValueAxis valueAxis = plot.getRangeAxis(); if (valueAxis instanceof NumberAxis) { NumberAxis axis = ...

24. TimeSeriesChart - A regular time period of one minute    jfree.org

Hi all. I need to create a TimeSeriesChart to have on the x-axis a full minute time interval separated by seconds. This view will be refreshed every second. So at every second the view must move on the left and refresh its plot. I'm a newbie regarding the jfreechart, so in any case every help would be really appreciated. PS: if ...

25. Display dot on TimeSeriesChart when only one month exists ?    jfree.org

Hi all, Is there a way to display a dot on TimeSeriesChart when there is only data for only one month. For all others, I have XYLineAndShapeRenderer renderer = (XYLineAndShapeRenderer) r; renderer.setBaseShapesVisible(false); renderer.setBaseShapesFilled(false); Is there any way by which I can find out the count of the months along the X-axis..so that i can do... if (count == 1) then setBaseShapesVistible(true) ...

26. TimeSeriesChart with gradient    jfree.org

27. TimeSeriesChart does not show every month !    jfree.org

I have a chart created this way. JFreeChart chart = ChartFactory.createTimeSeriesChart( titolo, // title "Data", "mm", // dataset, true, true, false ); XYPlot plot = chart.getXYPlot(); plot.setOrientation(PlotOrientation.VERTICAL); plot.setBackgroundPaint(Color.lightGray); plot.setDomainGridlinePaint(Color.white); plot.setRangeGridlinePaint(Color.white); StandardXYItemRenderer renderer = (StandardXYItemRenderer) plot.getRenderer(); renderer.setPaint(Color.black);.... TickUnitSource unitsAxis = DateAxis.createStandardDateTickUnits(); axis.setTickMarkPosition(DateTickMarkPosition.MIDDLE); My problem is that my chart does not show every month on the axis but it shows only feb, april ...

28. dot in a TimeSeriesChart    jfree.org

29. TimeSeriesChart doesn't update    jfree.org

TimeSeriesChart doesn't update by michele Fri Jul 06, 2007 3:54 pm Hi all, I'm stuck with a TimeSeriesChart which does not update properly. Here's the code: Code: Select all class RevenueData { // ------------------------------------------------------------------------ // Fields // ...

30. EighthASecond sampling period for TimeSeriesChart.    jfree.org

Hello, I am using a TimeSeriesChart. The sampling period of my data is eighth a second. And so I would like my domainAxis to be sampled each eighth a second. For example, when I use timeAxis.java2DToValue(), I want to get an eighth a second x value and not a millisecond x value. I thank about some possibilities : - to define ...

31. TimeSeriesChart Grabs Focus on update    jfree.org

Hi, I am using a dynamic TimeSeriesChart Whenever I update the chart with timeSeries.addOrUpdate(second, y); the chart grabs focus even when the window is in the background. So it makes it impossible to use any other program when the chart is updating. However if I minimize the chart this behavior stops. Is there a way of disabling the focus grab for ...

32. How to increase margin around a TimeSeriesChart?    jfree.org

I am using the ChartUtilities class to write my chart as a JPEG image. No matter what I set the width to, the last x value keeps getting clipped on the right side. Is there anyway to put a margin or padding around the chart, title, and axis to prevent this overflow? Thanks.

33. IndexOutOfBoundsException in TimeSeriesChart    jfree.org

Hi, We are developing a swing based application where we using the TimeSeriesChart. This chart is populating the data in real time. We are getting this exception from Event Dispatch Thread when it is trying to plot the data on chart. This happens when we open 4 or 5 charts simultaneously and all charts plot the graph in real time. It ...

35. TimeSeriesChart zoom get data    jfree.org

I have two charts. A conventional TimeSeriesChart and a ThermoMeterPlot. I want to use ThermoMeterPlot to show the average value of currently zoomed TimeSeries. How can I get this part of underlying TimeSeries Dataset that is currently zoomed in? I have bought the Developers guide, but can't find the exact info there.

36. Annotations+TimeSeriesChart    jfree.org

37. How to insert images in TimeSeriesChart?    jfree.org

ImageIcon icon = new ImageIcon("image.gif"); Image image = icon.getImage(); XYImageAnnotation xyia = new XYImageAnnotation(100, 180, image); plot.addAnnotation(xyia);

38. how can i insert images in some positions of TimeSeriesChart    jfree.org

int XXX = 100; ImageIcon icon = new ImageIcon("image.gif"); Image image = icon.getImage(); XYImageAnnotation xyia = new XYImageAnnotation(XXX, 180, image); ...

40. TimeSeriesChart Question!    jfree.org

hi there... im trying to create a multiple data set TimeSeriesChart.... the thing is, i recolect data from a data base (datatime (TIMESTAMP) , value (DOUBLE)) ... but, i have values recolected that have same timestamps in my DB (wich is suposse to be like that...), something like this: +-------------+-----------+---------------------+ | template_id | value | datatime | +-------------+-----------+---------------------+ | 1 | ...

41. Tooltip in TimeSeriesChart getting lost on margin    jfree.org

I am seeing a problem where if a point is graphed on the right or lower border of my time series chart then the tooltip is not generated. The hotspot for the tooltip is not even graphed. I've looked in the source code a little and I noticed that in XYPlot these points are not considered visible so since processVisibleItemsOnly on ...

44. broken lines in TimeSeriesChart    jfree.org

45. TimeSeriesChart ticks off by one minute (4:59, 5:59, 6:59...    jfree.org

I'm displaying some data in a time series chart. I display variable amounts of data, sometimes graph contains data for one hour, sometimes 24h. Behavior of ticks varies, graphs for longer periods are ok but graphs for a shorter time display wrong ticks. I'm using the "auto ticks" (by default) which alters the number of ticks and the "resolution" based on ...

46. How can all data items be displayed in a TimeSeriesChart?    jfree.org

How can all data items be displayed in a TimeSeriesChart? by mhollowman Mon Feb 16, 2009 6:58 pm Hi all, I am new to JFreeChart. I am trying to use JFreeChart to display dynamically added data items. By looking into the example listed below, I think using a TimeSeriesChart might help me. If you could please try the above example ...

47. ItemLabel to TimeSeriesChart    jfree.org

48. TimeSeriesChart graph is taking too much time to load    jfree.org

TimeSeriesChart graph is taking too much time to load by kousik Thu Mar 19, 2009 1:25 pm Please find the following code for my Time Series Chart graph, which I have written in Struts(1.2) Action. The action is called from jsp page. TimeSeriesCollection data is fetched from database. For less amount data it works fine but for large amount of ...

49. Special TimeSeriesChart with partial dates    jfree.org

Hi all! I have the requirement to visualize special measurement values. Those values have timestamps that only consist of partial date/time information like "01:00" (no day). For an explanation of partial date/time see the Joda Time project. The values are calculated by building the diurnal variation (i hope that's the correct English word). Easiest way to explain this is probably an ...

50. TimeSeriesChart always showing beginning of month    jfree.org

I created a Time Series Chart and set data similar to that listed below TimeSeries series = new TimeSeries(dataName, Day.class); series.add(new Day(DateUtility.getDate("3/31/2009"), .025); series.add(new Day(DateUtility.getDate("4/30/2009"), .027); series.add(new Day(DateUtility.getDate("5/31/2009"), .028); series.add(new Day(DateUtility.getDate("6/30/2009"), .029); series.add(new Day(DateUtility.getDate("7/31/2009"), .030); series.add(new Day(DateUtility.getDate("8/31/2009"), .025); I set the DateFormatOverride to new SimpleDateFormat("M/d/yyyy") Where DateUility.getDate(String date) returns a new date object set to value of the string. All of ...

51. TimeSeriesChart color    jfree.org

Hello all, I'm trying to create 8 TimeSeriesChart having same kind of TimeSeriesCollection. Each collection has 4 data and there are 8 sereiscollection. Now when I add it to TimeSeriesChart the color of the plot for each data differs for each seriescollection. Is there anyway I can specify color for each data and have it for 8 different series collection, so ...

53. TimeSeriesChart - how to put my own timestamp as x/y- value?    jfree.org

Hello, I would like to know if my project is going to work the way i figured it out... I have several Logfile-like files, (csv) with a timestamp and values, like: Code: Select all Timestamp ; CommittedVirtualMemorySize (MB) ; FreePhysicalMemorySize (MB) ; CollectionCount ...

54. TimeSeriesChart Time format    jfree.org

55. TimeSeriesChart text instead of numbers.    jfree.org

Hi, Can anybody help me here. I have mad a simple chart, bud i need textvalues instead of numbers. For example, values from 1-8 on the one hand and the time on the other axis. is it possiple to replace the 1-8 with text ? so 1 would be = low, 8 = high ?

56. Tooltips and TimeSeriesChart    jfree.org

57. Display a VERTICAL marker on a timeserieschart    jfree.org

RegularTimePeriod grapheTimePeriod = new Day(05, 03, 2010); CategoryMarker marker = new CategoryMarker(grapheTimePeriod, Color.red, new BasicStroke(1.0f)); marker.setDrawAsLine(true); marker.setLabel("marker label goes here"); marker.setLabelFont(new Font("Dialog", Font.PLAIN, 11)); marker.setLabelTextAnchor(TextAnchor.HALF_ASCENT_LEFT); marker.setLabelOffset(new ...

58. StackedBarCharts in TimeSeriesChart?    jfree.org

I'm replicating this chart in JFreeChart: So far I have this: Code: Select all public static void main(String[] args) { // Graph final CategoryPlot plot = new CategoryPlot(); final CategoryAxis dateAxis = new CategoryAxis("Date"); ...

59. TimeSeriesChart: DomainCrosshair + Tooltips    jfree.org

Greetings, I've been working on a project for a while now and generated a TimeSeriesChart with multiple series. These series get added and removed during the runtime. I have added a DomainCrosshair and read out the individual values of the TimeSeries at this line. Now I want to show these values in tooltips, each of them located at the intersection-point of ...

60. how to know color of lines in TimeSeriesChart?    jfree.org

If a renderer renders a data item of a series, and the paint for the series has not yet been specified, the renderer will ask a "drawing supplier" for the next paint (check AbstractRenderer.lookupSeriesPaint(int series) which is calling the abstract method getDrawingSupplier()). A renderer extending AbstractXYItemRenderer will return the DrawingSupplier of the XYPlot (see AbstractXYItemRenderer.getDrawingSupplier()) . By default, an XYPlot uses ...

61. Help needed with TimeSeriesChart (JFreeChart)    forums.oracle.com

Sweepee, I don't know the JFreeChart... but I presume the TimeSeries.add method accepts a date, and time, or a datetime... check the API doco for it. ...also, It's not obvious where you're retrieving date/time's from the DB ... so are you sure you're retrieving a datetime (or a date and a time)... and not just a date? Keith.