Map series changes axis labels

TeeChart for ActiveX, COM and ASP
Post Reply
Ritchie
Newbie
Newbie
Posts: 15
Joined: Mon May 21, 2001 4:00 am
Location: Scotland

Map series changes axis labels

Post by Ritchie » Wed Nov 30, 2005 3:48 pm

Using Teechart Pro ActiveX 5.0.6.0 in VB6, if I plot a map series with 3 polygons using the left and bottom axes, the left axis displays no labels.

If I then add a line series using the same axes, the text property from the 1st polygon is displayed at the origin on the left axis and none of the left axis values are displayed.

I would like the axis labels to be displayed on both axes. Is there some property or method I have overlooked? Sample code below.

Thanks in advance,
Richard

TChart.RemoveAllSeries
TChart.AddSeries scLine
With TChart.Series(0) '("Equality line")
.Color = vbBlack
.Title = "sh=sH"
.AddXY CSng(txtFields(13)), CSng(txtFields(13)), "", .Color
.AddXY CSng(txtFields(14)), CSng(txtFields(14)), "", .Color
End With

TChart.AddSeries scMap
TChart.Series(1).asMap.UsePalette = True
TChart.Series(1).asMap.UseColorRange = False
TChart.Series(1).Marks.Visible = True
TChart.Series(1).Marks.Arrow.Visible = True
TChart.Series(1).Marks.ArrowLength = 15
TChart.Series(1).ShowInLegend = False

'Add the polygon to the chart as a set of 3 triangles
With TChart.Series(1).asMap.Shapes
.Add
.Polygon(0).AddXY MinStress, MinStress
.Polygon(0).AddXY MinStress, Vstress
.Polygon(0).AddXY Vstress, Vstress
.Polygon(0).Color = vbGreen
.Polygon(0).Text = "Normal"
.Polygon(0).Z = 0

.Add
.Polygon(1).AddXY MinStress, Vstress
.Polygon(1).AddXY Vstress, MaxStress
.Polygon(1).AddXY Vstress, Vstress
.Polygon(1).Color = vbBlue
.Polygon(1).Text = "Strike slip"
.Polygon(1).Z = 1

.Add
.Polygon(2).AddXY Vstress, Vstress
.Polygon(2).AddXY Vstress, MaxStress
.Polygon(2).AddXY MaxStress, MaxStress
.Polygon(2).Color = vbRed
.Polygon(2).Text = "Reverse"
.Polygon(2).Z = 2

End With

Pep
Site Admin
Site Admin
Posts: 3295
Joined: Fri Nov 14, 2003 5:00 am
Contact:

Post by Pep » Thu Dec 01, 2005 11:03 am

Hi Ritchie,

how about adding the following line at the end ? :
TChart.Axis.Left.Labels.Style = talValue

Ritchie
Newbie
Newbie
Posts: 15
Joined: Mon May 21, 2001 4:00 am
Location: Scotland

Map series axis labels

Post by Ritchie » Thu Dec 01, 2005 11:41 am

Hi Pep,

Your suggestion works.

Many thanks,
Richard

Post Reply