skip to main content
Developing with design tools > Using the Designer > XML file format > XML project file
 
XML project file
The Rogue Wave® JViews Charts project files are identified by a filename ending in " .icpr ".
A project file is an XML file, as in the following example:
 
<?xml version="1.0" encoding="UTF-8"?>
<chartConfiguration xmlns:xlink="http://www.w3.org/1999/xlink">
  <style xlink:href="myproject.css"/>
  <dataSource type="ilog.views.chart.data.IlvDefaultDataSource">
    <model>
      <chartData version="1.0">
        ...
      </chartData>
    </model>
  </dataSource>
</chartConfiguration>
There is no schema or DTD for this file format, because some parts can be extended in arbitrary ways by defining particular Java classes.
XML elements
The following tables describe the XML elements used in the example, their attributes, and subelements together with their attributes and subelements. Elements are enclosed in angle brackets (< >) in the code in accordance with XML conventions. The content dependent on each element must be terminated by an end tag denoted by a diagonal or solidus (/) followed by the same element name as the start element. For example:
 
<chartData> ... </chartData>
For a <property> element, you must give the name of the property (" propertyname ") and its value. The syntax is:
 
<property name="propertyname">value</property>
This section describes the following XML elements:
*The chartConfiguration element
*The style element
*The dataSource element
The chartConfiguration element
This element is the root element of a Charts project file. It represents a chart together with its data source and styling.
Example
 
<?xml version="1.0" encoding="UTF-8"?>
<chartConfiguration xmlns:xlink="http://www.w3.org/1999/xlink">
  <style xlink:href="myproject.css"/>
  <dataSource type="ilog.views.chart.data.IlvDefaultDataSource">
    <model>
      <chartData version="1.0">
        ...
      </chartData>
    </model>
  </dataSource>
</chartConfiguration>
The chartConfiguration Element
Element
Attribute
Default
Description
<chartConfiguration>
 
 
An entire IlvChart.
Count: 1.
Child elements: <style>, <dataSource>
The style element
This element represents some styling rules for a chart. Several <style> elements can appear. In this case, the corresponding CSS files are implicitly combined (cascaded).
Example
 
<style xlink:href="myproject.css"/>
The style Element
Element
Attribute
Default
Description
<style>3
 
 
A file with CSS rules.
Count: 0 or more.
 
xlink:href
required
URL of a CSS file. If it is a relative URL, it is interpreted as being relative to the project file.
The dataSource element
This element represents the data source connected to the chart.
Example
 
<dataSource type="ilog.views.chart.data.IlvDefaultDataSource">
  <model>
    <chartData version="1.0">
      ...
    </chartData>
  </model>
</dataSource>
The dataSource Element
Element
Attribute
Default
Description
<dataSource>
 
 
A data source.
Count: 0 or 1.
Child elements: depend on the type attribute.
 
type
required
Java class name of the data source.
The data source class must implement the IlvDataSource interface and must have a IlvChartConfiguration.IlvDataSourceXMLSerializer instance registered via IlvChartConfiguration.setDataSourceSerializer.
A data source serializer is already predefined for the following classes: IlvXMLDataSource, IlvJDBCDataSource, IlvDefaultDataSource, IlvSwingTableDataSource. The contents of the <dataSource> element depends on this class.
A <dataSource> element of the type IlvXMLDataSource has the following child elements:
 
Element
Attribute
Default
Description
<file>
 
 
A reference to a file containing a data source. See XML file format.
Count: 1.
 
location
required
The URL of the data file.
A <dataSource> element of the type IlvDefaultDataSource or IlvSwingTableDataSource has the following child elements:
 
Element
Attribute
Default
Description
<model>
 
 
A data source.
Count: 1.
Child elements: <chartData>
<chartData>
 
 
Data.
Count: 1
A <dataSource> element of the type IlvJDBCDataSource has the following child elements:
 
Element
Attribute
Default
Description
<connection>
 
 
The connection to the database.
Count: 1.
 
param
required
All connection parameters, packed together.
<mapping>
 
 
Mapping from columns to a data set..
 
xSeries
 
Name of the column containing the x-values.
 
ySeries
required
Names of the columns containing the y-values, as a comma-separated list of column names.
 
labels
 
Name of the column containing the x-labels.

Copyright © 2018, Rogue Wave Software, Inc. All Rights Reserved.