Begin with three distinctive values
Use a fictional table with Apr 4, May 9 and Jun 6 completed items. The expected total is 19, and May is the largest month. Neither statement predicts a real company’s performance. The uneven values help expose a shifted label or an accidentally repeated value.
| Month | Completed items |
|---|---|
| Apr | 4 |
| May | 9 |
| Jun | 6 |
Use one unit and a defined reporting period. Do not combine percentages and counts under the same unlabelled axis. A chart title should say what is measured; “Results” gives a reader too little context to interpret the shape.
Build both arrays from the same records
CraftMyPDF’s chart documentation describes Categories and Data as one-dimensional arrays and provides the asArray expression for extracting a field from records. For the original fictional shape below, the two extracted arrays should preserve the same order.
Input: [{month:"Apr", completed:4},
{month:"May", completed:9},
{month:"Jun", completed:6}]
Expected categories: ["Apr", "May", "Jun"]
Expected values: [4, 9, 6]If sorting is needed, sort the complete records first. Sorting labels alphabetically while leaving values in date order gives a plausible but wrong chart. Equal array lengths alone cannot establish correct pairing. We have not executed these settings in a merchant account.
Choose the chart for the comparison
| Reader task | Suitable first option to evaluate | Watch for |
|---|---|---|
| Compare a few categories | A labelled bar chart | Labels or baseline hiding the real difference |
| Follow an ordered period | A line or bar chart with explicit period labels | Missing periods appearing continuous |
| Read exact figures | A compact table beside or instead of a chart | Unnecessary graphic replacing useful numbers |
This is a design recommendation, not a ranking of chart libraries. Keep a concise textual takeaway when it can be supported by the approved source, and retain the values needed to check it. Do not write an optimistic business conclusion merely because a line slopes upward.
Use cases that can disprove the mapping
- Change only May from 9 to 2: confirm the corresponding label retains its value.
- Remove a required value: apply the declared missing-data rule, not an invented zero.
- Try an explicit valid zero and distinguish it from missing.
- Use a long category label and inspect the exported PDF.
- Check title, units, legend and source table together.
An empty series needs an approved message rather than a blank frame that suggests loading failed. A negative value or an unusual unit needs a representation suited to that meaning; do not force it into a percentage-of-total diagram.
Accept meaning before polish
Inspect the generated report at its intended reading size. Check labels near page edges and whether the legend remains attached to its chart. A screenshot from the editor cannot prove the final PDF has retained them.
Keep the fixture and expected relationships with the template version. If a chart cannot communicate the comparison clearly, use the table. Adding another visualization is not an improvement when it makes the reader work harder to recover the same three facts.
Sources and evidence limits
Documentation checked 2 October 2026. Original examples are fictional; no merchant account or API was tested.
- CraftMyPDF chart data properties — checked 2026-10-02