public void SetValues(int[] workers, int[] workplaces)
        {
            m_legendL0.prefix = workers[0] + "/" + workplaces[0] + " ";
            m_legendL1.prefix = workers[1] + "/" + workplaces[1] + " ";
            m_legendL2.prefix = workers[2] + "/" + workplaces[2] + " ";
            m_legendL3.prefix = workers[3] + "/" + workplaces[3] + " ";
            int sum = workplaces.Sum();

            if (sum == 0)
            {
                sum = 1;
            }
            m_legendFr.prefix = (sum - workers.Sum()) + " ";
            int porc0 = workers[0] * 100 / sum;
            int porc1 = workers[1] * 100 / sum;
            int porc2 = workers[2] * 100 / sum;
            int porc3 = workers[3] * 100 / sum;

            m_workersChart.SetValues(new int[] { porc0, porc1, porc2, porc3, 100 - porc0 - porc1 - porc2 - porc3 });

            porc0 = workplaces[0] * 100 / sum;
            porc1 = workplaces[1] * 100 / sum;
            porc2 = workplaces[2] * 100 / sum;

            m_workplaceChart.SetValues(new int[] { porc0, porc1, porc2, 100 - porc0 - porc1 - porc2 });
        }
Exemplo n.º 2
0
 public void SetValues(int[] values)
 {
     agesChart.SetValues(values);
 }