Print Page | Close Window

Chart Bug: Points sometimes have wrong x-position

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Toolkit Pro
Forum Description: Topics Related to Codejock Toolkit Pro
URL: http://forum.codejock.com/forum_posts.asp?TID=21749
Printed Date: 17 June 2025 at 2:01pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Chart Bug: Points sometimes have wrong x-position
Posted By: j_higs
Subject: Chart Bug: Points sometimes have wrong x-position
Date Posted: 26 June 2013 at 3:54pm
First off, I have been using CodeJock for over a year now and I have had a really great experience. Keep up the good work!

Recently I found a bug in the Chart component when the arguments (x-values as I call them) are of type DateTime. Certain times show up on the wrong x-position on the chart. I was able to reproduce this with a simple chart in the Chart Builder (Toolkit v16.1, Win7 64-bit) to make sure it was not my code causing the problem. Here is a screenshot of Chart Builder with the point values on the right:



If the chart were drawn correctly it would be a straight line from 0 to 72. You can see that 72 should be at x-position 01:12 AM but instead is at 12:05 AM. Also 36 should be at x-position 12:36 AM but instead is at 12:25 AM.

I have also attached the xml file that Chart Builder saved although I wasn't able to open it after I saved it.
http://forum.codejock.com/uploads/7337/vertical-line-bug.zip" rel="nofollow - uploads/7337/vertical-line-bug.zip

How can I get this problem fixed?



Replies:
Posted By: j_higs
Date Posted: 27 June 2013 at 9:44am
Update: I fixed the xml file so that it opens now.
uploads/7337/vertical-line-bug2.zip" rel="nofollow - uploads/7337/vertical-line-bug2.zip


Posted By: rhymes
Date Posted: 12 August 2013 at 6:12pm
Hi,

There is an existing problem in the CodeJock soure with the chart scaling that was notice in CodeJock version 15.3.1. Very simple fix; this may be your cause of your problem also. 

In Xtreme ToolkitPro v16.1.0
C:\Program Files (x86)\Codejock Software\MFC\Xtreme ToolkitPro v16.1.0 (30 Day Trial)\Source\Chart\Diagram\Axis\XTPChartScaleTypeMap.h

Still has:

class _XTP_EXT_CLASS CXTPChartTime
{
        enum
        {
                Seconds = 1000,
                Minutes = Seconds * 60,
                Hours  = Minutes * 24      <-- should be Minutes * 60
        };
public:
        CXTPChartTime(double dTime);
        CXTPChartTime(int nHours, int nMinutes, int nSeconds, int nMilliseconds);
        int GetHours() const;
        int GetMinutes() const;
        int GetSeconds() const;
        int GetMilliseconds() const;
        double m_dTime;
};



-------------
Rhymes


Posted By: j_higs
Date Posted: 20 August 2013 at 6:19pm
Hi ryhmes,

I checked the file that you mentioned, but I couldn't find the CXTPChartTime class. In fact I couldn't find that class anywhere in any of the source files. I'm currently using version 15.1.3.0908.



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net