scrolling
scrolling
is there a way to find that whether the chart displays all bars or there are any hidden? actually i have a bar chart and i am using axis arrow for scrolling. now the axis arrows should not appear when all the bars can be seen as in taht case there is no point to scroll.
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi shikha,
Yes, you can do something like this:
Yes, you can do something like this:
Code: Select all
public Form1()
{
InitializeComponent();
InitializeChart();
}
private Steema.TeeChart.Styles.Bar bar1;
private Steema.TeeChart.Tools.AxisScroll axisScroll1;
void InitializeChart()
{
bar1 = new Steema.TeeChart.Styles.Bar(tChart1.Chart);
bar1.FillSampleValues();
axisScroll1 = new Steema.TeeChart.Tools.AxisScroll(tChart1.Chart);
tChart1.AfterDraw += new Steema.TeeChart.PaintChartEventHandler(tChart1_AfterDraw);
}
void tChart1_AfterDraw(object sender, Steema.TeeChart.Drawing.Graphics3D g)
{
int visiblePoints = (bar1.LastDisplayedIndex() - bar1.FirstDisplayedIndex()) + 1;
axisScroll1.Active = visiblePoints == bar1.Count ? false : true;
}
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 shikha,
The AxisArrow tool is used to display small arrows at beginning and / or end positions of axes.
The AxisScroll Tool allows you to drag an Axis by selecting it with the Mouse and dragging the Axis with the Left MouseButton depressed.
Kamal Patel's conversor
Carlos Aguilar's conversor
If this doesn't help don't hesitate to let us know.
Sorry, my fault. No, those tools are not the same but same code should apply to both of them.thanks , but i am using axis arrow whereas you have used axis scroll. Are they same. If they are different what are the differences. Also wills ame code will work for both. Thanks.
The AxisArrow tool is used to display small arrows at beginning and / or end positions of axes.
The AxisScroll Tool allows you to drag an Axis by selecting it with the Mouse and dragging the Axis with the Left MouseButton depressed.
We use to make our examples in C# because it's the native language in which TeeChart for .NET is implemented and this makes it easier for us to debug projects. Anyway you can easily convert C# code to VB.NET using any of those conversion engines:also request you to give answers in vb.net language rather than c sharp as i am working into vb.net. Many thanks for your kind help!!!
Kamal Patel's conversor
Carlos Aguilar's conversor
If this doesn't help don't hesitate to let us know.
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 shikha,
Carlos Aguilar's conversor worked fine for me here. I also changed AxisScroll to AxisArrow tool:
Also you can easily generate events at designtime selecting the object you'd like to work with, go to "Properties" window, select "Events" tab, choose the event you'd like to assign and dobule click on it.
Hope this helps!
Carlos Aguilar's conversor worked fine for me here. I also changed AxisScroll to AxisArrow tool:
Code: Select all
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
InitializeChart()
End Sub
Dim bar1 As Steema.TeeChart.Styles.Bar
Dim axisArrow1 As Steema.TeeChart.Tools.AxisArrow
Private Sub InitializeChart()
bar1 = New Steema.TeeChart.Styles.Bar(tChart1.Chart)
bar1.FillSampleValues()
axisArrow1 = New Steema.TeeChart.Tools.AxisArrow(TChart1.Chart)
axisArrow1.Axis = TChart1.Axes.Bottom
AddHandler tChart1.AfterDraw, AddressOf Me.tChart1_AfterDraw
End Sub
Private Sub tChart1_AfterDraw(ByVal sender As Object, ByVal g As Steema.TeeChart.Drawing.Graphics3D)
Dim visiblePoints As Integer = ((bar1.LastDisplayedIndex - bar1.FirstDisplayedIndex) + 1)
axisArrow1.Active = Not (visiblePoints = bar1.Count)
End Sub
Hope this helps!
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 shikha,
You're welcome. I'm glad to hear that worked.
http://www.teechart.net/support/viewtopic.php?t=8636
You're welcome. I'm glad to hear that worked.
Ok, this is available with latest releases. Last one is from 3rd November 2008:also LastDisplayedIndex was not present( it said this property not available) so i have used LastVisibleIndex instead. i am using teechart version 3.02
http://www.teechart.net/support/viewtopic.php?t=8636
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 |