Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Toolkit Pro
  New Posts New Posts RSS Feed - Chart Bug: Points sometimes have wrong x-position
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Chart Bug: Points sometimes have wrong x-position

 Post Reply Post Reply
Author
Message
j_higs View Drop Down
Newbie
Newbie


Joined: 17 February 2012
Status: Offline
Points: 5
Post Options Post Options   Thanks (0) Thanks(0)   Quote j_higs Quote  Post ReplyReply Direct Link To This Post Topic: Chart Bug: Points sometimes have wrong x-position
    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.
uploads/7337/vertical-line-bug.zip

How can I get this problem fixed?
Back to Top
j_higs View Drop Down
Newbie
Newbie


Joined: 17 February 2012
Status: Offline
Points: 5
Post Options Post Options   Thanks (0) Thanks(0)   Quote j_higs Quote  Post ReplyReply Direct Link To This Post Posted: 27 June 2013 at 9:44am
Update: I fixed the xml file so that it opens now.
uploads/7337/vertical-line-bug2.zip
Back to Top
rhymes View Drop Down
Newbie
Newbie
Avatar

Joined: 20 August 2010
Location: United States
Status: Offline
Points: 8
Post Options Post Options   Thanks (0) Thanks(0)   Quote rhymes Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
j_higs View Drop Down
Newbie
Newbie


Joined: 17 February 2012
Status: Offline
Points: 5
Post Options Post Options   Thanks (0) Thanks(0)   Quote j_higs Quote  Post ReplyReply Direct Link To This Post 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.
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.063 seconds.