Overview
Problem
When a bar chart specifies only one series, the bar is monotonously displayed in only one color, as shown in the following figure.
How to set color interlacing for a bar chart as shown in the following figure?
Solution
You can set Condition Display for the chart under Cell Element > Special Effect.
Example
Report Design
1. Create a general report and create a dataset named ds1. The SQL statement is SELECT * FROM Sales_Volume.
2. Merge cells A1 to D18 and insert a bar chart as shown in the following figure.
3. Bind the data to the bar chart, as shown in the following figure.
4. Choose Special Effect > Condition Display, add Condition Attribute1, add the condition Category Index In '=range(2,100,2)', and set Solid Color to green, as shown in the following figure.
Effect Display
1. PC
Save the template and click Pagination Preview. The following figure shows the preview effect.
2. Mobile Terminal
Template Download
For details, you can download the template Color Interlacing for Bar Charts.cpt