After loading an Image Template file and data, Corda Server™ lets you make additional modifications to a Corda® image. For example, adding or hiding a textbox or shape; changing the colors for ranges, default shapes, data series, or symbols; and adding a logo to the Corda image. These on-the-fly Image Template file modifications are known as ITXML Transformations.
Important: This section assumes an understanding of XML usage. For a brief XML overview, see XML Notations and Conventions.
To generate ITXML transformations, use the same commands as those used for generating dynamic data: loadITXML, addITXML, and @_LOADITXML.
This section contains the following topics:
One type of ITXML transformation is to customize or override settings for objects already in the Image Template file. Do this by creating a ITXML property that is named exactly the same as the object you want to customize. Then, specify the attributes or properties to modify or override.
One transformation we've already seen was changing the data with ITXML (see Using ITXML with Corda Embedder). Although at the time we said we were adding data to the Image Template file, in actuality we were overriding data that was already in the Image Template file.
There are many ways to customize the Image Template file; however, the following sections explore just a few of these customizations.
To move an object, simply change the top and left values of the object's common attribute. For example, to move a bar graph named graph, use ITXML similar to the following:
myImage.addITXML("<cit:bar-graph name=’graph’ common=’top:10;left:10’>")
To change a map's default label characteristics, use the <cit:default-shape> property, and set the Font attribute of in <cit:label>. For example:
myImage.addITXML("<cit:layer name=’State’> <cit:default-shape> <cit:label Font=’Name:TimesRoman; Size:16’/> </cit:default-shape> </cit:layer>")
To redefine a map range's maximum and minimum value, access the appropriate <cit:map-range> property and change the maximum and minimum values. For example, the following could be placed in the PCScript:
ID.addITXML("<cit:layer name=’County’> <cit:map-ranges> <cit:map-range name=’Lowest 25%’ minimum=’0.0’ maximum=’25.0’/> </cit:map-ranges> </cit:layer>")
Another common transformation is to change the formatting for a data series. To override, for example, the color setting for the second series in a bar graph, do the following:
myImage.addITXML(“<cit:bar-graph name=’graph’> <cit:bar-series number=’2’ color=’red’/>)

Another type of ITXML transformation is to add a new object to the Image Template file.
Note: When adding objects to an Image Template file, give them distinct names (names that are not already being used).
For example, you have a ITXML logo file saved as <document_root>\image_templates\examples\images\companylogo.itxml. To have Corda Server add this logo to any Corda image you create, add the following line to the Corda Embedder code:
myImage.loadITXML("image_templates\examples\images\companylogo.itxml");
Note: The logo.itxml file is included with the Corda 7 installation, so including this line in sample code inserts the Corda logo.
As another example, suppose you want to add a timestamp to all the Corda images you display. If you've put the timestamp into a string called timestamp, you can create a new textbox with the timestamp with the following Corda Embedder command:
myImage.addITXML("<cit:textbox name='timestamp' common='top:20;left:420;width:100;height:40'><cit:text content='"+timestamp+"'/></cit:textbox>");
Note: It is possible to create an Image Template file entirely on the fly. When doing this, remember to send the data for a graph AFTER it is created. In other words, swap the order of the ITXML transformations and the loading of ITXML data. Sample data is used with any graph for which Corda 7 does not have a <cit:graph-data> property.