Wpf/DynamicAxisUnit/VisitsByDateTime.cs

(完整代码) 712B

using System;
using LiveCharts;
using LiveCharts.Configurations;

namespace Geared.Wpf.DynamicAxisUnit
{
    public class VisitsByDateTime
    {
        static VisitsByDateTime()
        {
            //lets configure the type globally
            //notice since this block is inside a 
            //static constructor, it only runs once
            //mappers should ideally only be set once.

            var mapper = Mappers.Xy<VisitsByDateTime>()
                .X(item => item.DateTime.Ticks)
                .Y(item => (double) item.Total);

            Charting.For<VisitsByDateTime>(mapper);
        }

        public decimal Total { get; set; }
        public DateTime DateTime { get; set; }
    }
}

24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明

AI 解读

登录后可用,每次 10 积分,解读结果公开显示在下面。

还没有人解读过这个文件。