New to Telerik Reporting? Download free 30-day trial

Create Custom-Shaped Marker for Graph's Legend Items

Environment

Product Progress® Telerik® Reporting
Report Item Graph

Description

The Graph uses the same markers for its series and their respective legend items. Occasionally, it makes sense to substitute the legend markers with custom ones for a better presentation effect.

Solution

This can be achieved using a background image that supports transparency (i.e. PNG) and set it as LegendItem.MarkStyle.BackgroundImage.

The transparent area on the image will allow the default series color to be displayed on the legend marker.

Using this approach, the pie chart legend can be presented using circular marks, as shown below:

Preview

Notes

The default series marker is created using drawing path primitives, therefore it is scalable without quality loss. Using a background image, however, might lead to distorted images on higher zoom levels, because of the resized raster images.

In this article