jfreechart based strip chart does to set scale or start

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
wolfsonga@gmail.com
Posts: 1
Joined: Sat Apr 02, 2016 8:06 pm
antibot: No, of course not.

jfreechart based strip chart does to set scale or start

Post by wolfsonga@gmail.com » Sat Apr 02, 2016 8:22 pm

Hi,
I am running a java application called JMRI as a model railroader and it supports using jython developed scripts as a mechanism for making tools using the model railroad dcc network library in a protocol called LocoNet. I have created a strip chart display program using jfreechart with jython and it launches okay but the chart comes up with some default scale and the incoming data stream not be plotted as a time series. If I right mouse click on the plot by the legend at the bottom, a dialog box appears and I can select "Auto Range -> Domain Axis" from the menu and this triggers something internally which causes the scales to adjust to the values I set when creating the panel and starts plotting the data stream including any which may have come in prior to my making the selection from the dialog box. My question is, can you tell me what gets triggered and what would be the call I would have to make as the last line of my program main to kick off the update of the plot and the start of running?
Thanks,
=gerry=

david.gilbert
JFreeChart Project Leader
Posts: 11734
Joined: Fri Mar 14, 2003 10:29 am
antibot: No, of course not.
Contact:

Re: jfreechart based strip chart does to set scale or start

Post by david.gilbert » Sun Apr 03, 2016 7:28 am

The code will find a reference to the domain axis (which it can get from the plot) and then calls:

Code: Select all

domainAxis.setAutoRange(true);
David Gilbert
JFreeChart Project Leader

:idea: Read my blog
:idea: Support JFree via the Github sponsorship program

Locked