Jump to content
Software FX Community

Axis formatting


User (Legacy)

Recommended Posts

Hi,

In my ASP (uses Javascript) code, I am trying to set the minimum value for

the Y-Axis as follows

1. Axis=ChartFX1.Axis;

2. AxisY=ChartFX1.GetArrayProp("Item",AXIS_Y,Axis);

3. AxisY.Format = "M/d/yyyy";

4.

5. var dtmDate = new Date(rstADO(0));

6. var dtmNewDate = (dtmDate.getMonth()+1) + "/" + dtmDate.getDate() +

"/" + dtmDate.getFullYear();

7.

8. AxisY.Min = dtmNewDate;

When I run the code, the following ASP error appears:

-------------------------------------------

Microsoft JScript runtime (0x800A000D)

Type mismatch

/apart/js/chartfunctions.asp, line 596

---------------------------------------------------

And the error is on line 8 in the above code.

Any suggestions

Thanks a bunch in advance,

Sri

Link to comment
Share on other sites

The Min property receives a Double (floating point number), you are trying

to pass a string.

I'm not sure how to convert a date to a VariantTime the type expected by COM

objects. Here is the definition of VariantTime from MSDN:

"A variant time is stored as an 8-byte real value (double), representing a

date between January 1, 100 and December 31, 9999, inclusive. The value 2.0

represents January 1, 1900; 3.0 represents January 2, 1900, and so on.

Adding 1 to the value increments the date by a day. The fractional part of

the value represents the time of day. Therefore, 2.5 represents noon on

January 1, 1900; 3.25 represents 6:00 A.M. on January 2, 1900, and so on.

Negative numbers represent the dates prior to December 30, 1899."

I did not found anything in MSDN that told me how to convert a Java Date to

a VariantTime. I'll keep looking, let me know if you find something on your

side.

--

FP

Software FX, Inc.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...