SelectionTool blocks
SelectionTool blocks
Also, is there a way I can set the transparency of these blocks. Sometimes they are pretty much cover the whole curve that is being selected.
Thanks,
Re: SelectionTool blocks
Hi asupriya,
I'm afraid it only can be done manually right now. You could use Selected event to calculate the points to draw and draw them using a Points series or drawing them manually at AfterDraw event.asupriya wrote:As shown in above image, the selection tool puts too many black blocks. Is there a way I can have only at the beginning, middle and at end?
Yes, check the Selector tool's property: Brush.Transparencyasupriya wrote:Also, is there a way I can set the transparency of these blocks. Sometimes they are pretty much cover the whole curve that is being selected.
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
Re: SelectionTool blocks
Can you please post a code snippet for this? I am using fastline series. Appreciate your help.Yeray wrote:Hi asupriya,
I'm afraid it only can be done manually right now. You could use Selected event to calculate the points to draw and draw them using a Points series or drawing them manually at AfterDraw event.asupriya wrote:As shown in above image, the selection tool puts too many black blocks. Is there a way I can have only at the beginning, middle and at end?
Re: SelectionTool blocks
Hi asupriya ,
Here you have an example to start with:
Here you have an example to start with:
Code: Select all
private Steema.TeeChart.Tools.Selector select1;
private Steema.TeeChart.Styles.Line line1;
private Point[] points;
private void InitializeChart()
{
tChart1.Aspect.View3D = false;
line1 = new Steema.TeeChart.Styles.Line(tChart1.Chart);
line1.FillSampleValues(1000);
select1 = new Steema.TeeChart.Tools.Selector(tChart1.Chart);
select1.DrawHandles = false;
points = new Point[3];
select1.Selected += new Steema.TeeChart.Tools.SelectorSelectedEventHandler(select1_Selected);
tChart1.AfterDraw += new Steema.TeeChart.PaintChartEventHandler(tChart1_AfterDraw);
}
void select1_Selected(object sender, EventArgs e)
{
if (select1.Selection == line1)
{
points[0].X = line1.CalcXPos(0);
points[0].Y = line1.CalcYPos(0);
points[1].X = line1.CalcXPos(line1.Count / 2);
points[1].Y = line1.CalcYPos(line1.Count / 2);
points[2].X = line1.CalcXPos(line1.Count-1);
points[2].Y = line1.CalcYPos(line1.Count - 1);
}
}
void tChart1_AfterDraw(object sender, Steema.TeeChart.Drawing.Graphics3D g)
{
if (select1.Selection == line1)
{
int width = 6;
Steema.TeeChart.Drawing.Graphics3D gd = tChart1.Graphics3D;
gd.Brush.Color = Color.Red;
gd.Brush.Transparency = 50;
for (int i = 0; i < points.Length; i++)
{
gd.Rectangle(points[i].X - width, points[i].Y - width, points[i].X + width, points[i].Y + width);
}
}
}
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
Re: SelectionTool blocks
Thanks Yeray for the code snippet. Really appreciate it.
Re: SelectionTool blocks
Hi asupriya,
You're welcome!
You're welcome!
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |