Page 1 of 1

How to import chart from xml file

Posted: Tue Sep 27, 2016 11:13 am
by 16578912
Hi,

In teeChart editor there is option to export chart to *.tee, *.xml or text file, but how to import chart from xml file or text file. I found only method to import *.tee file.

Best Regards,
Grzegorz

Re: How to import chart from xml file

Posted: Tue Sep 27, 2016 12:21 pm
by yeray
Hello Grzegorz,

You can not import full chart settings from XML/Text except you do it manually. However, you can import chart's series and data from an XML/Text file as shown in the All Features\Welcome!\Components\XML Import source and All Features\Welcome!\Components\Text Source examples at the Features Demo shipped with the binary installation.

Re: How to import chart from xml file

Posted: Wed Sep 28, 2016 6:02 am
by 16578912
Hi,

I found examples how to load data from xml but data xml have different structure eg. point element

Code: Select all

<chart>
<series title="C1 - Licznik energii cieplnej [GJ]" type="Liniowy" color="#4466A3">
<points count="2689">
<point  X="41306" Y="0,0934295654296875"/>
<point  X="41306,0104166667" Y="0,0934295654296875"/>
<point  X="41306,0208333333" Y="0,0933380126953125"/>
...
When exporting chart to xml (with data) the xml structure look like this

Code: Select all

  <TLineSeries>
    <Title value="'C1 - Licznik energii cieplnej [GJ]'"/>
    <Brush>
      <BackColor value="clDefault"/>
    </Brush>
    <InvertedStairs value="True"/>
    <Pointer>
      <InflateMargins value="True"/>
      <Style value="psRectangle"/>
    </Pointer>
    <Stairs value="True"/>
    <XValues>
      <DateTime value="True"/>
      <Name value="'X'"/>
      <Order value="loAscending"/>
      <ValueSource value="'dt_date'"/>
    </XValues>
    <YValues>
      <Name value="'Y'"/>
      <Order value="loNone"/>
      <ValueSource value="'dw_value_L'"/>
    </YValues>
    <Data>
      <String value="01810A000000000000402BE4400000000000EBB73F55555555402BE44000000"/>
      <String value="0000EBB73FABAAAAAA402BE4400000000000E5B73F00000000412BE44000000"/>
      <String value="0000A3B73F55555555412BE4400000000000B9B73FABAAAAAA412BE44000000"/>
      <String value="0000CCB73F00000000422BE440000000000012B83F55555555422BE44000000"/>
...


How one can use such exported file?
How to decode <Data> <String value="01810A000000000000402BE4400000000000EBB73F55555555402BE44000000"/>?
Did you provide some components to handle this format or it's only for future purpose?

Best Regards,
Grzegorz

Re: How to import chart from xml file

Posted: Wed Sep 28, 2016 10:41 am
by yeray
Hello Grzegorz,
Technicon wrote:How one can use such exported file?
This exportation allows you to obtain a readable xml output with the objects and properties defined in a chart, but the xml generated can't be imported.
The native option designed to be importable is the .tee, in binary or text format.