private void diagrButt_Click(object sender, EventArgs e) { if (funcComboBox.SelectedItem != null) { Object[] arrayOfY = new Object[addSeriaList.Items.Count]; Object[] arrayOfX = new Object[addSeriaList.Items.Count]; for (int i = 0; i < addSeriaList.Items.Count; i++) { arrayOfY[i] = addSeriaList.Items[i]; arrayOfX[i] = dbManager.GetValue("calculations_result", "result", "calculation_number = " + addSeriaList.Items[i] + " AND id_of_formula = " + dbManager.GetValue("formulas", "id_of_formula", "description_of_formula = '" + funcComboBox.Text + "'" + " AND id_of_expert =" + id_of_expert) + " AND id_of_expert =" + id_of_expert); } chart = new ChartM(dbManager.GetValue("formulas", "name_of_formula", "description_of_formula = '" + funcComboBox.Text + "'" + " AND id_of_expert =" + id_of_expert).ToString() + " (" + dbManager.GetValue("formulas", "measurement_of_formula", "description_of_formula = '" + funcComboBox.Text + "'" + " AND id_of_expert =" + id_of_expert).ToString() + ")", "range"); chart.draw(arrayOfX, arrayOfY); chart.ShowDialog(); } else { MessageBox.Show("Оберіть показник"); } }
private void graphButt_Click(object sender, EventArgs e) { Object[] arrayOfY = new Object[addSeriaList.Items.Count]; Object[] arrayOfX = new Object[addSeriaList.Items.Count]; for (int i = 0; i < addSeriaList.Items.Count; i++) { arrayOfY[i] = addSeriaList.Items[i]; arrayOfX[i] = dbManager.GetValue("calculations_result", "result", "calculation_number = " + addSeriaList.Items[i] + " AND id_of_formula = " + dbManager.GetValue("formulas", "id_of_formula", "description_of_formula = '" + funcComboBox.Text + "'")); } chart = new ChartM(dbManager.GetValue("formulas", "name_of_formula", "description_of_formula = '" + funcComboBox.Text + "'").ToString() + " (" + dbManager.GetValue("formulas", "measurement_of_formula", "description_of_formula = '" + funcComboBox.Text + "'").ToString() + ")" , "line"); chart.draw(arrayOfX, arrayOfY); chart.ShowDialog(); }