Page 1 of 1

TChart1.Walls.Visible and Position Offset %

Posted: Tue Jul 05, 2011 9:54 am
by 15659004
Hi,

I am switching from TeeChart Pro v7.0.0.7 to TeeChart .Net Pro v.4.0.2011.2082.
This time I have two questions:

Question.01.

I want to clear every thing I set on graph by using following code

TChart1.Series.Clear()
TChart1.Axes.Left.Title.Caption = ""
TChart1.Axes.Bottom.Title.Caption = ""
TChart1.Header.Text = ""
TChart1.Axes.Left.Visible = False
TChart1.Axes.Bottom.Visible = False
TChart1.Walls.Visible = False

In a result Right and Top of Wall do not disappear. It seems that walls visible property works for left and bottom side but not for right and top side or some thing like this. For better understanding I am attaching a document having print shots, before and after executing above code. Here I want to mention that Walls.Visible property worked fine in TeeChart7.

Question.02.

How can I access/alter following property on run time

TeeChartEditor-->Legend-->Position-->Position Offset %.

Hope you understand above hierarchy , I provide print shot of exact screen as well.

Regards,
Maverick

Re: TChart1.Walls.Visible and Position Offset %

Posted: Tue Jul 05, 2011 3:15 pm
by 10050769
Hello Maverick,
I want to clear every thing I set on graph by using following code

TChart1.Series.Clear()
TChart1.Axes.Left.Title.Caption = ""
TChart1.Axes.Bottom.Title.Caption = ""
TChart1.Header.Text = ""
TChart1.Axes.Left.Visible = False
TChart1.Axes.Bottom.Visible = False
TChart1.Walls.Visible = False

In a result Right and Top of Wall do not disappear. It seems that walls visible property works for left and bottom side but not for right and top side or some thing like this. For better understanding I am attaching a document having print shots, before and after executing above code. Here I want to mention that Walls.Visible property worked fine in TeeChart7.
You need know that Walls Right, for default isn't visible, so property Walls work fine as you can see i next image, where I have changed the color of Chart Panel and I have set the walls as not visible:

Image Walls.Visible=true:

Chart1WallsVisible.jpg
Chart1WallsVisible.jpg (63.17 KiB) Viewed 5582 times

Image Walls.Visible=false:
Chart1WallsnotVisible.jpg
Chart1WallsnotVisible.jpg (11.17 KiB) Viewed 5574 times
To genereted this image I have use next code:

Code: Select all

Private ChartController1 As Steema.TeeChart.ChartController
Public Sub New()
	InitializeComponent()
	tChart1.Aspect.View3D = False
	InitializeChart()
End Sub

Private Sub InitializeChart()

	Dim points As New Steema.TeeChart.Styles.Points(tChart1.Chart)
	ChartController1 = New Steema.TeeChart.ChartController()
	Me.Controls.Add(ChartController1)
	ChartController1.Chart = tChart1
	points.FillSampleValues()
	tChart1.Panel.Gradient.Visible = False
	tChart1.Panel.Color = Color.Green

End Sub

Private Sub button1_Click(sender As Object, e As EventArgs)
	Dim line As New Steema.TeeChart.Styles.Line(tChart1.Chart)
	line.FillSampleValues()
	line.HorizAxis = Steema.TeeChart.Styles.HorizontalAxis.Top
	line.VertAxis = Steema.TeeChart.Styles.VerticalAxis.Right
End Sub

Private Sub button2_Click(sender As Object, e As EventArgs)
	tChart1.Series.Clear()

	tChart1.Axes.Left.Visible = False
	tChart1.Axes.Bottom.Visible = False
	tChart1.Walls.Visible = False
End Sub
Please check previous code if works as you expected? If isn't work as you want please explain exactly why you think that walls are visible so we can try to help you to solve it.
Question.02.

How can I access/alter following property on run time

TeeChartEditor-->Legend-->Position-->Position Offset %.

Hope you understand above hierarchy , I provide print shot of exact screen as well.
If you want change Position Offset% of legend to run time you need change value of property TopLeftPos as do in following line of code:

Code: Select all

 tChart1.Legend.TopLeftPos=40
I hope will helps.

Thanks,

Re: TChart1.Walls.Visible and Position Offset %

Posted: Wed Jul 06, 2011 6:53 am
by 15659004
Sandra,

Thanks for your effort.

I have attached another document to elaborate, what exactly I demand for.

Hope it will work.

Re: TChart1.Walls.Visible and Position Offset %

Posted: Wed Jul 06, 2011 7:44 am
by 10050769
Hello Maverick,

If you can need set axes property visible = false as do in following line of code:

Code: Select all

    tChart1.Axes.Visible = false;
Can you tell us if previous line of code works as you want?
I hope will helps.

Thanks,

Re: TChart1.Walls.Visible and Position Offset %

Posted: Thu Jul 07, 2011 5:54 am
by 15659004
Sandra,

Bundle of Thanks.

Hmmm...Yes it works and it means the right and top lines left, are part of Axis not walls.

I am facing another problem.

I am switching from TeeChart Pro v7.0.0.7 to TeeChart .Net Pro v.4.0.2011.2082. So all code written for TeeChart7 is required to change according to TeeChart.Net . Following piece of code written for TeeChart7 doesn't seem to work in sample project according to my understanding.

There are 8 points in the Series(0).

Code: Select all

For i  = 1 To 8
      TChart7.Series(0).PointColor(i) = TeeChart.EConstants.clTeeColor
Next
As per my understanding above piece of code should change the color of all 8 points of series. But color is not changed at all after executing it.

Question A.
Please tell me "PointColor" in TeeChart7 was working fine? or i am doing something wrong? OR it depends upon any other property?

Question B.
What is alternate of "PointColor" in TeeChart.Net?

Please consider that i need to use it in a LOOP so

Code: Select all

TChart1.Series(0).Color = Color.Pink
will not work as an alternate in TeeChart.Net for me.

Hope you will not mind my new questions in reply of pervious questions.

Regards,
Maverick.

Re: TChart1.Walls.Visible and Position Offset %

Posted: Thu Jul 07, 2011 9:41 am
by 10050769
Hello Maverick,
Question A.
Please tell me "PointColor" in TeeChart7 was working fine? or i am doing something wrong? OR it depends upon any other property?
About description of PointColor The Series PointColor property is an array of TColor values. Each color value corresponds to a different point in the Series. So, you have understood well the behavior of PointColor and you need know that i TeeChart Activex v7 and v8 it don't works properly but is solved in last Activex 2010, where PointColor works fine.
Question B. What is alternate of "PointColor" in TeeChart.Net?
In TeeChart.Net if you want achieve the same behavior of property PointColor you only need change for each point its color, as do in following lines:

Code: Select all

 for(int i=0; i<8; i++)
            {
                tChart1[0][i].Color = Color.Red;
            }
Hope you will not mind my new questions in reply of pervious questions.
Do not worry I do not care :). But,I suggest you, in future try to do the questions in different threats, so is easier do a tracking for us and the other users, if the different questions are in different threads.

I hope will helps.
Thanks

Re: TChart1.Walls.Visible and Position Offset %

Posted: Thu Jul 07, 2011 10:41 am
by 15659004
Sandra,

Thanks a lot,

The alternate(.Net) of "PointSeries"(ActiveX) is working fine. I must say its realy hard to find it without your support.

I am asking different questions in reply of your answers because in this way i got answers more quickly as compared to the questions asked in different threat. :)

Anyhow i have another question but i will ask in different threat as per your suggestion.

Regards,
Maverick