how to find the x-axis position ?
how to find the x-axis position ?
how to find the x-axis position ?
when we plot any graph x and y -axis , i would lik to know the x-axis coordinates drawn in the tchart (say x=530,y=120 where tchart height =650 and 700)
and also when we insert the legend on the bottom / changing the label in the x-axis to 90% is moving the x-axis little bit up , but i would like to know the exact value of the x-axis .
reply asap
when we plot any graph x and y -axis , i would lik to know the x-axis coordinates drawn in the tchart (say x=530,y=120 where tchart height =650 and 700)
and also when we insert the legend on the bottom / changing the label in the x-axis to 90% is moving the x-axis little bit up , but i would like to know the exact value of the x-axis .
reply asap
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi daryl,
Values from screen coordinates like this:
You can obtain pixel screen coordinates from values using this:when we plot any graph x and y -axis , i would lik to know the x-axis coordinates drawn in the tchart (say x=530,y=120 where tchart height =650 and 700)
Code: Select all
X = TChart1.Axis.Bottom.CalcXPosValue(530)
Y = TChart1.Axis.Left.CalcYPosValue(120)
Code: Select all
XVal = TChart1.Axis.Bottom.CalcPosPoint(650)
YVal = TChart1.Axis.Left.CalcPosPoint(700)
You can obtain axis positions like this:and also when we insert the legend on the bottom / changing the label in the x-axis to 90% is moving the x-axis little bit up , but i would like to know the exact value of the x-axis .
Code: Select all
TChart1.Axis.Bottom.Position
TChart1.Axis.Bottom.StartPosition
TChart1.Axis.Bottom.EndPosition
Last edited by Narcís on Mon Mar 19, 2007 4:01 pm, edited 1 time in total.
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 |
posted word document with details inside
posted word document pls go through and reply me asap
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi daryl,
I think that you should use CalcXPosValue method. All methods are fully described in TeeChart's documentation.
I think that you should use CalcXPosValue method. All methods are fully described in TeeChart's documentation.
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 |
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi daryl,
Sorry but I don't understand what do you exactly mean. Could you please give us some more details about your problem?
Thanks in advance.
Sorry but I don't understand what do you exactly mean. Could you please give us some more details about your problem?
Thanks in advance.
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 |
i have posted in the word document
for 2004 series in the graph y value is 202 and 752 for 2 points
in order to place/move the marks in the middle
for point 1 = (202- XAXIS.XVALUE )/2 + 202 so that it moves to the middle
similarly for point 2in 2004 =(752-202)/2 + 752
NOW SERIES ONE AND POINT 1 ONLY I HAVE issue because starting value is unknown but where as rest of the points i have 2 values .
so i need to find this starting value
Note: moving this marks to centre for stacked graph
for 2004 series in the graph y value is 202 and 752 for 2 points
in order to place/move the marks in the middle
for point 1 = (202- XAXIS.XVALUE )/2 + 202 so that it moves to the middle
similarly for point 2in 2004 =(752-202)/2 + 752
NOW SERIES ONE AND POINT 1 ONLY I HAVE issue because starting value is unknown but where as rest of the points i have 2 values .
so i need to find this starting value
Note: moving this marks to centre for stacked graph
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi daryl,
Sorry but I still don't understand what are you exactly trying to achieve here. I'm afraid you are mixing X and Y coordinates here. Could you please send us a simple example project we can run "as-is" to reproduce the problem here and let us know how would you expect marks to be drawn?
Thanks in advance.
Sorry but I still don't understand what are you exactly trying to achieve here. I'm afraid you are mixing X and Y coordinates here. Could you please send us a simple example project we can run "as-is" to reproduce the problem here and let us know how would you expect marks to be drawn?
Thanks in advance.
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 |
Sample vb application is enclosed which replicates the Moving the marks into centre for stackgraph .
Once you go through the app ,you will be able to get an idea of wat my requirement , how ever requirement is achieved with an assumed x-axis position but to be precise , i need to know how to find the x-axis position
. Could you Pls reply ASAP
Once you go through the app ,you will be able to get an idea of wat my requirement , how ever requirement is achieved with an assumed x-axis position but to be precise , i need to know how to find the x-axis position
. Could you Pls reply ASAP
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi daryl,
As I told you in previous messages, you can calculate bottom axis position much easily using TChart1.Axis.Bottom.Position. Have you tried using this?
As I told you in previous messages, you can calculate bottom axis position much easily using TChart1.Axis.Bottom.Position. Have you tried using this?
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 |
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi daryl,
I've made a little modification to your project for calculation marks position. You can see the code below and this should be independent of legend's position or labels angle. I've also attached modified project at the newsgroups.
Is this solution acceptable for you?
I've made a little modification to your project for calculation marks position. You can see the code below and this should be independent of legend's position or labels angle. I've also attached modified project at the newsgroups.
Code: Select all
With TChart1.Series(i).Marks
'MarkHeight = ((.ShapeBounds.Bottom - .ShapeBounds.Top))
MarkHeight = 10
.Arrow.Visible = False
If i = 0 Then
.Positions.Position(j).LeftTop.Y = TChart1.Axis.Bottom.Position + ((TChart1.Series(i).CalcYPos(j) - TChart1.Axis.Bottom.Position) / 2) - MarkHeight
Else
.Positions.Position(j).LeftTop.Y = TChart1.Series(i - 1).CalcYPos(j) + ((TChart1.Series(i).CalcYPos(j) - TChart1.Series(i - 1).CalcYPos(j)) / 2) - MarkHeight
End If
End With
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 |
Hi Narcis ,
Thanks for the code
I have another kind of graph i.e. scArea with stacked 100% and stairs for this I want to keep the marks in centre how can I do , I am enclosed the sample project in the mail
Pls check and respond
Thanks
aravind
"Narcís Calvet" <support@steema.com> wrote in message news:<cesp0jedHHA.408@TEEPC.Steema.local>...
> Hi aravind,
>
> Please find attached your project modified as I told you in the forums.
>
>
> --
> Best Regards,
>
> Narcis Calvet
> Steema Support Central
> http://support.steema.com
>
> "Important note: If you are a TeeChart registered customer, please post your
> support questions at Steema's Support monitored Forums for customers:
> http://support.steema.com for a prompter reply."
>
> aravind wrote:
> > Sample vb application is enclosed . Could you Pls reply ASAP
>
>
>
>
Thanks for the code
I have another kind of graph i.e. scArea with stacked 100% and stairs for this I want to keep the marks in centre how can I do , I am enclosed the sample project in the mail
Pls check and respond
Thanks
aravind
"Narcís Calvet" <support@steema.com> wrote in message news:<cesp0jedHHA.408@TEEPC.Steema.local>...
> Hi aravind,
>
> Please find attached your project modified as I told you in the forums.
>
>
> --
> Best Regards,
>
> Narcis Calvet
> Steema Support Central
> http://support.steema.com
>
> "Important note: If you are a TeeChart registered customer, please post your
> support questions at Steema's Support monitored Forums for customers:
> http://support.steema.com for a prompter reply."
>
> aravind wrote:
> > Sample vb application is enclosed . Could you Pls reply ASAP
>
>
>
>
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi daryl,
The same code I posted before works fine for this example. Have you tried using it there? If it is not what are you exactly looking for a similar approach should be used.
The same code I posted before works fine for this example. Have you tried using it there? If it is not what are you exactly looking for a similar approach should be used.
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 |