-
Notifications
You must be signed in to change notification settings - Fork 204
Charts
Majorsilence Reporting supports embedded charts inside reports. A chart is bound to a report dataset and renders inline as part of the report page.
- Open the report in the designer.
- Right-click the report body and choose Insert → Chart.
- The chart wizard opens. Select a chart type and click Next.
- Select the dataset the chart will read from.
- Map dataset fields to Category (X axis), Value (Y axis), and optionally Series (grouping by colour/line).
- Click Finish. The chart item appears on the design surface.
- Resize and reposition the chart as needed.
| Type | Use case |
|---|---|
| Column | Compare discrete categories; bars are vertical |
| Bar | Horizontal version of column chart |
| Line | Show trends over time or continuous data |
| Area | Line chart with filled area below the line |
| Pie | Show proportional breakdown of a whole |
| Doughnut | Pie variant with a hollow centre |
| Scatter | Plot individual data points on X/Y axes |
| Bubble | Scatter with a third value controlling point size |
Right-click the chart and choose Chart Properties to access:
- Titles — add a chart title and axis titles
- Legend — position (top, bottom, left, right) or hide
- Axes — label format, min/max values, tick marks
- 3D effects — enable a shallow 3D perspective
Chart titles support expressions the same way as text cells:
="Monthly Sales — " & Year({@ExecutionTime})
Set the axis label format in the Y-axis properties using .NET format strings:
C2 → $1,234.56 (currency)
N0 → 1,235 (integer with thousand separator)
P1 → 42.3% (percentage)
#,##0 → custom numeric
A chart's Category, Value, and Series fields all reference dataset fields using standard expression syntax:
| Chart role | Example expression |
|---|---|
| Category (X) |
=Fields!MonthName.Value or {MonthName}
|
| Value (Y) | =Sum(Fields!Revenue.Value) |
| Series (grouping) | =Fields!Region.Value |
The Value expression is almost always an aggregate (Sum, Count, Avg) because the chart aggregates detail rows into the categories defined by the Category expression.
To plot multiple lines or bar clusters, add additional series items in the chart's Series collection (right-click the chart → Chart Properties → Series tab). Each series can point to a different value expression or use the Series grouping field to split automatically.
To show only a subset of the data in the chart without filtering the rest of the report, add a filter to the chart's dataset via Chart Properties → Filters. This leaves the underlying dataset intact for other table items on the same report.
A common pattern is to place a summary chart at the top of the report and a detail table below it, both bound to the same dataset. The chart shows the high-level picture; the table shows the rows.
- Set a fixed Width and Height on the chart item for predictable output; avoid percentage-based sizes when exporting to PDF or TIFF.
- For pie charts, ensure the category field has low cardinality (< 8 slices); many categories make pie charts unreadable.
- Line charts work best when the Category field is a date or sequential number and there are 10–200 data points.