From: tim.clearview on
I'm getting the same issue in CFMX7, it's driving me nuts. It's charting an
array of multiple values for 1 date. The array is ordered by date, but, as in
your example, the graph DOES NOT respect the date order provided by the array.
Furthermore, I can't see a pattern in where/why it's rearranging the data.

I may have to look for a different solution, which is terrible as I just
converted 30-odd charts to using CFChart after a Java solution was causing
problems.

Did you find a solution for this?



array
1 struct
1 2001-04-07 00:00:00.0
2 [empty string]
3 [empty string]

2 struct
1 2001-04-15 00:00:00.0
2 7.9
3 6.7

3 struct
1 2001-04-23 00:00:00.0
2 7.9
3 6.8

4 struct
1 2001-04-24 00:00:00.0
2 8.1
3 6.72

5 struct
1 2001-04-25 00:00:00.0
2 8.1
3 6.6

6 struct
1 2001-04-26 00:00:00.0
2 [empty string]
3 6.8

7 struct
1 2001-04-27 00:00:00.0
2 8.2
3 7.56666666667

8 struct
1 2001-04-30 00:00:00.0
2 [empty string]
3 6.98

9 struct
1 2001-05-01 00:00:00.0
2 [empty string]
3 6.7

10 struct
1 2001-05-02 00:00:00.0
2 7.7
3 6.725

11 struct
1 2001-05-03 00:00:00.0
2 8.15
3 7.05

12 struct
1 2001-05-04 00:00:00.0
2 [empty string]
3 7.4

13 struct
1 2001-05-05 00:00:00.0
2 7.775
3 6.92

14 struct
1 2001-05-14 00:00:00.0
2 7.65
3 7.25

15 struct
1 2001-05-15 00:00:00.0
2 8
3 7.125

16 struct
1 2001-05-17 00:00:00.0
2 [empty string]
3 6.38333333333

17 struct
1 2001-05-18 00:00:00.0
2 [empty string]
3 6.55

18 struct
1 2001-05-22 00:00:00.0
2 7.8
3 7.05

19 struct
1 2001-05-23 00:00:00.0
2 8.1
3 7.3625

20 struct
1 2001-05-24 00:00:00.0
2 [empty string]
3 [empty string]

21 struct
1 2001-05-29 00:00:00.0
2 [empty string]
3 6.8

22 struct
1 2001-05-30 00:00:00.0
2 8.2
3 6.83333333333

23 struct
1 2001-05-31 00:00:00.0
2 7.8
3 6.7

24 struct
1 2001-06-01 00:00:00.0
2 [empty string]
3 [empty string]

25 struct
1 2001-06-06 00:00:00.0
2 [empty string]
3 6.9

26 struct
1 2001-06-07 00:00:00.0
2 [empty string]
3 7.05

27 struct
1 2001-06-08 00:00:00.0
2 8
3 7.125

28 struct
1 2001-06-11 00:00:00.0
2 7.95
3 6.98333333333

29 struct
1 2001-06-12 00:00:00.0
2 7.7
3 7.13333333333

From: MikerRoo on
Your parse format must match the data!

Start with:
[b] <xAxis type="DateTime">
<labelFormat style="DateTimePattern" pattern="MMM dd, yyyy"/>
<parseFormat style="DateTimePattern" pattern="yyyy-MM-dd
hh:mm:ss"/>
<dateTimeStyle majorUnit="Day" minorUnit="Day"/>
<labelStyle isMultiline="false" isHideOverlapped="true"/>
</xAxis>
[/b]
in your xml style file.

Adjust dateTimeStyle to taste.


From: tim.clearview on
That works PERFECTLY in CFMX 7. Unfortunately, the site I'm working on is on an
MX 6.1 server, and 6.1 can't read a style file.

I've tried the following code, which DOES fix the ordering, but can't format
the dates other than the full odbc date-time string. If I un-comment
labelformat, it formats the Y axis as a date, which I don't want! If anyone can
tell me how to label the X Axis as a date in 6.1, I'd be grateful.

Also, one more big difference between 6.1 and 7 with dates on the X-Axis: On
7, it shows a range of dates properly, i.e. it shows all dates in a range,
evenly spaced, whether or not data is assigned. In 6.1, it only shows dates
with data. Any way to pad that out in 6.1?

<cfchart format="jpg"
showlegend="yes"
scalefrom="0"
scaleto="#varScaleTo#"
xAxisTitle = "#xAxisTitle#"
yAxisTitle = "#yAxisTitle#"
chartHeight = "300"
chartWidth = "750"
fontbold="yes"
fontsize="12"
seriesplacement="default"
<!--- labelformat="date" --->
labelmask="MM-DDD"
sortXAxis="yes"
xAxisType="DateTime"
<!--- style="chartStyle.xml" --->
>



From: MikerRoo on
This is a CF7 thread and I no longer support cfchart on CF6.
That said, you can try a scale axis instead of the category default.

If that doesn't work, you will need to pad the "gap" dates with fake values
(typically y=0).


From: tim.clearview on
OK, thanks. I added the date formatting in the chartseries creation, and that
took care of the formatting.

The only problem now is the interpolation between dates. The 6.1 Livedocs say
that it's fixed, but it isn't. I can't pad it with zero values, because that
makes the chart hideous (it plots the zeros).

I understand you don't support 6.1. Any idea where I can get that support?
Since they say the issue was fixed, I'd love to see if I'm just doing something
wrong and can get it working...

Thanks,

Tim