예제 #1
0
    // Get the maxValue of all DataSeries(not just the max of the latest sampling).
    public override void UpdateMaxY()
    {
        Transform transf  = PlotterGroup.transform;
        float     tempMax = 0;

        for (int idx = 0; idx < transf.childCount; idx++)
        {
            string     name    = MeshUtils.NameGenerator(Identifier, idx);
            GameObject obj     = transf.Find(name).gameObject;
            DataSeries pltr    = obj.GetComponent <DataSeries>();
            float      lineMax = pltr.GetMax();
            if (lineMax > tempMax)
            {
                tempMax = lineMax;
            }
        }
        if (yValueCanOnlyIncrease)
        {
            maxYValue = (tempMax > maxYValue) ? tempMax : maxYValue;
        }
        else
        {
            maxYValue = (tempMax == 0) ? maxYValue : tempMax;
        }
    }