Scichart 中的 DateTimeOffset 支持

DateTimeOffset Support in Scichart

是否可以在scicharts中使用DateTimeOffset作为X轴数据类型?

我尝试创建一个

的 DataSeries

DataSeries<DateTimeOffset,double> 但是得到

的运行时异常

"Cannot create a DataDistributionCalculator for the type TX=System.DateTimeOffset"

根据SciChart documentation for DataSeries,支持的数据类型如下:

NOTE: Allowable types in SciChart include DateTime, TimeSpan, Int64, Int32, Int16, Byte, Double, Float, UInt64, UInt32, UInt16, SByte.

DateTime, TimeSpan are only allowable on TX. The type Decimal (128) bit is not allowed. Custom types are not allowed.

因此,无法在 DataSeries 或 XAxis 中为 TX 声明自定义类型。

但是,您可以使用 LabelProvider feature 实现您想要的效果。如果您的目标是允许将 DateTime 偏移固定数量,那么 LabelProvider 允许您使用代码中的自定义规则在 XAxis 上格式化字符串。

这是你需要的吗?