Ok, I could reproduce it now. If you don't want use ChartControl.Draw() you can customize your values axis using SetMinMax() property as do to next code:Also commented out the ChartControl.Draw().
As i told you, ColorBand tool is not at getting drawn at all.
Code: Select all
public void DrawTrend()
{
FastLine _FastLIne = new FastLine();
_FastLIne.FillSampleValues(100);
Axis _Axis = new Axis();
ChartControl.Axes.Custom.Add(_Axis);
_Axis.StartEndPositionUnits = PositionUnits.Percent;
_Axis.StartPosition = 0;
_Axis.EndPosition = 100;
//_Axis.MaximumOffset = 25;
//_Axis.MinimumOffset = 25;
_FastLIne.CustomVertAxis = _Axis;
ChartControl.Series.Add(_FastLIne);
_Axis.SetMinMax(_FastLIne.MinYValue(), _FastLIne.MaxYValue());
// ChartControl.Draw();
ColorBand _ColorBand = new ColorBand(ChartControl.Chart);
_ColorBand.Axis = _Axis;
_ColorBand.Color = Color.Yellow;
_ColorBand.Transparency = 75;
_ColorBand.Brush.Color = Color.Yellow;
_ColorBand.Start = _Axis.Minimum;
_ColorBand.End = _Axis.Maximum;
ChartControl.Tools.Add(_ColorBand);
}
Moreover, you can say us if when you utilizes ChartController.Draw() your application works as you want?
I hope will helps.
Thanks,