Bottom and Custom Vertical Axis Label Start Position

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Priyanka
Newbie
Newbie
Posts: 19
Joined: Mon Nov 16, 2015 12:00 am

Re: Bottom and Custom Vertical Axis Label Start Position

Post by Priyanka » Mon May 30, 2016 7:07 am

Hi Christopher,

I have requirement to disable anti aliasing. I have tried below code.

WebChart1.Chart.Aspect.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.None;

However, it is not working in my case. Please assist.

Thanks in advance.

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

Re: Bottom and Custom Vertical Axis Label Start Position

Post by Christopher » Mon May 30, 2016 9:20 am

Priyanka wrote: I tried it but no luck.
Here is the code I am using with the latest version of TeeChart.dll:
webchart1.PNG
webchart1.PNG (13.02 KiB) Viewed 17477 times
and this is the result:
webchart2.PNG
webchart2.PNG (20.67 KiB) Viewed 17471 times
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

Priyanka
Newbie
Newbie
Posts: 19
Joined: Mon Nov 16, 2015 12:00 am

Re: Bottom and Custom Vertical Axis Label Start Position

Post by Priyanka » Tue May 31, 2016 6:29 am

Thanks Christopher.

It removed extra borders. However, I need top and right border to only chart area as attached.
Attachments
Trend.png
Trend.png (203.47 KiB) Viewed 17447 times

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

Re: Bottom and Custom Vertical Axis Label Start Position

Post by Christopher » Wed Jun 01, 2016 8:31 am

Hello,
Priyanka wrote:However, I need top and right border to only chart area as attached.
This code:
webchart3.PNG
webchart3.PNG (13.44 KiB) Viewed 17474 times
gives me this result, without the borders you mention:
webchart4.PNG
webchart4.PNG (41.46 KiB) Viewed 17471 times
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

Priyanka
Newbie
Newbie
Posts: 19
Joined: Mon Nov 16, 2015 12:00 am

Re: Bottom and Custom Vertical Axis Label Start Position

Post by Priyanka » Wed Jun 01, 2016 9:13 am

Hi Christopher,

I think you got confused. I need top and bottom border to only chart area.

Thanks.

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

Re: Bottom and Custom Vertical Axis Label Start Position

Post by Christopher » Wed Jun 01, 2016 10:58 am

You might like to try the different variations in this code yourself until you come across the combination that most adapts to your needs:

Code: Select all

  private void InitializeChart()
  {
    WebChart1.Chart.Panel.Gradient.Visible = false;
    WebChart1.Chart.Panel.Color = Color.White;
    WebChart1.Chart.Panel.Bevel.Inner = Steema.TeeChart.Drawing.BevelStyles.None;
    WebChart1.Chart.Panel.Bevel.Outer = Steema.TeeChart.Drawing.BevelStyles.None;


    WebChart1.Chart.Aspect.View3D = false;
    WebChart1.Chart.Series.Add(typeof(Line)).FillSampleValues();

    //#1
    //WebChart1.Chart.Walls.Visible = false;
    //WebChart1.Chart.Axes.Visible = false;

    //#2
    //WebChart1.Chart.Walls.Back.Gradient.Visible = false;
    //WebChart1.Chart.Walls.Back.Color = Color.White;
    //WebChart1.Chart.Walls.Back.Pen.Color = Color.Red;
    //WebChart1.Chart.Axes.Left.AxisPen.Visible = false;
    //WebChart1.Chart.Axes.Bottom.AxisPen.Visible = false;

    //#3
    WebChart1.Chart.Walls.Visible = false;
    WebChart1.Chart[0].VertAxis = VerticalAxis.Both;
    WebChart1.Chart[0].HorizAxis = HorizontalAxis.Both;
    WebChart1.Chart.Axes.Left.AxisPen.Visible = false;
    WebChart1.Chart.Axes.Bottom.AxisPen.Visible = false;
    WebChart1.Chart.Axes.Top.AxisPen.Color = Color.Yellow;
    WebChart1.Chart.Axes.Top.Labels.Visible = false;
    WebChart1.Chart.Axes.Right.AxisPen.Color = Color.Blue;
    WebChart1.Chart.Axes.Right.Labels.Visible = false;
  }
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

Priyanka
Newbie
Newbie
Posts: 19
Joined: Mon Nov 16, 2015 12:00 am

Re: Bottom and Custom Vertical Axis Label Start Position

Post by Priyanka » Thu Jun 02, 2016 9:41 am

Thanks Christopher. I will try it.

Need your help to implement requirement of showing blank report. As per attached screenshot. We need to draw series for some date range and rest should be blank.
Attachments
BlankChart.png
BlankChart.png (283.33 KiB) Viewed 17411 times

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

Re: Bottom and Custom Vertical Axis Label Start Position

