Это код для графика (функция оси X и серия линий Y). Я не могу получить (Метки) для просмотра метки времени, которая находится в формате разделителя строк. ... private void Graph_2 (List array_DateTime)
{
var Array_Percentage = array_DateTime;
List<String> dateTimes = new List<String>();
// List<DateTime> dateTimes = new List<DateTime>();
foreach (var Time in Array_Percentage)
{
dateTimes.Add(Time.TStamp.ToString("HH:mm:ss"));
}
dateTimes.Sort();
cartesianChart1.DisableAnimations = true; cartesianChart1.Hoverable = false;
cartesianChart1.Zoom = ZoomingOptions.Xy;
cartesianChart1.Pan = PanningOptions.Xy;
cartesianChart1.AxisX.Add (новая ось {
Title = "Time Stamp",
Labels = dateTimes,
ShowLabels = true,
Position = AxisPosition.LeftBottom,
DataContext = this
});
FD_T_Act = new LineSeries
{
Title = "FD_T_Act",
Values = Array_Percentage.Select(x => x.FD_T_Act).AsChartValues(),
ScalesYAt = 0,
Stroke = System.Windows.Media.Brushes.Black,
// Fill = System.Windows.Media.Brushes.Transparent,
PointGeometry = DefaultGeometries.Diamond,
PointGeometrySize = 10,
};
Stm_Percent = new LineSeries
{
Title = "Stm_FLow_max",
Values = Array_Percentage.Select(x => x.Stm_FLow).AsChartValues(),
ScalesYAt = 1,
Stroke = System.Windows.Media.Brushes.Red,
// Fill = System.Windows.Media.Brushes.Transparent,
PointGeometry = DefaultGeometries.Square,
PointGeometrySize = 10
};
Stm_Press = new LineSeries
{
Title = "Stm_Press",
Values = Array_Percentage.Select(x => x.Stm_Press).AsChartValues(),
ScalesYAt = 2,
Stroke = System.Windows.Media.Brushes.Blue,
// Fill = System.Windows.Media.Brushes.Transparent,
PointGeometry = DefaultGeometries.Cross,
PointGeometrySize = 10
};
cartesianChart1.AxisY.Add (новая ось {
Foreground = System.Windows.Media.Brushes.Red,
Position = AxisPosition.LeftBottom,
Title = "Stm_Flow_max"
});
cartesianChart1.AxisY.Add(new Axis
{
Foreground = System.Windows.Media.Brushes.Blue,
Position = AxisPosition.LeftBottom,
Title = "Stm_Press"
});
cartesianChart1.Series = new SeriesCollection {
FD_T_Act,
Stm_Percent,
PRV_Pressure_avg,
} ...