You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The real-time graph only shows the data of the last minute on the x-axis, and the VisibleRange property setting is invalid
private void InitializeChart()
{
for (int i = 0; i < 50; i++)
{
var dataSeries = new XyDataSeries<DateTime, double> { FifoCapacity = 10 };
Color color = Color.FromArgb(0xAA, (byte)random.Next(1, 256), (byte)random.Next(1, 256), (byte)random.Next(1, 256));
var lineSeries = new FastLineRenderableSeries()
{
DataSeries = dataSeries,
StrokeThickness = 2,
Stroke = color
};
sciChart.RenderableSeries.Add(lineSeries);
fastLines.Add(dataSeries);
}
}
private void StartTimer()
{
var timer = new Timer(1000);
timer.Elapsed += (sender, e) =>
{
Dispatcher.Invoke(() =>
{
var currentDate = DateTime.Now;
for (int i = 0; i < fastLines.Count; i++)
{
var xAxis = sciChart.XAxes.OfType().FirstOrDefault();
if (xAxis != null&& xAxis.DataRange!=null)
{
var newRange = new DateRange(currentDate.AddSeconds(-60), currentDate);
The real-time graph only shows the data of the last minute on the x-axis, and the VisibleRange property setting is invalid
private void StartTimer()
{
var timer = new Timer(1000);
timer.Elapsed += (sender, e) =>
{
Dispatcher.Invoke(() =>
{
var currentDate = DateTime.Now;
for (int i = 0; i < fastLines.Count; i++)
{
var xAxis = sciChart.XAxes.OfType().FirstOrDefault();
if (xAxis != null&& xAxis.DataRange!=null)
{
var newRange = new DateRange(currentDate.AddSeconds(-60), currentDate);
}
Uploading SciChartDemo.zip…
The text was updated successfully, but these errors were encountered: