void updateData()
 {
     for (int i = 0; i < graph.numDataSeries; i++)           // loop through each radar data series (other series are grids and labels)
     {
         WMG_Series aSeries = graph.lineSeries[i + graph.numGrids].GetComponent <WMG_Series>();
         aSeries.pointValues.SetList(WMG_Util.GenRadar(testData, graph.offset.x, graph.offset.y, graph.degreeOffset));
     }
 }
Ejemplo n.º 2
0
 void updateDataSeries()
 {
     for (int i = 0; i < numDataSeries; i++)
     {
         if (dataSeries.Count <= i)
         {
             WMG_Series aSeries = addSeriesAt(numGrids + i);
             aSeries.connectFirstToLast = true;
             aSeries.hidePoints         = true;
             dataSeries.Add(aSeries);
         }
         if (dataSeriesColors.Count <= i)
         {
             dataSeriesColors.AddNoCb(new Color(Random.Range(0f, 1f), Random.Range(0f, 1f), Random.Range(0f, 1f), 1), ref _dataSeriesColors);
         }
     }
     for (int i = dataSeries.Count - 1; i >= 0; i--)
     {
         if (dataSeries[i] != null && i >= numDataSeries)
         {
             deleteSeriesAt(numGrids + i);
             dataSeries.RemoveAt(i);
         }
     }
     for (int i = dataSeriesColors.Count - 1; i >= 0; i--)
     {
         if (i >= numDataSeries)
         {
             dataSeriesColors.RemoveAtNoCb(i, ref _dataSeriesColors);
         }
     }
     for (int i = 0; i < numDataSeries; i++)
     {
         WMG_Series aSeries = lineSeries[i + numGrids].GetComponent <WMG_Series>();
         if (randomData)
         {
             aSeries.pointValues.SetList(WMG_Util.GenRadar(WMG_Util.GenRandomList(numPoints, radarMinVal, radarMaxVal), offset.x, offset.y, degreeOffset));
         }
         aSeries.lineScale   = dataSeriesLineWidth;
         aSeries.linePadding = dataSeriesLineWidth;
         aSeries.lineColor   = dataSeriesColors[i];
     }
 }