Page 1 of 1
Transparency property with Points3D
Posted: Mon Jul 16, 2007 9:00 pm
by 8739068
I am unable to successfully set a transparency property to make 3D points look translucent. It seems if I set the transparency of Pointer.Transparency it is ignored. I have tried to set this programatically and via the Chart Editor and have had no success.
Is this a bug or should I be setting another property?
Posted: Tue Jul 17, 2007 7:43 am
by 9348258
Hi Mike
Yes, this is a known issue (TF02012193) in our defect list to be fixed for future releases. Please be aware at this forum for new release announcements and what's being implemented/fixed on them.
In the meantime, a workaround can be set the colors with the wish transparency, for example:
Code: Select all
points3D1.Add(3, 3,1,Color.FromArgb(255, Color.Red)); //255 is total opaque
points3D1.Add(1,4,3 ,Color.FromArgb(70, Color.Red));
points3D1.Add(4,4,4, Color.FromArgb(0, Color.Red)); //0 is total Transparency
points3D1.Add(5,2,8, Color.FromArgb(100, Color.Red));
points3D1.Add(3,1,9, Color.FromArgb(200, Color.Red));
Posted: Tue Jul 17, 2007 9:11 am
by Chris
Hello Mike,
This defect has now been fixed. The fix will be included into the next maintenance release, due out before the end of next week.
Work around not feasible for us
Posted: Tue Jul 17, 2007 1:07 pm
by 8739068
Unfortunately the work around proposed is not going to work for our product.
I am handed an array of points that are filled in by another assembly. I make a call to the Series.Add(double[],double[],double[]) to add points. When adding many points (i.e. greater than 200,000) this is most efficient.
Is there any other work around that might meet our needs?
Do you know when the bug is scheduled to be fixed?
We have puchased the the source code and currently build TChart.dll. Is it possible to get an early release of the bug fix or at least point us in the direction where the fix will be in the source?
This ability is very important to us. We are using Points3D series to shade regions in our charts. The shading is useless if we cannot control the transparency of the series.
Posted: Tue Jul 17, 2007 1:27 pm
by Chris
Hello,
Is there any other work around that might meet our needs?
Sure. You can try:
Code: Select all
private Steema.TeeChart.Styles.Points3D points3d;
private void InitializeChart()
{
double[] xvalues = new double[] { 1, 2, 3 }, yvalues = new double[] { 1, 2, 3 }, zvalues = new double[] { 1, 2, 3 };
tChart1.Series.Add(points3d = new Steema.TeeChart.Styles.Points3D());
points3d.Add(xvalues, yvalues,zvalues);
points3d.Color = Color.FromArgb(50, points3d.Color.R, points3d.Color.G, points3d.Color.B);
}
Do you know when the bug is scheduled to be fixed?
It is already fixed, as I mention in my message above.
We have puchased the the source code and currently build TChart.dll. Is it possible to get an early release of the bug fix or at least point us in the direction where the fix will be in the source?
Sure. The fix is in Custom.cs. The method Steema.TeeChart.Styles.SeriesPointer.PrepareCanvas() should now look like this:
Code: Select all
internal void PrepareCanvas(Graphics3D g, Color colorValue)
{
g.Pen = Pen;
g.Brush = Brush;
if (aSeries != null)
{
if (Brush.Transparency > 0)
{
g.Brush.Transparency = Brush.Transparency;
g.Brush.Color = Drawing.Graphics3D.TransparentColor(g.Brush.Transparency, colorValue);
}
else
{
g.Brush.Color = colorValue;
}
if (aSeries.ColorEach)
{
g.Pen.Color = Utils.DarkenColor(colorValue, 60);
if (Brush.Gradient.Visible)
{
g.Brush.Gradient.StartColor = colorValue;
g.Brush.Gradient.MiddleColor = Color.Empty;
g.Brush.Gradient.EndColor = Utils.CalcColorBlend(colorValue, Color.White, 60);
}
}
}
}
That worked great!!!!
Posted: Tue Jul 17, 2007 2:09 pm
by 8739068
Thanks so much. I used the new PrepareCanvas method and rebuilt the control. It worked.
One thing I noticed is that while using the Chart Editor at run time there are some issues with transparency getting set back to zero. I would change the transparency for a Points3D series, click on another tab to change some settings and then click back to the series to adjust the transparency again. The transparency value is reset back to zero.
Other than that everything seems to work good.
Mucho Gracias.
Posted: Mon Jul 30, 2007 11:18 am
by narcis
Hi Mike,
Thanks for the information. I've added this defect to our bug list (TF02012369) to be fixed for future releases.