ASE Home Page Products Download Purchase Support About ASE
ChartDirector Support
Forum HomeForum Home   SearchSearch

Message ListMessage List     Post MessagePost Message

  scatter chart yAXIS value hidden behind chart
Posted by icm63 on Jul-28-2016 15:15
Attachments:
Please image attached, refer to RED TEXT at the top...

How do I get the value out from behind the chart?

Thanks
yaxis_value_alignment_issue.png

  Re: scatter chart yAXIS value hidden behind chart
Posted by Peter Kwan on Jul-29-2016 02:44
Hi icm63,

Would you mind to inform me how do you add the labels? The charting part of the code would be useful.

If the labels were added as y-axis labels (eg. using Axis.setLabels, Axis.addLabel, Axis.addMark, Axis.setLinearScale or Axis.setLinearScale2), they should stay on top of the plot area instead of under it.

Regards
Peter Kwan

  Re: scatter chart yAXIS value hidden behind chart
Posted by icm63 on Jul-29-2016 15:04
            c.xAxis().setTitle("X = " & sAxisTitleX, "Arial Bold", 10)
            c.zAxis().setTitle("Z = " & sAxisTitleZ, "Arial Bold", 10)
            c.xAxis().setColors(&HFFFFFF, &HFF0000, &HFF0000, -1)
            c.yAxis().setColors(Chart.Transparent, Chart.Transparent, Chart.Transparent, -1)
            c.zAxis().setColors(&HFFFFFF, &H0, &H0, -1)
            c.yAxis().setLinearScale(0, 0)


                c.setPlotRegion(400, 290, 630, 0, 430)
                c.setViewAngle(0, 0)
                c.setWallColor(&HFFFFFF, &HFFFFFF, &HFFFFFF - 1)
                c.setWallGrid(&HC0C0C0, &HC0C0C0, &HC0C0C0, Chart.Transparent, Chart.Transparent, Chart.Transparent)
                c.setWallThickness(10, 10, 10)
                c.setWallVisibility(True, True, True)
                Dim leg As ChartDirector.LegendBox = c.addLegend(730, 5)
                leg.setFontSize(7, 14)




    Public Sub AddData(ByVal DataName As String, ByVal xData() As Double, ByVal yData() As Double, _
    ByVal zData() As Double, ByVal DataShape As Integer, Optional ByVal ChartType As Integer = 1)

        Dim symbols() As Integer = {Chart.CircleShape, _
        Chart.GlassSphereShape, _
        Chart.GlassSphere2Shape, _
        Chart.SolidSphereShape, _
        Chart.SquareShape, _
        Chart.DiamondShape, _
        Chart.TriangleShape, _
        Chart.RightTriangleShape, _
        Chart.LeftTriangleShape, _
        Chart.InvertedTriangleShape, _
        Chart.StarShape(3), _
        Chart.StarShape(4), _
        Chart.StarShape(5), _
        Chart.StarShape(6), _
        Chart.StarShape(7), _
        Chart.StarShape(8), _
        Chart.StarShape(9), _
        Chart.StarShape(10), _
        Chart.PolygonShape(5), _
        Chart.Polygon2Shape(5), _
        Chart.PolygonShape(6), _
        Chart.Polygon2Shape(6), _
        Chart.CrossShape(0.1), _
        Chart.CrossShape(0.2), _
        Chart.CrossShape(0.3), _
        Chart.CrossShape(0.4), _
        Chart.CrossShape(0.5), _
        Chart.CrossShape(0.6), _
        Chart.CrossShape(0.7), _
        Chart.Cross2Shape(0.1), _
        Chart.Cross2Shape(0.2), _
        Chart.Cross2Shape(0.3), _
        Chart.Cross2Shape(0.4), _
        Chart.Cross2Shape(0.5), _
        Chart.Cross2Shape(0.6), _
        Chart.Cross2Shape(0.7), _
        Chart.Cross2Shape(0.8), _
        Chart.Cross2Shape(0.9), _
        Chart.CrossShape(0.8), _
        Chart.CrossShape(0.9)}

        Dim g As ThreeDScatterGroup = c.addScatterGroup(xData, yData, zData, DataName, symbols(DataShape), 11)

  Re: scatter chart yAXIS value hidden behind chart
Posted by Peter Kwan on Jul-30-2016 02:09
Hi icm63,

I see now that the chart is drawn as a 3D scatter chart, but with the 3D region depth being 0. This probably is the cause of the problem, as ChartDirector may not be able to determine the orientation of a zero height wall.

For your case, as the chart is 2D in nature, it seems more natural to use the XYChart instead. If you must use a 3D chart, please set the depth to 1 instead of 0. ChartDirector should then be able to determine the orientation of the wall and put the labels on the "outside" of the wall.

Regards
Peter Kwan

  Re: scatter chart yAXIS value hidden behind chart
Posted by icm63 on Jul-30-2016 03:18
Great works a treat!

Thanks