CDL Basics


CDL is a collection of plain text parameters that describe a chart. In the most general form, CDL parameters are presented in a name=value style syntax. Parameter names come from a defined set of CDL names, such as Background, Header, DataSet1, and so on. The value consists of one or more attributes.

Attributes are single primitive values that can be combined to form a complete value for a CDL parameter. For example,

Background = (Color, BorderType, BorderWidth, "ImageURL", ImageFormat, BorderColor);

In the above example, the parameter Background has 6 attributes. Those attributes are Color, BorderType, BorderWidth, ImageURL, ImageFormat, and BorderColor. An example of using the Background parameter would be:

Background = (white, RAISED, 2);

The background of the chart would be white with a 2-pixel raised border.

CDL Statement Types

CDL Syntax Rules



CDX Behavior


CDX, also known as dynamic CDL, allows users to change the contents of CDL just before rendering. When the caller requests a chart (via API or URL query string), they provide a list of name-value pairs. For each name in the list, NetCharts Server replaces all instances of that name in the CDL file with the associated value. After the replacement, the chart is rendered. CDX variable names are limited to contiguous alphanumeric text. The variables can be used to replace one or more CDL parameters, or CDL parameter fragments.