Ejemplo n.º 1
0
        private void UpdateChart()
        {
            int[] letters = new int[26];
            foreach (char c in InputField_LetterFrequency_TextBox.Text)
            {
                if (!char.IsLetter(c))
                {
                    continue;
                }
                letters[c - 'a']++;
            }

            for (int i = 0; i < 13; i++)
            {
                chart1.updateColumnByName(((char)(i + 'a')).ToString(), letters[i]);
                chart2.updateColumnByName(((char)(i + 'a' + 13)).ToString(), letters[i + 13]);
            }

            ColumnChart.Link(chart1, chart2);
            chart1.Draw(UpperChart);
            chart2.Draw(LowerChart);
        }