Here is the sample code. I am trying the draw a blue rectangle over the main chart window (cc.ChartPanels[0]).
protected override void OnRender(ChartControl cc, ChartScale cs) { base.OnRender(cc, cs); using (SharpDX.Direct2D1.SolidColorBrush dxBrush = new SharpDX.Direct2D1.SolidColorBrush(RenderTarget, SharpDX.Color.Blue)) { RenderTarget.FillRectangle(new SharpDX.RectangleF(cc.ChartPanels[0].X, cc.ChartPanels[0].Y, cc.ChartPanels[0].W, cc.ChartPanels[0].H), dxBrush); } }
I am able to render the blue rectangle in indicator panel if I replace cc.ChartPanels[0] with ChartPanel. So the code is correct for indicator panel, but idoes not work for the main price panel.
Is rendering allowed only in the indicator window panel (separate panel in this case) ?
Any ideas why it does not work ?
Comment