Problem loading data with XmlSource

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
johnk
Newbie
Newbie
Posts: 8
Joined: Mon Oct 04, 2004 4:00 am

Problem loading data with XmlSource

Post by johnk » Wed Apr 06, 2005 9:32 pm

I'm trying to load multiple bar series with XmlSource. I think the xml is correct but the bars for each of the series are exactly the same with stack marks on them. After loading the data I exported it so you could see the problem. Also where can I find documentation on the correct format for xml data?

Code: Select all

XmlSource Steema.TeeChart.Data.XmlSource xmlsource = new Steema.TeeChart.Data.XmlSource(this.tChart.Chart);
xmlsource.Load("dataFile.xml");
imported dataFile.xml

Code: Select all

<chart>
  <series title="Bar1" type="Bar">
    <points count="6">
      <point text="f1" X="100" Y="0.99"/>
      <point text="f2-2f1" X="2800" Y="0.25"/>
      <point text="f2-f1" X="2900" Y="0.5"/>
      <point text="f2" X="3000" Y="0.98"/>
      <point text="f2+f1" X="3100" Y="0.54"/>
      <point text="f2+2f1" X="3200" Y="0.22"/>
    </points>
  </series>
  <series title="Bar2" type="Bar">
    <points count="6">
      <point text="f1" X="100" Y="0.78"/>
      <point text="f2-2f1" X="2800" Y="0.5"/>
      <point text="f2-f1" X="2900" Y="0.2"/>
      <point text="f2" X="3000" Y="0.65"/>
      <point text="f2+f1" X="3100" Y="0.35"/>
      <point text="f2+2f1" X="3200" Y="0.42"/>
    </points>
  </series>
  <series title="Bar3" type="Bar">
    <points count="6">
      <point text="f1" X="100" Y="0.93"/>
      <point text="f2-2f1" X="2800" Y="0.23"/>
      <point text="f2-f1" X="2900" Y="0.4"/>
      <point text="f2" X="3000" Y="0.84"/>
      <point text="f2+f1" X="3100" Y="0.48"/>
      <point text="f2+2f1" X="3200" Y="0.17"/>
    </points>
  </series>
  <series title="Bar4" type="Bar">
    <points count="6">
      <point  index="0" text="f1" X="100" Y="0.94"/>
      <point  index="1" text="f2-2f1" X="2800" Y="0.22"/>
      <point  index="2" text="f2-f1" X="2900" Y="0.4"/>
      <point  index="3" text="f2" X="3000" Y="0.8"/>
      <point  index="4" text="f2+f1" X="3100" Y="0.55"/>
      <point  index="5" text="f2+2f1" X="3200" Y="0.24"/>
    </points>
  </series>
</chart>
exported xml after loading dataFile.xml

Code: Select all

<chart>
  <series title="Bar1" type="Bar">
    <points count="24">
      <point  text="f1" X="100" Y="0.99"/>
      <point  text="f2-2f1" X="100" Y="0.78"/>
      <point  text="f2-f1" X="100" Y="0.93"/>
      <point  text="f2" X="100" Y="0.94"/>
      <point  text="f2+f1" X="2800" Y="0.25"/>
      <point  text="f2+2f1" X="2800" Y="0.5"/>
      <point  text="f1" X="2800" Y="0.23"/>
      <point  text="f2-2f1" X="2800" Y="0.22"/>
      <point  text="f2-f1" X="2900" Y="0.5"/>
      <point  text="f2" X="2900" Y="0.2"/>
      <point  text="f2+f1" X="2900" Y="0.4"/>
      <point  text="f2+2f1" X="2900" Y="0.4"/>
      <point  text="f1" X="3000" Y="0.98"/>
      <point  text="f2-2f1" X="3000" Y="0.65"/>
      <point  text="f2-f1" X="3000" Y="0.84"/>
      <point  text="f2" X="3000" Y="0.8"/>
      <point  text="f2+f1" X="3100" Y="0.54"/>
      <point  text="f2+2f1" X="3100" Y="0.35"/>
      <point  text="f1" X="3100" Y="0.48"/>
      <point  text="f2-2f1" X="3100" Y="0.55"/>
      <point  text="f2-f1" X="3200" Y="0.22"/>
      <point  text="f2" X="3200" Y="0.42"/>
      <point  text="f2+f1" X="3200" Y="0.17"/>
      <point  text="f2+2f1" X="3200" Y="0.24"/>
    </points>
  </series>

