Good day,
I am at a point were I am stuck and a bit confused with getting the correct x and y values for a specific point on the chart for functions or chart.
In the following example I have a bar chart with a stockhastic and macd function, I am trying to display all the current values at once on a label on the form, but with no luck do I get the correct values at once.
I have included a screen shot with my idea I am trying to accomplish.
Thank you for the support.
Determine X and Y values from mutiple functions
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Re: Determine X and Y values from mutiple functions
Hi Gucci,
Based on this similar example I sent you some days ago, which problems do you have with it? You can access all series in a chart by their index so all functions series are also accessible. Series in a chart range from TChart.Series[0] to TChart.Series[TChart.SeriesCount-1]. Having that in mind you can access to all series with base series type (TChartSeries), cast them to their specific series type if needed (e.g.: TLineSeries, TBarSeries, TCandleSeries, etc.) and access all their properties and values.
Based on this similar example I sent you some days ago, which problems do you have with it? You can access all series in a chart by their index so all functions series are also accessible. Series in a chart range from TChart.Series[0] to TChart.Series[TChart.SeriesCount-1]. Having that in mind you can access to all series with base series type (TChartSeries), cast them to their specific series type if needed (e.g.: TLineSeries, TBarSeries, TCandleSeries, etc.) and access all their properties and values.
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 |
Re: Determine X and Y values from mutiple functions
Good day Narcis,
Sorry maybe I am just miss understanding the concept about the values under the specific axis that is why I ask you this question to understand better how to identify each one and all their values. Sorry for wasting your time.
Sorry maybe I am just miss understanding the concept about the values under the specific axis that is why I ask you this question to understand better how to identify each one and all their values. Sorry for wasting your time.
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Re: Determine X and Y values from mutiple functions
Hi Gucci,
Basically, series and axes in TeeChart have methods to retrieve values from given screen coordinates and viceversa: CalcPosValue, CalcXPos, CalcXPosValue, CalcXSizeValue, etc. You need to use such methods to calculate the values you need, just as I did in my example.
I'm not sure about which are your specific questions. Please provide more detailed information or modify my example so that I can see your exact problems and be able to help you.
Basically, series and axes in TeeChart have methods to retrieve values from given screen coordinates and viceversa: CalcPosValue, CalcXPos, CalcXPosValue, CalcXSizeValue, etc. You need to use such methods to calculate the values you need, just as I did in my example.
I'm not sure about which are your specific questions. Please provide more detailed information or modify my example so that I can see your exact problems and be able to help you.
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 |
Re: Determine X and Y values from mutiple functions
Hi Narcis,
I will have a look at my code and try and determine were the problem is.
I will have a look at my code and try and determine were the problem is.
Re: Determine X and Y values from mutiple functions
Hi,
I have created a sample application to try and explain what I am trying to accomplish. I am trying to display all the values of the functions and candlestick if I move my mouse over any area of the chart. At this stage the value only diplay if the mouse points to a specific function.
I have created a sample application to try and explain what I am trying to accomplish. I am trying to display all the values of the functions and candlestick if I move my mouse over any area of the chart. At this stage the value only diplay if the mouse points to a specific function.
- Attachments
-
- sample.zip
- Sample application
- (11.93 KiB) Downloaded 819 times
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Re: Determine X and Y values from mutiple functions
Hi Gucci,
What you request is very similar to the interpolation example (All features\Welcome!\Chart Styles\Standard\Line (Strip)\Interpolating Line series) in the new features demo, available at TeeChart's program group, which I also implemented here. I also attach your project with the modifications applying the interpolating demo.
What you request is very similar to the interpolation example (All features\Welcome!\Chart Styles\Standard\Line (Strip)\Interpolating Line series) in the new features demo, available at TeeChart's program group, which I also implemented here. I also attach your project with the modifications applying the interpolating demo.
- Attachments
-
- sample.zip
- (7.68 KiB) Downloaded 789 times
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 |