Gantt Y parameter ignored when importing XML data

TeeChart for ActiveX, COM and ASP
Post Reply
Norcom
Newbie
Newbie
Posts: 14
Joined: Wed Feb 09, 2005 5:00 am

Gantt Y parameter ignored when importing XML data

Post by Norcom » Fri May 07, 2010 7:37 am

Hello,

I am currently working on a very urgent project that dictates the use of a Gantt graph to display flights within a date/time period.
My problem is that TeeChart seems to ignore the Y="xx" parameter for same line display in the XML <point> line when importing the XML.
I tried adding manually a few entries to a gantt series (through the commander) and the Y parameter for same line worked fine.
Then, again from the commander, I exported the data as XML with all the options, created a new chart and re-imported the previously exported
XML file. As a result the Y parameter was ignored and the data imported wrongly.
This is the exported XML :

Code: Select all

<?xml version="1.0" encoding="ISO-8859-1"?>
<chart>
<series title="Series0" type="Gantt" color="#829BFE">
<points count="5">
<point index="0" text="SXOAB" Y="1" Start="40304,424" End="40304,465" NextTask="-1"/>
<point index="1" text="SXOAB" Y="1" Start="40304,479" End="40304,507" NextTask="-1"/>
<point index="2" text="SXOAA" Y="2" Start="40304,431" End="40304,458" NextTask="-1"/>
<point index="3" text="SXOAA" Y="2" Start="40304,479" End="40304,5"   NextTask="-1"/>
<point index="4" text="SXOAA" Y="2" Start="40304,993" End="40305,014" NextTask="-1"/>
</points>
</series>
</chart>
When the above XML is imported, the dates shown are around 1900 instead of 6th May 2010 and the data garbled.
I tried moving the Y parameter between the start and end lines as shown in the manual data entry table but no good.

Code: Select all

<?xml version="1.0" encoding="ISO-8859-1"?>
<chart>
<series title="Series0" type="Gantt" color="#829BFE">
<points count="5">
<point index="0" text="SXOAB" Start="40304,424" Y="1" End="40304,465" NextTask="-1"/>
<point index="1" text="SXOAB" Start="40304,479" Y="1" End="40304,507" NextTask="-1"/>
<point index="2" text="SXOAA" Start="40304,431" Y="2" End="40304,458" NextTask="-1"/>
<point index="3" text="SXOAA" Start="40304,479" Y="2" End="40304,5"   NextTask="-1"/>
<point index="4" text="SXOAA" Start="40304,993" Y="2" End="40305,014" NextTask="-1"/>
</points>
</series>
</chart>
If I remove the Y parameter from each and every line the data are imported correctly but they each gantt point is display on its own line
which is not the result I want.

I tried this with both the TeeChart 7.0.1.4 version and the evaluation version 8.0.0.6, both producing same wrong results. Both versions
seem to IGNORE the Y parameter.

Please, please, I need your urgent help as this project is very important and urgent.
Thank you very much for your cooperation.
Regards
George

Yeray
Site Admin
Site Admin
Posts: 9601
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: Gantt Y parameter ignored when importing XML data

Post by Yeray » Mon May 10, 2010 12:03 pm

Hi George,

The following code seems to work fine

Code: Select all

Private Sub Form_Load()
  TChart1.AddSeries scGantt
End Sub

Private Sub Command1_Click()
  TChart1.Series(0).asGantt.StartValues.DateTime = False
  TChart1.Series(0).asGantt.EndValues.DateTime = False

  With SeriesTextSource1
    .HeaderLines = 0
    .FieldSeparator = ";"
    .Fields.Clear
    .AddField "Start", 3
    .AddField "End", 4
    .AddField "Y", 2
    .AddField "Text", 1
    .AddField "NextTask", 5
    .Series = TChart1.Series(0)

    .LoadFromFile "C:\tmp\test.txt"
  End With
  
  TChart1.Series(0).asGantt.StartValues.DateTime = True
  TChart1.Series(0).asGantt.EndValues.DateTime = True
End Sub
With the following test.txt file:
C:\temp\test.txt wrote:"SXOAB";1;40304,424;40304,465;-1
"SXOAB";1;40304,479;40304,507;-1
"SXOAA";2;40304,431;40304,458;-1
"SXOAA";2;40304,479;40304,5;-1
"SXOAA";2;40304,993;40305,014;-1
Could you please confirm it?

Anyway, I've added it to the defect list to be fixed in future releases (TV52014873)
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

Post Reply