Option (A) is correct.
Explanation:
In a stacked bar each piece starts where the previous piece ends, and its length equals its own value.
Tomatoes: 0 to 12. Brinjal: 12 to 12+8=20. Chillies: 20 to 20+4=24.
Bar R shows exactly these pieces (0–12, 12–20, 20–24), and its full length, 24 kg, is the total harvest.
Why the other options are wrong
- (B) Bar Q's chilli piece runs from 20 to 28, which is 8 kg long. Chillies weighed only 4 kg.
- (C) Bar P ends at 24 but its tomato piece is 0–8 (8 kg) and its brinjal piece is 8–20 (12 kg): the two values have been swapped.
- (D) Bar S uses the running totals 12, 20 and 24 as the lengths of the pieces, so it ends at 12+20+24=56 instead of 24.