To change Visible or invisible induvidual datapoint set
-
- Newbie
- Posts: 49
- Joined: Wed Aug 18, 2004 4:00 am
To change Visible or invisible induvidual datapoint set
Dear Steema Team,
Is there any solution to hide a set of datapoint in line graph from 1000's of data set?
Eg. TChart.Item(0).Series(0).Value(0).Visible = false.
As the "Steema Team" suggested to use "OnGetSeriesPointerStyle" event, I tried but it work only with point graph not with line Graph.
If there is no solution for the same, I would like to request "Steema Team" to introduce the feature with next release, since its very necessary for regular use and its very advantage for clients.
Thanks in advance
Ajith
Is there any solution to hide a set of datapoint in line graph from 1000's of data set?
Eg. TChart.Item(0).Series(0).Value(0).Visible = false.
As the "Steema Team" suggested to use "OnGetSeriesPointerStyle" event, I tried but it work only with point graph not with line Graph.
If there is no solution for the same, I would like to request "Steema Team" to introduce the feature with next release, since its very necessary for regular use and its very advantage for clients.
Thanks in advance
Ajith
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Ajith,
You can easily achieve that setting those points to null:
You can easily achieve that setting those points to null:
Code: Select all
Private Sub Form_Load()
TChart1.Series(0).FillSampleValues 100
For i = 40 To 60
TChart1.Series(0).SetNull i
Next
End Sub
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 |
-
- Newbie
- Posts: 49
- Joined: Wed Aug 18, 2004 4:00 am
-
- Newbie
- Posts: 49
- Joined: Wed Aug 18, 2004 4:00 am
hi Narcís,
I checked the code provided by you. There is a problem in it. you will find a gap in between the lines which was set null.
My requirement is to set invisible a purticular set of datapoints when I have thousands of datapoint set and when the user zoom's I want to show the hidden data.
B Regards
Ajith
I checked the code provided by you. There is a problem in it. you will find a gap in between the lines which was set null.
My requirement is to set invisible a purticular set of datapoints when I have thousands of datapoint set and when the user zoom's I want to show the hidden data.
B Regards
Ajith
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Ajith,
Basically, what SetNull does is setting a point's color to clNone. To achieve what you request you can do something like this:
Basically, what SetNull does is setting a point's color to clNone. To achieve what you request you can do something like this:
Code: Select all
Private Sub Form_Load()
TChart1.Series(0).FillSampleValues 100
For i = 40 To 60
TChart1.Series(0).SetNull i
Next
End Sub
Private Sub TChart1_OnZoom()
For i = 0 To TChart1.Series(0).Count - 1
If (TChart1.Series(0).IsNull(i)) Then
TChart1.Series(0).PointColor(i) = clTeeColor
End If
Next i
End Sub
Private Sub TChart1_OnUndoZoom()
For i = 40 To 60
TChart1.Series(0).SetNull i
Next
End Sub
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 |
-
- Newbie
- Posts: 49
- Joined: Wed Aug 18, 2004 4:00 am
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Ajith,
This doesn't happen for me here using TeeChart Pro v7.0.1.3 ActiveX, which is the latest version available at the client area. Which TeeChart version are you using?
This doesn't happen for me here using TeeChart Pro v7.0.1.3 ActiveX, which is the latest version available at the client area. Which TeeChart version are you using?
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 |
-
- Newbie
- Posts: 49
- Joined: Wed Aug 18, 2004 4:00 am
-
- Newbie
- Posts: 49
- Joined: Wed Aug 18, 2004 4:00 am
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
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 |
-
- Newbie
- Posts: 49
- Joined: Wed Aug 18, 2004 4:00 am
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Ajith,
Thanks for the project, I run this on my machine and behaves similar to the code I pasted. I'm afraid I don't understand which is the exact problem you are having. Could you please give us more information about the issue?
Thanks in advance.
Thanks for the project, I run this on my machine and behaves similar to the code I pasted. I'm afraid I don't understand which is the exact problem you are having. Could you please give us more information about the issue?
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 |
-
- Newbie
- Posts: 49
- Joined: Wed Aug 18, 2004 4:00 am
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Ajith,
Thanks for the image.
You can achieve what you request doing something like this:
Thanks for the image.
You can achieve what you request doing something like this:
Code: Select all
Private Sub Form_Load()
Dim StartIndex, EndIndex As Integer
With TChart1.Series(0)
.FillSampleValues 100
For i = 40 To 60
.SetNull i
Next
StartIndex = -1
For i = 0 To .Count - 1
If .IsNull(i) Then
If StartIndex = -1 Then
StartIndex = i
Else
EndIndex = i
End If
End If
Next
TChart1.AddSeries scLine
TChart1.Series(1).Color = .Color
Dim c As Integer
c = 0
While c <= .Count - 1
If c <> StartIndex - 1 Then
TChart1.Series(1).AddXY c, .YValues.Value(c), "", clTeeColor
c = c + 1
Else
TChart1.Series(1).AddXY StartIndex - 1, .YValues.Value(StartIndex - 1), "", clTeeColor
TChart1.Series(1).AddXY EndIndex + 1, .YValues.Value(EndIndex + 1), "", clTeeColor
c = EndIndex + 2
End If
Wend
End With
TChart1.RemoveSeries (0)
End Sub
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 |