Post by Christopher » Mon Jun 06, 2016 8:27 am

Priyanka wrote:Need your help to implement requirement of showing blank report. As per attached screenshot. We need to draw series for some date range and rest should be blank.
Can you not simply set the bottom Axis's SetMinMax to a relevant value? Or is the situation more complex than this? If so, how?
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

Priyanka
Newbie
Newbie
Posts: 19
Joined: Mon Nov 16, 2015 12:00 am

Re: Bottom and Custom Vertical Axis Label Start Position

Post by Priyanka » Mon Jun 06, 2016 8:41 am

Hi Christopher,

SetMinMax function doesn't work. Below is the code I am using. However, it is not setting minimum to 0.2 and maximum to 200.

WebChart1.Chart[0].CustomVertAxis.Automatic = false;
WebChart1.Chart[0].CustomVertAxis.SetMinMax(0.2, 200);
WebChart1.Chart[0].CustomVertAxis.Labels.ValueFormat = "##0.##;{##0.##}";

Value format is also set. Not sure why the SetMinMax function is not working.

Need urgent help. Thanks.

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

Re: Bottom and Custom Vertical Axis Label Start Position

Post by Christopher » Tue Jun 07, 2016 9:17 am

Hello!

This code:

Code: Select all

    protected void Page_Load(object sender, EventArgs e)
    {
      Chart chart = WebChart1.Chart;

      chart.Aspect.View3D = false;
      chart.Series.Add(typeof(Line)).FillSampleValues();
      chart.Series.Add(typeof(Line)).FillSampleValues();
      chart.Panel.MarginLeft = 30;


      Axis axis = chart.Axes.Custom.Add();
      axis.Horizontal = false;
      axis.RelativePosition = -40;
      axis.PositionUnits = PositionUnits.Percent;

      axis.SetMinMax(200, 300);

      chart[1].CustomVertAxis = axis;
    }
gives me the following (depending on the random values of FillSampleValues, of course):
webchart1.PNG
webchart1.PNG (31.04 KiB) Viewed 17373 times
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

Priyanka
Newbie
Newbie
Posts: 19
Joined: Mon Nov 16, 2015 12:00 am

Re: Bottom and Custom Vertical Axis Label Start Position

Post by Priyanka » Tue Jun 07, 2016 11:48 am

Hi Christopher,

Please taka a look in the attached code.

Appreciate quick help.
Attachments
SetMinMax.zip
(63.83 KiB) Downloaded 572 times

Priyanka
Newbie
Newbie
Posts: 19
Joined: Mon Nov 16, 2015 12:00 am

Re: Bottom and Custom Vertical Axis Label Start Position

Post by Priyanka » Wed Jun 08, 2016 7:06 am

Hi Christopher,

Any updates on the issue?

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

Re: Bottom and Custom Vertical Axis Label Start Position

Post by Christopher » Wed Jun 08, 2016 1:56 pm

Priyanka wrote:Hi Christopher,

Any updates on the issue?
This is the result of running the code you sent:
636009980540289150.png
636009980540289150.png (203.79 KiB) Viewed 17376 times
I'm afraid to say that I'm not entirely sure what the issue is you refer to. Could you please be more specific?
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

Priyanka
Newbie
Newbie
Posts: 19
Joined: Mon Nov 16, 2015 12:00 am

Re: Bottom and Custom Vertical Axis Label Start Position

Post by Priyanka » Thu Jun 09, 2016 4:52 am

Hi Christopher,

Attached is the output of the code shared by me. Not sure why the below code is not working in case of custom vertical axis

WebChart1.Chart[0].CustomVertAxis.Automatic = false;
WebChart1.Chart[0].CustomVertAxis.SetMinMax(0.3, maxvalue);

Also, need inputs on setting chart resolution and exporting chart in binary format.

Appreciate your help.
Attachments
TrendMinMax.png
TrendMinMax.png (172.92 KiB) Viewed 17345 times

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

Re: Bottom and Custom Vertical Axis Label Start Position

Post by Christopher » Thu Jun 09, 2016 8:44 am

Priyanka wrote:Hi Christopher,

Attached is the output of the code shared by me. Not sure why the below code is not working in case of custom vertical axis

WebChart1.Chart[0].CustomVertAxis.Automatic = false;
WebChart1.Chart[0].CustomVertAxis.SetMinMax(0.3, maxvalue);
It is working here. This code:

Code: Select all

        WebChart1.Chart[0].CustomVertAxis.Automatic = false;
        WebChart1.Chart[0].CustomVertAxis.SetMinMax(maxvalue - (maxvalue / 10), maxvalue);
gives me this:
636010655388661321.png
636010655388661321.png (143.5 KiB) Viewed 17338 times
Priyanka wrote: Also, need inputs on setting chart resolution and exporting chart in binary format.
What help do you need, exactly?
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