Page 1 of 1

Map series changes axis labels

Posted: Wed Nov 30, 2005 3:48 pm
by 6919168
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

Posted: Thu Dec 01, 2005 11:03 am
by Pep
Hi Ritchie,

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

Map series axis labels

Posted: Thu Dec 01, 2005 11:41 am
by 6919168
Hi Pep,

Your suggestion works.

Many thanks,
Richard