User (Legacy) Posted May 24, 2006 Report Share Posted May 24, 2006 I'm dealing with a scatter chart with a x-axis holding date values. The minimunm and maximum values of the axis should be set to certain dates. I've noticed that the minimum value varies from call to call of the application. Therefore I've written a small test class [1] to investigate. The class simply converts a given date (represented by a GregorianCalendar) 2006-05-01 to a double value needed by ChartFX to be set as minimum of the x-axis. The double value is logged to a file with the following content: 2006-05-24 14:55:55,140: main - 2006-05-01: 38837.99999855324 2006-05-24 14:55:59,656: main - 2006-05-01: 38837.99999240741 2006-05-24 14:56:02,953: main - 2006-05-01: 38837.99998896991 2006-05-24 14:56:04,921: main - 2006-05-01: 38837.99998934028 2006-05-24 15:00:00,765: main - 2006-05-01: 38837.999991145836 Obviously the method Chart.dateToNumber(Calendar) returns different values each call. This leads to varying start dates in the cahrt if Chart.getAxisX().setMin(value) is used. Every other call the starting date is 2006-04-30 instead of 2006-05-01. I'm using Chart FX for Java 6.2 (chartfx.jar: 6.2.2266.27659). Shouldn't the method return the same value each time? Do I miss something here? Regards, Kurt [1]: import java.util.Calendar; import java.util.GregorianCalendar; import org.apache.log4j.Logger; import SoftwareFX.ChartFX.Chart; public class Date2NumberTest { private final static Logger log = Logger.getLogger(Date2NumberTest.class.getName()); public static void main(String[] args) { Calendar start = new GregorianCalendar(2006,4,1,0,0,0); double number = Chart.dateToNumber(start); log.info("2006,4,1: "+number); } } Link to comment Share on other sites More sharing options...
Software FX Posted May 30, 2006 Report Share Posted May 30, 2006 Hi, it seems there is something wrong indeed, I have submited a bug report and I'll get a developer to take a look. I'll let you know as soon as possible. Regards, GA "DI Kurt Edegger" <news_tmp1@edegger.com> wrote in message news:$S6q2JzfGHA.1560@webserver3.softwarefx.com... > I'm dealing with a scatter chart with a x-axis holding date values. The > minimunm and maximum values of the axis should be set to certain dates. > I've noticed that the minimum value varies from call to call of the > application. > Therefore I've written a small test class [1] to investigate. The class > simply converts a given date (represented by a GregorianCalendar) > 2006-05-01 to a double value needed by ChartFX to be set as minimum of the > x-axis. The double value is logged to a file with the following content: > > 2006-05-24 14:55:55,140: main - 2006-05-01: 38837.99999855324 > 2006-05-24 14:55:59,656: main - 2006-05-01: 38837.99999240741 > 2006-05-24 14:56:02,953: main - 2006-05-01: 38837.99998896991 > 2006-05-24 14:56:04,921: main - 2006-05-01: 38837.99998934028 > 2006-05-24 15:00:00,765: main - 2006-05-01: 38837.999991145836 > > Obviously the method Chart.dateToNumber(Calendar) returns different values > each call. This leads to varying start dates in the cahrt if > Chart.getAxisX().setMin(value) is used. Every other call the starting date > is 2006-04-30 instead of 2006-05-01. > > I'm using Chart FX for Java 6.2 (chartfx.jar: 6.2.2266.27659). > > Shouldn't the method return the same value each time? Do I miss something > here? > > Regards, Kurt > > > [1]: > import java.util.Calendar; > import java.util.GregorianCalendar; > import org.apache.log4j.Logger; > import SoftwareFX.ChartFX.Chart; > > public class Date2NumberTest { > > private final static Logger log = > Logger.getLogger(Date2NumberTest.class.getName()); > > public static void main(String[] args) { > Calendar start = new GregorianCalendar(2006,4,1,0,0,0); > double number = Chart.dateToNumber(start); > log.info("2006,4,1: "+number); > } > } Link to comment Share on other sites More sharing options...
Software FX Posted June 8, 2006 Report Share Posted June 8, 2006 Hi, we have fixed this bug, it'll be included in the next service pack. Regards, Gabriel "SoftwareFX Support" <noreply> wrote in message news:RL$%23XgDhGHA.1560@webserver3.softwarefx.com... > Hi, it seems there is something wrong indeed, I have submited a bug report > and I'll get a developer to take a look. I'll let you know as soon as > possible. > > Regards, > GA > > > "DI Kurt Edegger" <news_tmp1@edegger.com> wrote in message > news:$S6q2JzfGHA.1560@webserver3.softwarefx.com... >> I'm dealing with a scatter chart with a x-axis holding date values. The >> minimunm and maximum values of the axis should be set to certain dates. >> I've noticed that the minimum value varies from call to call of the >> application. >> Therefore I've written a small test class [1] to investigate. The class >> simply converts a given date (represented by a GregorianCalendar) >> 2006-05-01 to a double value needed by ChartFX to be set as minimum of >> the x-axis. The double value is logged to a file with the following >> content: >> >> 2006-05-24 14:55:55,140: main - 2006-05-01: 38837.99999855324 >> 2006-05-24 14:55:59,656: main - 2006-05-01: 38837.99999240741 >> 2006-05-24 14:56:02,953: main - 2006-05-01: 38837.99998896991 >> 2006-05-24 14:56:04,921: main - 2006-05-01: 38837.99998934028 >> 2006-05-24 15:00:00,765: main - 2006-05-01: 38837.999991145836 >> >> Obviously the method Chart.dateToNumber(Calendar) returns different >> values each call. This leads to varying start dates in the cahrt if >> Chart.getAxisX().setMin(value) is used. Every other call the starting >> date is 2006-04-30 instead of 2006-05-01. >> >> I'm using Chart FX for Java 6.2 (chartfx.jar: 6.2.2266.27659). >> >> Shouldn't the method return the same value each time? Do I miss something >> here? >> >> Regards, Kurt >> >> >> [1]: >> import java.util.Calendar; >> import java.util.GregorianCalendar; >> import org.apache.log4j.Logger; >> import SoftwareFX.ChartFX.Chart; >> >> public class Date2NumberTest { >> >> private final static Logger log = >> Logger.getLogger(Date2NumberTest.class.getName()); >> >> public static void main(String[] args) { >> Calendar start = new GregorianCalendar(2006,4,1,0,0,0); >> double number = Chart.dateToNumber(start); >> log.info("2006,4,1: "+number); >> } >> } > > Link to comment Share on other sites More sharing options...
Software FX Posted June 14, 2006 Report Share Posted June 14, 2006 Hi, I just wanted to let you know that we have released a service pack version 6.2.2354 that includes the fix of this issue. Regards, GA "SoftwareFX Support" <noreply> wrote in message news:7BO0%23DwiGHA.492@webserver3.softwarefx.com... > Hi, we have fixed this bug, it'll be included in the next service pack. > > Regards, > Gabriel > > > "SoftwareFX Support" <noreply> wrote in message > news:RL$%23XgDhGHA.1560@webserver3.softwarefx.com... >> Hi, it seems there is something wrong indeed, I have submited a bug >> report and I'll get a developer to take a look. I'll let you know as >> soon as possible. >> >> Regards, >> GA >> >> >> "DI Kurt Edegger" <news_tmp1@edegger.com> wrote in message >> news:$S6q2JzfGHA.1560@webserver3.softwarefx.com... >>> I'm dealing with a scatter chart with a x-axis holding date values. The >>> minimunm and maximum values of the axis should be set to certain dates. >>> I've noticed that the minimum value varies from call to call of the >>> application. >>> Therefore I've written a small test class [1] to investigate. The class >>> simply converts a given date (represented by a GregorianCalendar) >>> 2006-05-01 to a double value needed by ChartFX to be set as minimum of >>> the x-axis. The double value is logged to a file with the following >>> content: >>> >>> 2006-05-24 14:55:55,140: main - 2006-05-01: 38837.99999855324 >>> 2006-05-24 14:55:59,656: main - 2006-05-01: 38837.99999240741 >>> 2006-05-24 14:56:02,953: main - 2006-05-01: 38837.99998896991 >>> 2006-05-24 14:56:04,921: main - 2006-05-01: 38837.99998934028 >>> 2006-05-24 15:00:00,765: main - 2006-05-01: 38837.999991145836 >>> >>> Obviously the method Chart.dateToNumber(Calendar) returns different >>> values each call. This leads to varying start dates in the cahrt if >>> Chart.getAxisX().setMin(value) is used. Every other call the starting >>> date is 2006-04-30 instead of 2006-05-01. >>> >>> I'm using Chart FX for Java 6.2 (chartfx.jar: 6.2.2266.27659). >>> >>> Shouldn't the method return the same value each time? Do I miss >>> something here? >>> >>> Regards, Kurt >>> >>> >>> [1]: >>> import java.util.Calendar; >>> import java.util.GregorianCalendar; >>> import org.apache.log4j.Logger; >>> import SoftwareFX.ChartFX.Chart; >>> >>> public class Date2NumberTest { >>> >>> private final static Logger log = >>> Logger.getLogger(Date2NumberTest.class.getName()); >>> >>> public static void main(String[] args) { >>> Calendar start = new GregorianCalendar(2006,4,1,0,0,0); >>> double number = Chart.dateToNumber(start); >>> log.info("2006,4,1: "+number); >>> } >>> } >> >> > > Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.