private void buttonGeneruj_Click(object sender, RoutedEventArgs e) { if (comboBoxFirstColumn.SelectedIndex == -1 || comboBoxSecondColumn.SelectedIndex == -1 || comboBoxClassColumn.SelectedIndex == -1) { MessageBox.Show("Nie wybrano wartości dla wszystkich kolumn"); } else { classPointList = DataTableService.GetColumnFromTableAsClassPointList(mainTable, comboBoxFirstColumn.SelectedIndex, comboBoxSecondColumn.SelectedIndex, comboBoxClassColumn.SelectedIndex); cartesianChart.Series = ChartsService.GetNewSeriesCollectionDependOnColumns(classPointList); axisX.Title = comboBoxFirstColumn.SelectedItem.ToString(); axisY.Title = comboBoxSecondColumn.SelectedItem.ToString(); buttonRozwinKlasyfikacje.IsEnabled = true; } }