dt3 = Data Table("光伏供应链价格汇总");
obj1 = dt3 << Graph Builder(
Size(1476, 745),
Show Control Panel(0),
Legend Position("Inside Right"),
Fit to Window("Off"),
Variables(X(:日期), Y(:单价), Group X(:产品), Group Y(:型号)),
Elements(
Points(X, Y, Legend(5), Label("Label by Value"), Label Format("Fixed Dec", 7, 2)),
Smoother(X, Y, Legend(6))
),
SendToReport(
Dispatch({}, "日期", ScaleBox,
{Min(min_date - 86400), Max(max_date + 86400), Interval("Day"), Inc(1),
Minor Ticks(0), Label Row(
{Label Orientation("Vertical"), Show Major Grid(0), Show Minor Grid(0)}
)}
),
Dispatch({}, "单价", ScaleBox,
{Min(0.2), Max(2.5), Inc(0.5), Minor Ticks(1),
Label Row({Show Major Grid(0), Show Minor Grid(0)})}
)
)
);
Wait(1);
excluded_rows = dt3 << Get Excluded Rows; //获取排除行矩阵
mm = N Row(excluded_rows); //获取排除行数
nn = (N Row(dt3) - mm) / 7;
report = obj1 << Report;
indices = {4, 5, 8, 9, 10, 20, 21};
For(idx = 1, idx <= N Items(indices), idx++,
i = indices[idx];
frame = report[FrameBox(i)];
For(j = 0, j <= nn, j++,
seg = frame << Find Seg(Marker Seg(1));
seg << Label Offset({j, -10, -10});
);
);
Edit (jthi): Added JSL formatting