Chart Elements
  • 03 Sep 2024
  • 3 Minutes to read
  • Dark
    Light

Chart Elements

  • Dark
    Light

Article summary

General

A chart element can be used to export the graphical representation of the visualization of a Datasource object.

Example: A chart element can be used to export a bar chart from a Datasource.

The content exported to the report document will be a graphic (an image).

Properties

Chart elements have the following properties:

Name

Description
NameThe name of the chart element. This name will be displayed in the tree hierarchy of the content explorer of the Report Designer.
CodeThe code of the chart element. There must be no other report element within the same report with the same code. The code is used to reference the report element from within a Template (see below).
ConditionAn optional condition Expression; if it returns True or 1 the condition is considered to be fulfilled and the chart will be included in the report document. If it returns something other than True or 1 the exclusion settings (see below) will be applied. If you leave this property empty, the condition is considered to be always fulfilled. The condition expression is evaluated after the preparation Actions of the chart element have been executed.
Preparation ActionsA list of Actions that will be executed before the chart element will be processed.
Fail On Filter ExceptionDetermines what shall happen if an exception occurs when executing a preparation action that performs a filter (e.g. because the value to which you want to filter does not exist). When enabled, an exception will be thrown and the report document creation will be cancelled; when disabled, the exclusion settings (see below) will be applied.
ObjectThe Datasource object whose graphical representation to export to the report document.
QualityThe quality (DPI) used when exporting the graphic to the report document; the higher the quality, the higher the zoom factor where the image is still sharp.
Scale %The scale percentage used when exporting the graphic. If you choose values lower than 100 %, the chart will be extracted with a larger size than the placeholder in the template and then scaled down to fit the placeholder size. When setting a value higher than 100 % the chart will be extracted with a smaller size than the placeholder and then scaled up.
Show TitleWhen enabled, the title of the chart will be included in the exported graphic, otherwise, not. Not all Datasource objects support titles to be shown or hidden.
Cropping ModeDo Not Crop. When selecting this option, no cropping will take place.

Manual. When selecting this option you can manually specify the amount of pixels to crop on either side of the graphic; the exported graphic may be smaller than the placeholder in the image.

Automatic. When selecting this option Mail & Deploy will automatically remove all white areas around the chart. This may lead to the exported graphic to be smaller than the placeholder in the template.
Top CropThe amount of pixels to cut off from the top of the exported graphic. This property is only applicable if the Cropping Mode property is set to Custom.
Bottom CropThe amount of pixels to cut off from the bottom of the exported graphic. This property is only applicable if the Cropping Mode property is set to Custom.
Left CropThe amount of pixels to cut off at the left side of the exported graphic. This property is only applicable if the Cropping Mode property is set to Custom.
Right CropThe amount of pixels to cut off at the right side of the exported graphic. This property is only applicable if the Cropping Mode property is set to Custom.
Exclusion BehaviorExclude Element. When choosing this option and the chart needs to be excluded, the graphic will simply be ommitted from the output and an optional replacement text (see below) may be inserted.
Replacement TextAn optional Expression that evaluates to a string that contains the replacement text to insert into the report document when the chart element needs to be excluded (e.g. if the condition is not fulfilled).

Insertion

You can insert the placeholder for the chart element by dragging and dropping the report element from the content explorer of the Report Designer into the template. You will then see a placeholder image within the template that you can position and resize to the desired output size.

NOTE

If you change the code of a chart element after you have inserted the placeholder into the template, you need to remove the placeholder from the template and insert the chart element again. Otherwise error messages will occur when creating the report document.


Was this article helpful?