i need to sort chart by series but labelvalues on the x-axis has to be changed according to sort..
i used this code
TChart1.series(i).YValues.Order = loDescending
TChart1.series(i).YValues.Sort
TChart1.series(i).XValues.FillSequence
series was sorted but on the bottom is showing for wrong label
ie,
on x-axis i have plotted 2008,2009,2010
on y-axis volume
and have 5 series and i need to sort on the last series descending
how can we sorting chart
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Aravind,
This is because the axes labels drawn correspond to the first series. You should try chaning your last series to first series:
This method changes the Series order, swapping one Series Z position with another. The Chart repaints to reflect the new Series order. It accesses TChart.SeriesList property.
This is because the axes labels drawn correspond to the first series. You should try chaning your last series to first series:
Code: Select all
ExchangeSeries(Series1, Series2: Integer);
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 |
while sorting some data marks visible outside the graph
while sorting , some data marks are appearing outside the graph
i used following code
For i = 0 To TChart1.SeriesCount - 1
TChart1.series(i).XValues.Order = loNone
TChart1.series(i).YValues.Order = loDescending
TChart1.series(i).YValues.Sort
TChart1.series(i).XValues.FillSequence
Next i
TChart1.Repaint
tchart1.Page.MaxPointsPerPage=5
i have enclosed tee file in your newsgroup
pls advise me on this
aravind
i used following code
For i = 0 To TChart1.SeriesCount - 1
TChart1.series(i).XValues.Order = loNone
TChart1.series(i).YValues.Order = loDescending
TChart1.series(i).YValues.Sort
TChart1.series(i).XValues.FillSequence
Next i
TChart1.Repaint
tchart1.Page.MaxPointsPerPage=5
i have enclosed tee file in your newsgroup
pls advise me on this
aravind
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Aravind,
You can clip them using this code:
You can clip them using this code:
Code: Select all
Private Sub TChart1_OnBeforeDrawSeries()
TChart1.Canvas.ClipRectangle TChart1.Axis.Left.Position, _
TChart1.Axis.Top.Position - TChart1.Aspect.Height3D, _
TChart1.Axis.Right.Position + TChart1.Aspect.Width3D, _
TChart1.Axis.Bottom.Position
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 |
still some part of the bar inside is shown on the corners
still some part of the bar is shown inside the chart
for example :
i have kept the max no of points is 5 , do sorting then ur masked code works fine trim outter area but the 6th point is shown half on the corner of the chart ( half bar is visible )
aravind
for example :
i have kept the max no of points is 5 , do sorting then ur masked code works fine trim outter area but the 6th point is shown half on the corner of the chart ( half bar is visible )
aravind
Hi aravind,
it works fine here using the following code, could you please check if it works fine for you ? :
it works fine here using the following code, could you please check if it works fine for you ? :
Code: Select all
Private Sub Form_Load()
With TChart1
.Series(0).FillSampleValues (10)
For i = 0 To TChart1.SeriesCount - 1
.Series(i).YValues.Order = loDescending
.Series(i).YValues.Sort
.Series(i).XValues.FillSequence
Next i
.Page.MaxPointsPerPage = 5
End With
End Sub
Pep Jorge
http://support.steema.com
http://support.steema.com
there is another issue
when i used the code which you have given , the page number ,data table are masked too ... apart from the outer region ...
how can we avoid this issue pls advise me
thanks
aravind
how can we avoid this issue pls advise me
thanks
aravind
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Aravind,
There's a simpler solution then, which is using TChart1.Series(i).Marks.Clip=True:
There's a simpler solution then, which is using TChart1.Series(i).Marks.Clip=True:
Code: Select all
Private Sub Form_Load()
ChartPageNavigator1.Chart = TChart1
With TChart1
For i = 0 To 4
.AddSeries scLine
.Series(i).FillSampleValues (10)
.Series(i).Marks.Visible = True
Next
For i = 0 To TChart1.SeriesCount - 1
.Series(i).YValues.Order = loDescending
.Series(i).YValues.Sort
.Series(i).XValues.FillSequence
.Series(i).Marks.Clip = True
Next i
.Page.MaxPointsPerPage = 5
End With
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 |