123456789101112131415161718192021222324252627282930313233343536373839404142434445464748 |
- using System;
- using System.Collections.Generic;
- using System.Diagnostics;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- using System.Windows;
- using System.Windows.Controls;
- using System.Windows.Data;
- using System.Windows.Documents;
- using System.Windows.Input;
- using System.Windows.Media;
- using System.Windows.Media.Imaging;
- using System.Windows.Shapes;
- using LiveCharts;
- using LiveCharts.Wpf;
- namespace SORTER
- {
- /// <summary>
- /// Логика взаимодействия для Diagram.xaml
- /// </summary>
- public partial class Diagram : Window
- {
- public Diagram(long linearTime, long minMaxTime, long bubleTime, long shuttleTime, long insertionTime)
- {
- InitializeComponent();
- SeriesCollection = new SeriesCollection
- {
- new ColumnSeries
- {
- Title = null,
- Values = new ChartValues<long> { linearTime, minMaxTime, bubleTime, shuttleTime, insertionTime }
- }
- };
- Labels = new[] { "Линейная", "МинМакс", "Пузырьковая", "Челночная", "Вставки" };
- Formatter = value => value.ToString("N");
- DataContext = this;
- }
- public SeriesCollection SeriesCollection { get; set; }
- public string[] Labels { get; set; }
- public Func<double, string> Formatter { get; set; }
- }
- }
|