WPF large data analysis results show (rpm)

link: https://www.cnblogs.com/luoyuhao/p/12127588.html

Chapeau

        After a period of research, and finally to achieve the same effect of CS and BS big data show platform. First, let's look at the results achieved, stunning effect, customers particularly like personally very pleased to share to you, the exchange of learning along with everyone.

Large data display platform

As can be seen from the chart, it is divided into three columns left, right, left and right main display icon-based, middle section shows the map, which shows mainly used in the logistics industry, the highlight is the middle of the map, covering the logistics in place and line Maps show the most, the effect is very hyun, use WPF to reality, the picture is sliced, studied for four nights to do this effect.

Ctrl + F1 shortcut keys can be set to the database

Shortcut keys Ctrl + F2 system can title, corporate vision and the latest trends, company announcements and maps color and line settings, so for most customers.

This can be completely customized to adapt to multiple customers, because my company a lot of customers, it must be the public version, then customize settings here apply to a lot of customers.

Implementation code

Data acquisition code is no longer shows the share under the following part of the code, the first part of the map, the Canvas to draw a line like, thus generating a map.

  View Code

 

 

 

The code for drawing a line from one point to another point on the map as follows:

  View Code

 

Use the left and right sides of the icon is Visifire.Charts.dll to achieve, the Internet has a lot of examples, in fact, no BS CS chart achieve out so beautiful, the chart also studied for a long time, did not find relatively easy to use chart control, you have good control charts recommend?

FIG example, line:

  View Code

 

 

Histogram:

  View Code

 

 But also for timing data refresh frequency of minutes, 8:00 pm to 7:00 am not refresh the data, thus reducing the pressure on the server.

private DispatcherTimer RefreshDataTimer = null;

 RefreshDataTimer = new DispatcherTimer();
 RefreshDataTimer.Tick += new EventHandler(OnDataEvent);
 RefreshDataTimer.Interval = new TimeSpan(0, 5, 0);//5分钟一刷新
 RefreshDataTimer.Start();
复制代码
  //获取当前系统时间并判断是否为服务时间
            TimeSpan nowDt = DateTime.Now.TimeOfDay;

            TimeSpan workStartDT = DateTime.Parse("20:00").TimeOfDay;
            TimeSpan workEndDT = DateTime.Parse("08:00").TimeOfDay;
            if (nowDt > workStartDT && nowDt < workEndDT)
            {
                getdata();
            }
复制代码

以上说明了大概的实现思路。

 结束语

       现在大数据分析在我们日常开发软件中经常遇到,一旦有了这个经常会给软件打上高大上的标签,客户很青睐,报价多个一两万轻而易举的事情,后续还需继续完善,在市场上会越来越多的大屏展示数据有我们这样的软件出现。

 

 

程序文件:https://files.cnblogs.com/files/luoyuhao/%E5%A4%A7%E6%95%B0%E6%8D%AE%E5%B9%B3%E5%8F%B0.rar

Guess you like

Origin www.cnblogs.com/xiexiaokui/p/12150711.html