How can I create a XYZ series Line?

Posted by: smartzq on 8 September 2017, 2:39 pm EST

  • Posted 8 September 2017, 2:39 pm EST

    <P>I need draw a 3D line and  I have written these codes,but it doesn't work ?I don't know where is wrong?</P>
    <P>vb.net 2008     spread 5  3518</P>
    <P>Codes: </P>
    <P>        Dim plotarea As New FarPoint.Win.Chart.XYZPlotArea()<BR>        Dim a As FarPoint.Win.Chart.XYZLineSeries = New FarPoint.Win.Chart.XYZLineSeries<BR>        'a.XValues.DataSource = New FarPoint.Win.Spread.Chart.SeriesDataField(FpSpread1, "Values", "Sheet1!R1C1:R5C1")<BR>        Dim m As Integer<BR>        Dim B1(), B2(), B3() As Double<BR>        ReDim B1(100)<BR>        ReDim B2(100)<BR>        ReDim B3(100)<BR>        For m = 0 To 100<BR>            B1(m) = m * 2.5<BR>            B2(m) = m * 3<BR>            B3(m) = m * 5<BR>        Next<BR>        a.XValues.AddRange(B1)<BR>        a.YValues.AddRange(B2)<BR>        a.ZValues.AddRange(B3)<BR>        plotarea.Location = New PointF(0.2F, 0.2F)<BR>        plotarea.Size = New SizeF(0.6F, 0.6F)<BR>        plotarea.Series.Add(a)<BR>        Dim model As New FarPoint.Win.Chart.ChartModel()<BR>        model.PlotAreas.Add(plotarea)<BR>        FpChart1.Model = model<BR>        FpChart1.ViewType = FarPoint.Win.Chart.ChartViewType.View3D</P>
  • Replied 8 September 2017, 2:39 pm EST

    <p>Hello,<br></p><p>In order to view the z-axis you need to set two
    properties of XYZPlotArea i.e. Elevation and Rotation to some value, then you will be able to see the third axis in XYZLineSeries chart.<br>
    <br></p><blockquote>plotArea.Rotation = 20;<br>plotArea.Elevation = 15;<br></blockquote><p>Hope it will help you. Feel free to ask for further queries. Thanks.<br></p>
  • Replied 8 September 2017, 2:39 pm EST

    done ,thanks~~~~~~
Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels