I'm using OnRender () to create a heat map style chart. Everything works great except for the fact that I'm getting repeating vertical thin white lines. When I use Draw.Rectangle( ) this does not occur. Clearly I'm not quite calculating the draw points for the x axis correctly. Could you please show or email me the code for Draw.Rectangle( ) so I might see how you calculate the x-xis draw points.
Here's my use of:
Draw.Rectangle(this,"Box"+CurrentBar+bin,true, 0, y,1,y + stp, Brushes.Transparent, brush, 75);
Here my calculation of the x-axis within OnRender():
int yCord = chartScale.GetYByValue(t.Price);
int yCord2 = chartScale.GetYByValue(t.Price + TickSize);
x= chartControl.GetXByBarIndex(ChartBars,t.Id);// - (int)(chartControl.BarWidth);
RenderTarget.FillRectangle(new RectangleF((float)x, yCord2, (float) Math.Abs((float)x - (float)chartControl.GetXByBarIndex(ChartBars,t.Id -1)), (float)Math.Abs(yCord2 - yCord)),brush.ToDxBrush(RenderTarget));
I see that it is a problem that others have had:
http://ninjatrader.com/support/forum...ad.php?t=81757
It's a great frustration and like I said does not occur using Draw.Rectangle( ). I think it would be a great service to the group to show how "statBarsAgo" and "endBarsAgo" are translated into x-axis plotting points.
Thanks
Comment