Page 1 of 1

Problem loading data with XmlSource

Posted: Wed Apr 06, 2005 9:32 pm
by 8884430
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>

Posted: Thu May 12, 2005 8:59 pm
by Pep
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.

Posted: Thu May 12, 2005 9:00 pm
by Pep
.. forgot to tell that using the correct format should work fine. If you still having problems do not hesitate to let us know.

Posted: Fri Mar 03, 2006 10:48 am
by 9637396
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

Posted: Fri Mar 03, 2006 11:04 am
by narcis
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.