ColorBand paints outside the chart panel
Posted: Wed Mar 28, 2012 1:42 pm
Hi,
I'm using TeeChart 2011. In that I'm trying to highlight a region on the chart using the ColorBand tool. But what I noticed is, when the ColorBand tool is placed over the Left Axis, it gets stretched little bit outside the Right side Panel of the TeeChart. That too gets overpainted on the Right border. This pushes me to set transparency to the ColorBand tool for viewing the Right side border . Is there a way to make it display within the Chart display area ?
Here is the screenshot of the same:
Here is the sample code I used:
Please let me know how this can be fixed.
Thanks in advance.
I'm using TeeChart 2011. In that I'm trying to highlight a region on the chart using the ColorBand tool. But what I noticed is, when the ColorBand tool is placed over the Left Axis, it gets stretched little bit outside the Right side Panel of the TeeChart. That too gets overpainted on the Right border. This pushes me to set transparency to the ColorBand tool for viewing the Right side border . Is there a way to make it display within the Chart display area ?
Here is the screenshot of the same:
Here is the sample code I used:
Code: Select all
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
tChart1.Aspect.View3D = false;
}
private void Form1_Load(object sender, EventArgs e)
{
FastLine series = new FastLine(tChart1.Chart);
FillSampleValues(series, 100);
ColorBand colorBand = new ColorBand(tChart1.Chart);
colorBand.Start = 40;
colorBand.End = 50;
colorBand.Axis = tChart1.Axes.Left;
colorBand.Color = Color.Red;
colorBand.Pen.Visible = false;
colorBand.Transparency = 50;
}
private void FillSampleValues(FastLine series, int count)
{
Random r = new Random(0);
for (int i = 1; i <= count; i++)
{
series.Add(i, r.Next(100));
}
}
}
Thanks in advance.