The following code produces a triangle shape.
However the base perimeter line is missing?:
Steema.TeeChart.Styles.Shape triangle = new Steema.TeeChart.Styles.Shape (Chart.Chart);
triangle.Style = Steema.TeeChart.Styles.ShapeStyles.Triangle;
triangle.Pen.Color = System.Drawing.Color.Blue;
triangle.Color = System.Drawing.Color.Yellow;
triangle.Brush.Gradient.Visible = false;
triangle.X0 = 0; triangle.Y0 = 0;
triangle.X1 = 50; triangle.Y1 = 50;
Triangle Base Perimeter Line Does Not Appear
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Re: Triangle Base Perimeter Line Does Not Appear
Hi Ivan_vS,
I'm afraid so. I have added the issue (TF02015376) to the defect list to be fixed for next releases. In the meantime a workaround is manually painting the bottom line as in this example:
I'm afraid so. I have added the issue (TF02015376) to the defect list to be fixed for next releases. In the meantime a workaround is manually painting the bottom line as in this example:
Code: Select all
public Form1()
{
InitializeComponent();
InitializeChart();
}
private Steema.TeeChart.Styles.Shape triangle;
private void InitializeChart()
{
tChart1.Aspect.View3D = false;
triangle = new Steema.TeeChart.Styles.Shape(tChart1.Chart);
triangle.Style = Steema.TeeChart.Styles.ShapeStyles.Triangle;
triangle.Pen.Color = System.Drawing.Color.Blue;
triangle.Color = System.Drawing.Color.Yellow;
triangle.Brush.Gradient.Visible = false;
triangle.X0 = 0; triangle.Y0 = 0;
triangle.X1 = 50; triangle.Y1 = 50;
tChart1.Axes.Left.MinimumOffset = 10;
tChart1.Draw();
tChart1.AfterDraw += new Steema.TeeChart.PaintChartEventHandler(tChart1_AfterDraw);
}
void tChart1_AfterDraw(object sender, Steema.TeeChart.Drawing.Graphics3D g)
{
g.Pen.Color = triangle.Pen.Color;
int x0 = triangle.CalcXPos(0);
int y0 = triangle.CalcYPos(0);
int x1 = triangle.CalcXPos(1);
g.Line(x0, y0, x1, y0);
}
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |