Hi David, in case you have any ideas about producing separate pies
from a single list like the following:
...
0.0 15.0 0.0 0.0 70.0 15.0
75.0 15.0 0.0 0.0 10.0 0.0
...

I could really use the help.
I tried the following, but I am ending up with the same pie for all
the planes I am feeding the VB. Having trouble understanding how to
deal with the lists of lists business. I got the sense that you might
have had an idea about how to hack something together...:

For Each line As String In pieValues

      Dim parts As String() = line.Split(" ".ToCharArray())

      'Dim parts As New list (Of String)
      'parts = line.Split(" ".ToCharArray())

      Dim V As New List(Of Double)

      For Each value As String In parts
        V.Add(Convert.ToDouble(value))
      Next

      'Compute the total of all values
      Dim total As Double = 0.0
      For Each val As Double In V
        total += val
      Next

      'Compute the angle of each segment
      Dim angles As New List(Of Double)
      For Each val As Double In V
        If (val = 0.0) Then
          angles.Add(0.0)
        Else
          angles.Add(2.0 * math.PI * (val / total))
        End If
      Next

      'Build the segments
      Dim graph As New List(Of OnPolyCurve)
      Dim angle0 As Double = 0.0

      'Colors
      Dim colors As New List(Of Double)

      For i As int32 = 0 To angles.Count - 1
        Dim color As New Double
        color = i * 0.15
        colors.Add(color)

        If (angles(i) = 0.0) Then
          'skip zero area segments.
        Else
          Dim pie As OnPolyCurve = PieSegment(P, angle0, angles(i),
10)
          graph.Add(pie)


        End If

        angle0 += angles(i)
      Next


      A = graph
      B = colors
      C = parts

      'C = V

    Next

Reply via email to