GObj = Graph Builder(
Size(1221, 652),
Show Control Panel(0),
Variables(X(:Date), Y(:Close_s)),
Elements(Box Plot(X, Y, Legend(5))),
Local Data Filter(Add Filter(columns(:Date, :Name), Where(:Date >= 01Jun2022), Where(:Name == "Anglo American"))),
SendToReport(
Dispatch(
{},
"Graph Builder",
OutlineBox,
{Set Title("Variability Plot Low Close and High values for the day"), Image Export Display(Normal)}
),
Dispatch(
{}, "Close_s",
ScaleBox// {Min( 100000 ), Max( 200000 ), Inc( 50000 ), Minor Ticks( 4 )
// Add Ref Line( 130000, "Solid", "Dark Red", "bought", 1 )}
),
Dispatch({}, "graph title", TextEditBox, {Set Text("Low, Close & High against date")})
)
);
I would like to add a reference line depending on the :name value in the data filter.
I can programmatically add a reference line and remove the line when needed. But the reference line must depends on the :name value of the data filter.
I will have a Reference line table with a :Name column and reference line values that I can use to match :Name value in data filter
DateValue = Date MDY(07, 12, 2022);
Report(GObj)[AxisBox(1)] << {Add Ref Line(DateValue, "Solid", "Blue", "Date Bought", 1)};
Report(GObj)[AxisBox(2)] << {Add Ref Line(130000, "Solid", "Green", "Value Bought", 1)};