Hello,
Please see attached chart I have included. I have the following questions:
1. The scroll bar is not at the end. How do I move it to the end i.e. far right?
2. The data is daily data but it is crunching everything up. How do I show 1 years of data per screen and then allow a scroll back?
3. Once I do number 2, is there an easy way to set the y-axis for the min./max prices instead of calculating each?
-Mike
display not showing correctly
-
- Newbie
- Posts: 18
- Joined: Tue Apr 09, 2013 12:00 am
display not showing correctly
- Attachments
-
- chart.png (59.94 KiB) Viewed 7803 times
Re: display not showing correctly
Hi Mike,
You can use the ScrollBar Change event to call the Page.Next/Page.Previous (if you go for the pagination) or the Axis.Bottom.SetMinMax (if you go for the manual control of the bottom axis) functions.
You can control the scroll bar manually setting it's Min, Max and Value properties. If you want it at the end, you just have to set Value=Max.sunman4008 wrote:1. The scroll bar is not at the end. How do I move it to the end i.e. far right?
You can use the pagination feature or to manually control the bottom axis Minimum and Maximum properties. See the Tutorial 3 - Chart Paging and Tutorial 4 - Axis Control.sunman4008 wrote:2. The data is daily data but it is crunching everything up. How do I show 1 years of data per screen and then allow a scroll back?
You can use the ScrollBar Change event to call the Page.Next/Page.Previous (if you go for the pagination) or the Axis.Bottom.SetMinMax (if you go for the manual control of the bottom axis) functions.
If you want to fix the left axis to the absolute minimum and maximum values in your series, you can just let the chart to calculate it for you (forcing a repaint before changing any axis scale) and set the left axis Automatic property to False so it won't be further recalculated.sunman4008 wrote:3. Once I do number 2, is there an easy way to set the y-axis for the min./max prices instead of calculating each?
Code: Select all
Private Sub Form_Load()
TChart1.Aspect.View3D = False
TChart1.Legend.Visible = False
TChart1.AddSeries scCandle
TChart1.Series(0).FillSampleValues 1000
TChart1.Environment.InternalRepaint
TChart1.Axis.Left.Automatic = False
HScroll1.Max = Year(TChart1.Series(0).XValues.Maximum)
HScroll1.Min = Year(TChart1.Series(0).XValues.Minimum)
HScroll1.Value = HScroll1.Max
End Sub
Private Sub HScroll1_Change()
TChart1.Axis.Bottom.SetMinMax CDate("1/1/" + Str$(HScroll1.Value)), CDate("31/12/" + Str$(HScroll1.Value))
End Sub
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |