如何创建从串行端口读取的“实时图表”

时间:2019-03-24 09:53:56

标签: c# charts arduino serial-port livecharts

我需要在X轴上创建带有时间的“实时图形”,并从Y轴上的串行端口接收两倍的数据。我已经有连接,但是我不知道如何将数据添加到图形中。 (使用https://lvcharts.net/

就像每次从串行端口接收数据一样,使用此数据在图表中创建新点。

您知道比使用实时图表模块更简单的方法吗?

谢谢您的回答:)

protected override void OnModelCreating(DbModelBuilder modelBuilder)
{
        var typesToRegister = Assembly.GetExecutingAssembly()
            .GetTypes()
            .Where(type => !String.IsNullOrEmpty(type.Namespace))
            .Where(type => type.BaseType != null
            && type.BaseType.IsGenericType
            && type.BaseType.GetGenericTypeDefinition() == typeof(EntityTypeConfiguration<>));

        foreach (var type in typesToRegister)
        {
            dynamic configurationInstance = Activator.CreateInstance(type);
            modelBuilder.Configurations.Add(configurationInstance);
        }

        base.OnModelCreating(modelBuilder);
}

0 个答案:

没有答案