ASE Home Page Products Download Purchase Support About ASE
ChartDirector Support
Forum HomeForum Home   SearchSearch

Message ListMessage List     Post MessagePost Message

  Zoom chart - data points lining up between tick marks
Posted by Tom Avakian on Feb-06-2014 03:53
I'm working on a zoom chart using viewpoints that I modified from the Zooming and Scrolling example and am running into an issue that I really need help with. I am graphing several stats on two axis's (one axis percent and the other whole numbers) and have the program working where I can zoom in and out.

The issue is that the datapoints are lining up between tick marks. I believe that this is due to the fact that when I associate the date field to timeStamps using the command:

timeStamps = cd.NTime2(DbTable.getCol(0))

it is creating a time portion of the field. When I print out the following command:

debug.print timeStamps(0), I get "12/18/2013 11:33:46 AM "

I think the 11:33am is between the 12/18 and 12/19, which is why it is graphing that point between the two tick marks.

Is there any way to get around this? I don' t care about the time field. I just want the tick marks to match up to the data points.

Also, I have tried changing the date field in the SQL statement using cDate(cDbl(date)), but that didn't help.

Thanks,
Tom

  Re: Zoom chart - data points lining up between tick marks
Posted by Tom Avakian on Feb-06-2014 05:02
I finally figured it out.

I changed this:

viewPortTimeStamps = cd.arraymath(timeStamps,Trim(startIndex, noOfPoints).result()

to this

viewPortTimeStamps = cd.arraymath(DbTable.getCol(0)).Trim(startIndex, noOfPoints).result()

Guess setting timeStamps = cd.NTime(DbTable.getCol(0))  was causing the issue. When I directly refered to DbTable.getCol(0), the data points lined up.