update « Dataset « JFreeChart Q&A





1. update dataset from wrong thread?    jfree.org

Hi, I try to update my datasets dynamically, but I get this exception: Exception in thread "AWT-EventQueue-0" java.lang.IndexOutOfBoundsException: Index: 137, Size: 43 at java.util.ArrayList.RangeCheck(ArrayList.java:547) at java.util.ArrayList.get(ArrayList.java:322) at org.jfree.data.xy.XYSeries.getDataItem(XYSeries.java:446) at org.jfree.data.xy.XYSeriesCollection.getX(XYSeriesCollection.java:245) at org.jfree.data.xy.AbstractXYDataset.getXValue(AbstractXYDataset.java:77) at org.jfree.chart.renderer.xy.XYLineAndShapeRenderer.drawSecondaryPass(XYLineAndShapeRenderer.java:1019) at org.jfree.chart.renderer.xy.XYLineAndShapeRenderer.drawItem(XYLineAndShapeRenderer.java:801) at org.jfree.chart.plot.XYPlot.render(XYPlot.java:2640) at org.jfree.chart.plot.XYPlot.draw(XYPlot.java:2218) at org.jfree.chart.JFreeChart.draw(JFreeChart.java:1039) at org.jfree.chart.ChartPanel.paintComponent(ChartPanel.java:1243) at javax.swing.JComponent.paint(JComponent.java:1005) at javax.swing.JComponent.paintChildren(JComponent.java:842) at javax.swing.JComponent.paint(JComponent.java:1014) at javax.swing.JComponent.paintChildren(JComponent.java:842) at javax.swing.JComponent.paint(JComponent.java:1014) at javax.swing.JLayeredPane.paint(JLayeredPane.java:559) at javax.swing.JComponent.paintChildren(JComponent.java:842) at javax.swing.JComponent.paintWithOffscreenBuffer(JComponent.java:4970) at ...

2. How to update an JDBCXYDataset ?    jfree.org

Iam trying to show a chart that gets data from an database ..and i wana have it refresh the dataset when u click on a "refresh" button. My problem is now that i have to close the Connection to the MYSql Driver. So i read the update gets fired through executeQuery() but since the Conenction is closed. I cant execute another ...

3. Dynamically updating charting based on changes to dataset    jfree.org

Hi All, First off, thanks to David Gillbert and to all that have contributed to making such a fine charting component. I have been experimenting a bit with the chart in order to plot stock market data between the 1 minute and daily range. I'm using DateAxis with the SegmentedTimeline refinement to filter out the weekends and my own implementation of ...

4. Updating CategoryDataset in StackedBar Chart    jfree.org

Hi, I want to plot a Stacked Bar Chart with some data that I have stored in a txt file.I am parsing the txt file and updating some array counters. Now,I am adding the array counters by the addValue method to the dataset for StackedBar Chart. With some values it is working correctly.But sometimes it fails.The error is shown as: Exception ...

5. SpiderWeb does not update when DefaultCategoryDataset change    jfree.org

Hi I'm using the SpiderWebPlot based on the example "Spider Web Chart Demo 1". I have the following issue which is that, unlike other charts (Bar, timeseries etc), the chart does not refresh itself when I clear the DefaultCategoryDataset and add a new set of data to it. How could I achieve this? Thanks Benoit

6. Chart does not auto-zoom out after dataset updates    jfree.org

I created a JFreeChart which has periodic updates to the dataset after the chart is created. That part works fine, the chart correctly updates with new data. Problem is that eventually, it starts plotting off the chart. I tried adding in the RestoreAutoBounds() from ChartPanel class right after I update the dataset, but unfortunately that did not seem to help. Any ...