ActiveReports 8
Label Symbols
Show AllShow All
Hide AllHide All

You can use Labels in Chart markers or legends.

By default, marker labels display Y value of data points, whereas legend labels display series name or data name.

Setting Strings

You can change a string (format string) displayed in a marker or legend label.

To change a string in a marker label

To change a string in a legend label

Symbols

It is possible to easily display constant strings by simply performing the above mentioned settings. To display data, you need to embed the section (placeholder) that displays the value within format string at runtime.

A placeholder is a particular symbol enclosed within brackets {}.

The following symbols can be used. The sections enclosed within {} are changed by values.

Value

   Data Value(Y value)

Pct

   Percentage within series

PPct

   Percentage having 100% as sum of multiple series for data points.

Name

   X value of data

Index

   Index of data point

Total

Total number of series

PTotal

Total number of multiple series for data points

When displaying numeric value, it is possible to set format specifying string similar to System.String.Format method used when displaying numeric values. For example, when format string is {Value}, numeric value is displayed in default format but when ":" (colon) format specifying string is added after Value, it is possible to insert comma or specify decimal place digits.

For example, the format string for "inserting comma in numeric value and displaying 2 digits after decimal place" would be as follows.

{Value:#,##0.00}

Please refer to the technical information posted on Microsoft site for details on format specifying string after continued numeric value after comma.

Sample Image

The following image displays a bar chart with the following values.

X Value abc def ghi
Y value of series 1(Red) 1 2 3
Y value of series 2(green) 4 3 2

String displayed below the image is a string set in Label.Format property of marker.

Value={Value}

Pct={Pct:0.0}

PPct={PPct:0.0}

Name={Name}

Total={Total}

PTotal={PTotal}

{Name}:{Value}

In case you wish to add a line break in between, as it is not possible to add a line break from Series collection editor, the following format string needs to be set at runtime.

To write code in Visual Basic.NET

To write code in C#

Specific symbols

The specific symbols that are used according to the chart type.

Bubble Charts

Value

Y2 value

Value0

Y value

Value1

Y2value

Bubble XY Chart

Value0

X value

Value1

Y value

Value2

Y2 value

Candle or Hilo Chart

For a Candle chart or HiLo chart, symbols are not enabled for legend or marker labels.

See Also
Support Forum