Search found 15 matches

by dunabur
Mon May 14, 2018 1:03 pm
Forum: JFreeChart
Topic: Getting data displayed by setting setRange()?
Replies: 0
Views: 282

Getting data displayed by setting setRange()?

I have a CandlestickRenderer chart using OHLCSeries with a custom DateRange by using domainAxis.setRange(). So this means that only part of the data is displayed.

I would like to get only the data that is displayed for computation. How do I do that?

Thanks!
by dunabur
Fri Apr 27, 2018 12:23 pm
Forum: JFreeChart
Topic: jfreechart changing the dataset and synchronize
Replies: 1
Views: 221

jfreechart changing the dataset and synchronize

I am developing a swing application with jinternalframes, each of those containing a jfreechart chart. My problem is that all code for adding, removing data from a series is together in SwingUtilities.invokeLater(new Runnable() {...}); code. Since I add and remove a lot from the dataset, it's all be...
by dunabur
Tue Nov 14, 2017 3:05 pm
Forum: JFreeChart
Topic: Getting chart and data area dimensions unreliable?
Replies: 1
Views: 469

Re: Getting chart and data area dimensions unreliable?

Apparently chartPanel.setMaximumDrawWidth and chartPanel.setMaximumDrawHeight were set to their default of 1024x768 after which the chart would only stretch but not keep rendering. Setting chartPanel.setMaximumDrawWidth() and chartPanel.setMaximumDrawHeigh() to higher levels will push the rendering ...
by dunabur
Tue Nov 14, 2017 2:37 pm
Forum: JFreeChart
Topic: Getting chart and data area dimensions unreliable?
Replies: 1
Views: 469

Getting chart and data area dimensions unreliable?

Hey there, I`ve been trying to get the chart dimensions as described here: http://www.jfree.org/phpBB2/viewtopic.php?f=3&t=28208 Basically I have a chartPanel inside a JFrame, using a CandlestickRenderer. I used Componentlistener to execute code each time I resize the window, to give me the Chart Di...
by dunabur
Tue Oct 10, 2017 6:37 pm
Forum: JFreeChart
Topic: Two Windows, but only the second gets updated?
Replies: 2
Views: 661

Re: Two Windows, but only the second gets updated?

Thanks for taking your time. I was baffled that it seemed to be like its the problem with jfreechart. However, I have now finally found out why I had the problem - the OHLCSeries was declared static, and therefore shared between all instances. So it was my error. Really happy about it actually even ...
by dunabur
Mon Oct 09, 2017 7:22 pm
Forum: JFreeChart
Topic: Two Windows, but only the second gets updated?
Replies: 2
Views: 661

Two Windows, but only the second gets updated?

Hey everybody, I am trying to have multiple windows using JFrame, each being updated as time goes on with more data(using OHLCSeries). The problem is: once I have more then one window (and more then one jfreechart object) open, and I try to update one of those objects with new data, only the last cr...
by dunabur
Wed Aug 16, 2017 8:20 pm
Forum: JFreeChart
Topic: Number of visible DateAxis points?
Replies: 1
Views: 525

Number of visible DateAxis points?

Let's say I have a DateAxis domainAxis. That dataset contains 10 days. I set a new range with domainAxis.setRange(), now containing less days. How can I find out how many data points / days are in that new Range?

Thanks!
by dunabur
Wed Aug 16, 2017 7:51 pm
Forum: JFreeChart
Topic: Autoadjust vertial axis after zoom
Replies: 1
Views: 528

Re: Autoadjust vertial axis after zoom

I was dead wrong, however now I`ve managed to get it working. This is the code to make the mouse zoom autoadjust to the Y (rangeAxis) axis: ChartPanel chartPanel = new ChartPanel(chart){ // makes the zoom from rightclick dropdown menu autoadjust the y axis @Override public void zoomInRange(double x,...
by dunabur
Wed Aug 16, 2017 1:18 pm
Forum: JFreeChart
Topic: Autoadjust vertial axis after zoom
Replies: 1
Views: 528

Autoadjust vertial axis after zoom

I`m trying to find out how to trigger the code that starts when doing rightclick-autoadjust-vertical axis (translated my me, might be called differently) after I have zoomed into the chart. Basically, after using mouse zoom, I want rightclick->autoadjust->vertical axis to be executed automatically. ...
by dunabur
Wed Aug 16, 2017 12:03 pm
Forum: JFreeChart
Topic: Scrollable, autoadjustable financial chart
Replies: 9
Views: 1552

Re: Scrollable, autoadjustable financial chart

@paradoxoff Thank you so much for your time. I haven't had the chance to implement your suggestions until now. It works! Below the code snippet to make it work on candlestickdemo, insert right after ChartPanel chartPanel = new ChartPanel(chart); : chartPanel.addMouseMotionListener(new MouseMotionAda...
by dunabur
Sat Jul 15, 2017 7:09 pm
Forum: JFreeChart
Topic: Scrollable, autoadjustable financial chart
Replies: 9
Views: 1552

Re: Scrollable, autoadjustable financial chart

setRangePannable(false) did have no effect on the Y axis range (The Y range goes from 15 to 70, which are the high/lows of the whole dataset, while the range should go from 15 to aproximately 40, which is the aprox. high/low of the part of the dataset that is visible (using setRange()) on the chart ...
by dunabur
Thu Jul 13, 2017 7:57 pm
Forum: JFreeChart
Topic: Scrollable, autoadjustable financial chart
Replies: 9
Views: 1552

Re: Scrollable, autoadjustable financial chart

The initial chart itself is wrong. The Y axis should autoadjust to the viewable min and max within the part of the data that I set with domainAxis.setRange() , however I do not know how. I suspect that once I start scrolling through the chart with ctrl-leftmouse drag, this needs to be set again for ...
by dunabur
Thu Jul 13, 2017 2:22 pm
Forum: JFreeChart
Topic: Scrollable, autoadjustable financial chart
Replies: 9
Views: 1552

Re: Scrollable, autoadjustable financial chart

Here is the link for the data that the code uses: https://www.dropbox.com/s/rvsawn72dah2j ... g.csv?dl=0
by dunabur
Thu Jul 13, 2017 1:20 pm
Forum: JFreeChart
Topic: Scrollable, autoadjustable financial chart
Replies: 9
Views: 1552

Re: Scrollable, autoadjustable financial chart

Thanks for your reply paradoxoff. My code basically is candlestickdemo. I added some code to zoom into a subset of the data but Y axis values do not get updated to the visible min and max values on the chart. Now when I use ctrl-leftmouse drag, I can scroll horizontally, but again the Y axis does no...
by dunabur
Sat Jun 24, 2017 12:23 pm
Forum: JFreeChart
Topic: Scrollable, autoadjustable financial chart
Replies: 9
Views: 1552

Scrollable, autoadjustable financial chart

Hi everyone, I am trying to build a financial chart with features just like can be found in any chart program, the basic ones that it can be updated when new data arrives, that it can be scrolled, and that the chart autoadjusts to the visible highs and lows. The thing is that I am not sure what the ...