<series title="Bar2" type="Bar">
  <points count="24">
    <point  text="f1" X="100" Y="0.99"/>
      <point  text="f2-2f1" X="100" Y="0.78"/>
      <point  text="f2-f1" X="100" Y="0.93"/>
      <point  text="f2" X="100" Y="0.94"/>
      <point  text="f2+f1" X="2800" Y="0.25"/>
      <point  text="f2+2f1" X="2800" Y="0.5"/>
      <point  text="f1" X="2800" Y="0.23"/>
      <point  text="f2-2f1" X="2800" Y="0.22"/>
      <point  text="f2-f1" X="2900" Y="0.5"/>
      <point  text="f2" X="2900" Y="0.2"/>
      <point  text="f2+f1" X="2900" Y="0.4"/>
      <point  text="f2+2f1" X="2900" Y="0.4"/>
      <point  text="f1" X="3000" Y="0.98"/>
      <point  text="f2-2f1" X="3000" Y="0.65"/>
      <point  text="f2-f1" X="3000" Y="0.84"/>
      <point  text="f2" X="3000" Y="0.8"/>
      <point  text="f2+f1" X="3100" Y="0.54"/>
      <point  text="f2+2f1" X="3100" Y="0.35"/>
      <point  text="f1" X="3100" Y="0.48"/>
      <point  text="f2-2f1" X="3100" Y="0.55"/>
      <point  text="f2-f1" X="3200" Y="0.22"/>
      <point  text="f2" X="3200" Y="0.42"/>
      <point  text="f2+f1" X="3200" Y="0.17"/>
      <point  text="f2+2f1" X="3200" Y="0.24"/>
    </points>
  </series>

  <series title="Bar3" type="Bar">
    <points count="24">
      <point  text="f1" X="100" Y="0.99"/>
      <point  text="f2-2f1" X="100" Y="0.78"/>
      <point  text="f2-f1" X="100" Y="0.93"/>
      <point  text="f2" X="100" Y="0.94"/>
      <point  text="f2+f1" X="2800" Y="0.25"/>
      <point  text="f2+2f1" X="2800" Y="0.5"/>
      <point  text="f1" X="2800" Y="0.23"/>
      <point  text="f2-2f1" X="2800" Y="0.22"/>
      <point  text="f2-f1" X="2900" Y="0.5"/>
      <point  text="f2" X="2900" Y="0.2"/>
      <point  text="f2+f1" X="2900" Y="0.4"/>
      <point  text="f2+2f1" X="2900" Y="0.4"/>
      <point  text="f1" X="3000" Y="0.98"/>
      <point  text="f2-2f1" X="3000" Y="0.65"/>
      <point  text="f2-f1" X="3000" Y="0.84"/>
      <point  text="f2" X="3000" Y="0.8"/>
      <point  text="f2+f1" X="3100" Y="0.54"/>
      <point  text="f2+2f1" X="3100" Y="0.35"/>
      <point  text="f1" X="3100" Y="0.48"/>
      <point  text="f2-2f1" X="3100" Y="0.55"/>
      <point  text="f2-f1" X="3200" Y="0.22"/>
      <point  text="f2" X="3200" Y="0.42"/>
      <point  text="f2+f1" X="3200" Y="0.17"/>
      <point  text="f2+2f1" X="3200" Y="0.24"/>
    </points>
  </series>

  <series title="Bar4" type="Bar">
    <points count="24">
      <point  text="f1" X="100" Y="0.99"/>
      <point  text="f2-2f1" X="100" Y="0.78"/>
      <point  text="f2-f1" X="100" Y="0.93"/>
      <point  text="f2" X="100" Y="0.94"/>
      <point  text="f2+f1" X="2800" Y="0.25"/>
      <point  text="f2+2f1" X="2800" Y="0.5"/>
      <point  text="f1" X="2800" Y="0.23"/>
      <point  text="f2-2f1" X="2800" Y="0.22"/>
      <point  text="f2-f1" X="2900" Y="0.5"/>
      <point  text="f2" X="2900" Y="0.2"/>
      <point  text="f2+f1" X="2900" Y="0.4"/>
      <point  text="f2+2f1" X="2900" Y="0.4"/>
      <point  text="f1" X="3000" Y="0.98"/>
      <point  text="f2-2f1" X="3000" Y="0.65"/>
      <point  text="f2-f1" X="3000" Y="0.84"/>
      <point  text="f2" X="3000" Y="0.8"/>
      <point  text="f2+f1" X="3100" Y="0.54"/>
      <point  text="f2+2f1" X="3100" Y="0.35"/>
      <point  text="f1" X="3100" Y="0.48"/>
      <point  text="f2-2f1" X="3100" Y="0.55"/>
      <point  text="f2-f1" X="3200" Y="0.22"/>
      <point  text="f2" X="3200" Y="0.42"/>
      <point  text="f2+f1" X="3200" Y="0.17"/>
      <point  text="f2+2f1" X="3200" Y="0.24"/>
    </points>
  </series>

</chart>

Pep
Site Admin
Site Admin
Posts: 3303
Joined: Fri Nov 14, 2003 5:00 am
Contact:

Post by Pep » Thu May 12, 2005 8:59 pm

Hi John,

you can see one example (which show you the format you must use) in the Demo features project (included into the TeeChart for Net installation)under : What's New -> Welcome ! -> New Components -> Series XMLSource.

Pep
Site Admin
Site Admin
Posts: 3303
Joined: Fri Nov 14, 2003 5:00 am
Contact:

Post by Pep » Thu May 12, 2005 9:00 pm

.. forgot to tell that using the correct format should work fine. If you still having problems do not hesitate to let us know.

Lars Iversen
Newbie
Newbie
Posts: 61
Joined: Wed Jun 22, 2005 4:00 am
Location: cph

Post by Lars Iversen » Fri Mar 03, 2006 10:48 am

But Pep

As you can see, john is asking for the documentation of the XML format.
I would also like to have the full documentation of that format. Does such a thing exist?

Thanks in advance
Lars Iversen

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Fri Mar 03, 2006 11:04 am

Hi Lars,

You should look at TeeChart's tutorials (Tutorial 12 - Exporting and Importing Charts, section Exporting data) and help files. Both can be found at TeeChart's program group.
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Post Reply