How to create a company's big data screen
Speaking of big data screens, everyone can think of Tmall Double 11 big data screens, cool! Yes, large data screens are all about cool effects. I've done it once before, so I'll summarize how I did it.
I only got the 1920*1080 design drawing given by the designer, but it is not necessarily this size. At present I don’t know what the screen size is for displaying this data, so I can only make an adaptive effect! How to achieve adaptive effect. I have thought of several solutions. The current solution I am using is to use vh and vw units for page layout. For some introduction to these two units, I have written an article before, http://www.haorooms.com/post/css_unit_calc. In this way, adaptive layout can be achieved.
Benefits of using vh and vw units
1. The scroll axis can appear without the page flickering. The code is as follows:
@media screen and (min-width: 960px) { //之所以进行宽度判断,是因为移动端滚动轴不占宽度 html { margin-left: calc(100vw - 100%); margin-right: 0; }}
From now on, we don’t have to It’s hard to calculate the width of the scroll axis. To calculate the width of the scroll axis, please click
2. Because I am in full screen, there is no need for the scroll axis to appear, but scrolling may occur on different zoom screens. Axis, you can use the following code to cancel the scroll axis display.
html { width:100vw; height:100vh; overflow:hidden;}
Disadvantages
1. It is relatively troublesome to calculate
2. When the parent element is positioned, it can be replaced by percentage. The percentage is compatible with VH and VW. Good sex. (My large data screen does not require good compatibility, so I chose vh and vw)
2. Number and percentage scrolling effects
Regarding the number scrolling effect, I used it a long time ago A plug-in, but this uses pictures for scrolling, because I am in trouble, we can currently use css3 for digital scrolling!
3. Each time setTimeout is executed, the time increases by one second.
This application is more about executing a piece of code every other random number, and the time interval is different!
I used setInterval at first, but found that the time of each execution was the time of the first execution. That is because after setInterval is called, it will be added to the timer execution queue, waiting for binding. The function is executed, which means that the set interval time will only be effective once. Then use setTimeout instead. Regarding setTimeout, I also mentioned it in my previous article!
The code to execute a random number is as follows:
function runRandom(obj){ var timeout=Math.round(Math.random()*1000+1000); clearTimeout(obj.randomTime); obj.randomTime=setTimeout(function timeoutFun(){ //执行你的逻辑 timeout=Math.round(Math.random()*1000+1000); obj.randomTime=setTimeout(timeoutFun,timeout); },timeout);}
Part of my code is as follows:
flip:function(obj){ var _this =this; clearTimeout(obj.flip); obj.flip=setTimeout(function timeoutFun(){ if(_this.SwithIndex<5){ $("#dataUpadteSwitch").find("li").eq(_this.SwithIndex).addClass("current").siblings().removeClass("current"); _this.SwithIndex++; _this.initTime+=1000;//每执行一次增加1000毫秒 // console.log(_this.initTime) //右上角百分比,速度快慢可以调整 _this.baifenbiAnimate("loadingDatabfb",0,1,100,10+_this.SwithIndex*10); //右上角旋转动画,快慢可以调整-调整旋转速度变慢-推迟0.5s _this.routedSpeed((1+_this.SwithIndex/2)+"s"); }else{ _this.SwithIndex=0;//循环执行,执行5次之后从头开始执行 _this.initTime=3000;//一开始是3000毫秒 } obj.flip=setTimeout(timeoutFun,_this.initTime); },_this.initTime);}
4. Echart automatically triggers the tooltip
There are many data in the big screen They are all triggered automatically, without mouse interaction, and are executed every few seconds. We used a table similar to a map of China, but the tooltip is automatically triggered. The data is updated every few seconds and triggered once!
First set triggerOn under the tooltip to none, and then trigger it through dispatchAction. The official API explanation is vague, but it is actually very simple. The code is as follows:
myChart.dispatchAction({ type: 'showTip', // 系列的 index,在 tooltip 的 trigger 为 axis 的时候可选。 name: (convertData(obj.mapData.sort(function(a, b) { return b.value - a.value; }).slice(0, 1)))[0].name //获取最多数据的名字});
This way it can be triggered automatically
5. Use svg to make a dynamic clock
The large data screen needs a dynamic time. The time jumps and a clock is needed. I will share my code here:
html code is as follows:
<div id="nowtimes"> <div class="parent"> <svg height="200" width="200" viewBox="0 0 1000 1000"> <path d="M978,500c0,263.99-214.01,478-478,478s-478-214.01-478-478,214.01-478,478-478,478,214.01,478,478zm-888.93,237.25,20.179-11.65m779.16-449.85l22.517-13m-648.18,648.18,11.65-20.18m449.85-779.16l13-22.517m-711.75,410.93h23.305m899.7,0h26m-885.43-237.25,20.179,11.65m779.16,449.85,22.517,13m-648.18-648.18l11.652,20.183m449.85,779.16,13,22.517m-237.25-885.43v23.305m0,899.7,0,26"/> <path d="M500,500,500,236" id="hour"/> <path d="M500,500,500,120" id="min" /> <path d="M500,500,500,90" id="sec" /> </svg> </div> <div class="tdtimes" id="tdtimes"></div> </div>
css code is as follows:
/* 钟表样式*/svg {position: absolute;top: 10%; width: 100%; height: 80%;}path { stroke: #fff;stroke-linecap:round; stroke-width: 35;fill:none;}#sec { stroke: #fff; stroke-width: 20;}#min {stroke: #fff;stroke-width: 30;}#hour { stroke: #fff;stroke-width: 30;}#nowtimes{margin-top:7px;}#nowtimes .parent{width:30px;position:relative;height:30px;display: inline-block;vertical-align: middle;}.tdtimes{display: inline-block;font-size:.7vw;color:#979798;vertical-align: middle;}
js code is as follows:
setInterval(function() { function r(el, deg) { el.setAttribute('transform', 'rotate('+ deg +' 500 500)') } var d = new Date(); r(sec, 6*d.getSeconds()); r(min, 6*d.getMinutes()); r(hour, 30*(d.getHours()%12) + d.getMinutes()/2); $("#tdtimes").html(d.getHours() +":" +d.getMinutes() +":" +d.getSeconds()); }, 1000)
This is it The effects of the small clock and the jumping time on the right side are completed!
I believe you have mastered the methods after reading these cases. For more exciting information, please pay attention to other related articles on the php Chinese website!
Related reading:
How to use CSS3 to make icon effects
How to use CSS3 to make it Display text animation when illuminated by light
css3 click to display ripple special effects
The above is the detailed content of How to create a company's big data screen. For more information, please follow other related articles on the PHP Chinese website!

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics



DDREASE is a tool for recovering data from file or block devices such as hard drives, SSDs, RAM disks, CDs, DVDs and USB storage devices. It copies data from one block device to another, leaving corrupted data blocks behind and moving only good data blocks. ddreasue is a powerful recovery tool that is fully automated as it does not require any interference during recovery operations. Additionally, thanks to the ddasue map file, it can be stopped and resumed at any time. Other key features of DDREASE are as follows: It does not overwrite recovered data but fills the gaps in case of iterative recovery. However, it can be truncated if the tool is instructed to do so explicitly. Recover data from multiple files or blocks to a single

0.What does this article do? We propose DepthFM: a versatile and fast state-of-the-art generative monocular depth estimation model. In addition to traditional depth estimation tasks, DepthFM also demonstrates state-of-the-art capabilities in downstream tasks such as depth inpainting. DepthFM is efficient and can synthesize depth maps within a few inference steps. Let’s read about this work together ~ 1. Paper information title: DepthFM: FastMonocularDepthEstimationwithFlowMatching Author: MingGui, JohannesS.Fischer, UlrichPrestel, PingchuanMa, Dmytr

If you need to know how to use filtering with multiple criteria in Excel, the following tutorial will guide you through the steps to ensure you can filter and sort your data effectively. Excel's filtering function is very powerful and can help you extract the information you need from large amounts of data. This function can filter data according to the conditions you set and display only the parts that meet the conditions, making data management more efficient. By using the filter function, you can quickly find target data, saving time in finding and organizing data. This function can not only be applied to simple data lists, but can also be filtered based on multiple conditions to help you locate the information you need more accurately. Overall, Excel’s filtering function is a very practical

The performance of JAX, promoted by Google, has surpassed that of Pytorch and TensorFlow in recent benchmark tests, ranking first in 7 indicators. And the test was not done on the TPU with the best JAX performance. Although among developers, Pytorch is still more popular than Tensorflow. But in the future, perhaps more large models will be trained and run based on the JAX platform. Models Recently, the Keras team benchmarked three backends (TensorFlow, JAX, PyTorch) with the native PyTorch implementation and Keras2 with TensorFlow. First, they select a set of mainstream

Facing lag, slow mobile data connection on iPhone? Typically, the strength of cellular internet on your phone depends on several factors such as region, cellular network type, roaming type, etc. There are some things you can do to get a faster, more reliable cellular Internet connection. Fix 1 – Force Restart iPhone Sometimes, force restarting your device just resets a lot of things, including the cellular connection. Step 1 – Just press the volume up key once and release. Next, press the Volume Down key and release it again. Step 2 – The next part of the process is to hold the button on the right side. Let the iPhone finish restarting. Enable cellular data and check network speed. Check again Fix 2 – Change data mode While 5G offers better network speeds, it works better when the signal is weaker

I cry to death. The world is madly building big models. The data on the Internet is not enough. It is not enough at all. The training model looks like "The Hunger Games", and AI researchers around the world are worrying about how to feed these data voracious eaters. This problem is particularly prominent in multi-modal tasks. At a time when nothing could be done, a start-up team from the Department of Renmin University of China used its own new model to become the first in China to make "model-generated data feed itself" a reality. Moreover, it is a two-pronged approach on the understanding side and the generation side. Both sides can generate high-quality, multi-modal new data and provide data feedback to the model itself. What is a model? Awaker 1.0, a large multi-modal model that just appeared on the Zhongguancun Forum. Who is the team? Sophon engine. Founded by Gao Yizhao, a doctoral student at Renmin University’s Hillhouse School of Artificial Intelligence.

The latest video of Tesla's robot Optimus is released, and it can already work in the factory. At normal speed, it sorts batteries (Tesla's 4680 batteries) like this: The official also released what it looks like at 20x speed - on a small "workstation", picking and picking and picking: This time it is released One of the highlights of the video is that Optimus completes this work in the factory, completely autonomously, without human intervention throughout the process. And from the perspective of Optimus, it can also pick up and place the crooked battery, focusing on automatic error correction: Regarding Optimus's hand, NVIDIA scientist Jim Fan gave a high evaluation: Optimus's hand is the world's five-fingered robot. One of the most dexterous. Its hands are not only tactile

This week, FigureAI, a robotics company invested by OpenAI, Microsoft, Bezos, and Nvidia, announced that it has received nearly $700 million in financing and plans to develop a humanoid robot that can walk independently within the next year. And Tesla’s Optimus Prime has repeatedly received good news. No one doubts that this year will be the year when humanoid robots explode. SanctuaryAI, a Canadian-based robotics company, recently released a new humanoid robot, Phoenix. Officials claim that it can complete many tasks autonomously at the same speed as humans. Pheonix, the world's first robot that can autonomously complete tasks at human speeds, can gently grab, move and elegantly place each object to its left and right sides. It can autonomously identify objects
