I am trying to draw a dynamic rectangle on a panel other that that of the chart.
I have the following codes:
Draw.Rectangle(this, "tag1", false, Time[500], 100.00, Time[0], 80, areaColor, AreaOpacity);
I have also tried with OnRender() as followed:
protected override void OnRender(ChartControl chartControl, ChartScale chartScale)
{
if (IsInHitTest) return;
else base.OnRender(chartControl, chartScale);
if(Bars == null || ChartControl == null)
return;
float xCandStart = chartControl.GetXByBarIndex(ChartBars, 500);
SharpDX.RectangleF vecLevel1 = new SharpDX.RectangleF(xCandStart, 100.00, 500, 20);
RenderTarget.FillRectangle(vecLevel1, level1ColorDx);
}
I would appreciate any help.

Comment