可以设置Y轴参考线范围来定义背景色,用类别A,B....来设置颜色


Graph Builder(
Size( 876, 622 ),
Show Control Panel( 0 ),
Fit to Window( "Off" ),
Variables(
X( :Distance ),
Y( :Month ),
Y( :Day of Week, Position( 1 ) ),
Color( :Month )
),
Elements( Bar( X, Y( 1 ), Y( 2 ), Legend( 7 ) ) ),
Local Data Filter(
Add Filter(
columns( :Month ),
Where( :Month == {"Jan", "Feb", "Mar"} ),
Display( :Month, N Items( 12 ) )
)
),
SendToReport(
Dispatch( {}, "月", ScaleBox,
{Add Ref Line( {-0.5, 6.5}, "Solid", "Black", "", 1, 0.25 ),
Add Ref Line( {6.5, 13.5}, "Solid", "Orange", "", 1, 0.25 ),
Add Ref Line( {13.5, 20.5}, "Solid", "Green", "", 1, 0.25 )}
)
)
);