Show arrow on multiple custom axis.

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
amol
Advanced
Posts: 231
Joined: Tue Mar 29, 2005 5:00 am

Show arrow on multiple custom axis.

Post by amol » Wed Apr 27, 2016 12:05 pm

Hi steema support,

We are facing an issue regarding show an arrow on multiple custom axis,
arrowaxis.png
Img
arrowaxis.png (37.15 KiB) Viewed 5881 times
We want to arrow on top of green custom axis.
Please provide me any solution asap.
Thanks in advance

Christopher
Guru
Posts: 1603
Joined: Fri Nov 15, 2002 12:00 am

Re: Show arrow on multiple custom axis.

Post by Christopher » Thu Apr 28, 2016 8:10 am

Hello,

You can try code similar to the following:

Code: Select all

    private void InitializeChart()
    {
      tChart1.Aspect.View3D = false;


      Line line1 = new Line(tChart1.Chart);
      Line line2 = new Line(tChart1.Chart);

      tChart1.Panel.MarginLeft = 10;

      Axis axis1 = tChart1.Axes.Custom.Add();
      line1.CustomVertAxis = axis1;
      axis1.PositionUnits = PositionUnits.Pixels;
      axis1.RelativePosition = -50;

      line1.FillSampleValues();
      line2.FillSampleValues();

      tChart1.AfterDraw += TChart1_AfterDraw;

    }

    private void TChart1_AfterDraw(object sender, Graphics3D g)
    {
      int xPos = tChart1.Axes.Custom[0].Position;
      int yPos = tChart1.Axes.Custom[0].IStartPos;

      Point from = new Point(xPos, yPos - 40);
      Point to = new Point(xPos, yPos - 5);

      g.Brush.Color = Color.Green;
      g.Arrow(true, from, to, 10, 10, 0);
    }
Best Regards,
Christopher Ireland / 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

Post Reply