How to make left and bottom axes on the same scale?

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
uqji
Newbie
Newbie
Posts: 5
Joined: Fri Jan 30, 2015 12:00 am

How to make left and bottom axes on the same scale?

Post by uqji » Tue Sep 22, 2015 7:42 am

My first day on Tchart. What an amazing tool.

I need to plot a bunch of coordinates on the chart and naturally the chart area should be equally scaled in x and y directions.

How do I set this up in runtime or through the Editor?

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

Re: How to make left and bottom axes on the same scale?

Post by Christopher » Tue Sep 22, 2015 1:17 pm

Welcome to TeeChart :D
uqji wrote: How do I set this up in runtime or through the Editor?
A good place to start is the demo app, which can be found under:

%Program Files%\Steema Software\Steema TeeChart for .NET 2015 4.1.2015.08060\Examples\DemoProject\bin\ExecutableDemo\TeeChartNetExamples.exe

Run this program, then open the All Features tab then "Welcome !\Basic features".

Please don't hesitate to ask for any further help!
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

uqji
Newbie
Newbie
Posts: 5
Joined: Fri Jan 30, 2015 12:00 am

Re: How to make left and bottom axes on the same scale?

Post by uqji » Wed Sep 23, 2015 8:36 am

Thanks, that does help a lot.

I have another question now.

How do I control the individual symbol style in a Points series pragmatically?

Dim tsrs As New Steema.TeeChart.Styles.Points(TChart1.Chart)

Basically I can set the color and label of each point by: tsrs.Add(x,y,color,label)

I can get access to the mark of each points by tsrs.Marks.Items(index).

But I don't know how to control the symbol style (e.g. square, circle) of each point. tsrs.Item(index) provides little properties that I can control.

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

Re: How to make left and bottom axes on the same scale?

Post by Christopher » Wed Sep 23, 2015 2:36 pm

Hello!
uqji wrote:But I don't know how to control the symbol style (e.g. square, circle) of each point. tsrs.Item(index) provides little properties that I can control.
You should be able to use something like:

Code: Select all

points.Pointer.Style = Steema.TeeChart.Styles.PointerStyles.Hexagon;
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

uqji
Newbie
Newbie
Posts: 5
Joined: Fri Jan 30, 2015 12:00 am

Re: How to make left and bottom axes on the same scale?

Post by uqji » Thu Sep 24, 2015 1:46 am

points.Pointer.Style will set the style for every points in the series. I need to be able to control individual point's style. Any suggestions?

Thanks

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

Re: How to make left and bottom axes on the same scale?

Post by Christopher » Thu Sep 24, 2015 9:31 am

Hello,
uqji wrote:points.Pointer.Style will set the style for every points in the series. I need to be able to control individual point's style. Any suggestions?
Of course. You can use the GetPointerStyle event, e.g.

Code: Select all

    private void InitializeChart()
    {
      tChart1.Aspect.View3D = false;
      Points points = new Points(tChart1.Chart);
      points.FillSampleValues();
      points.GetPointerStyle += Points_GetPointerStyle;
    }

    private void Points_GetPointerStyle(CustomPoint series, GetPointerStyleEventArgs e)
    {
      if(e.ValueIndex > 2 && e.ValueIndex < 9)
      {
        e.Style = PointerStyles.Hexagon;
        e.Color = Color.Red;
      }
      else 
      {
        e.Style = PointerStyles.Rectangle;
        e.Color = series.Color;
      }
    }
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