• ECharts(1)


    目录

    数据可视化

    可视化面板介绍

    01-使用技术

    02- 案例适配方案

    04-header 布局

    header部分css样式

    05-mainbox  主体模块

    06-公共面板模块 panel

    07-柱形图 bar 模块(布局)


    数据可视化

    数据可视化主要目的

    借助图形化手段,清晰有效地传达与沟通信息

    数据可视化可以把数据从冰冷的数字转换为图形,揭示蕴含在数据中的规律和道理

    可视化面板介绍

    ​应对现在数据可视化的趋势,越来越多企业需要在很多场景(营销数据,生产数据,用户数据)下使用,可视化图表来展示体现数据,让数据更加直观,数据特点更加突出。

    01-使用技术

    完成该项目需要具备以下知识:

    • div + css 布局
    • flex 布局
    • Less
    • 原生js + jquery 使用
    • rem适配
    • echarts基础

    02- 案例适配方案

    - 设计稿是1920px 

      1. flexible.js 把屏幕分为 24 等份

      2. cssrem 插件的基准值是  80px

         插件-配置按钮---配置扩展设置--Root Font Size 里面 设置。

         但是别忘记重启vscode软件保证生效

     03-基础设置

    1.  body 设置背景图 ,缩放为 100%  , 行高1.15
    2.  css初始化

    04-header 布局

    1. 高度为100px
    2. 背景图,在容器内显示
    3. 缩放比例为 100%
    4. h1 标题部分   白色  38像素 居中显示  行高为 80像素
    5. 时间模块 showTime   定位右侧  right 为 30px   行高为 75px  文字颜色为:rgba(255, 255, 255, 0.7)     而文字大小为 20像素

    header部分css样式

    1. header {
    2. position: relative;
    3. height: 1.25rem;
    4. background: url(../images/head_bg.png) no-repeat top center;
    5. background-size: 100% 100%;
    6. h1 {
    7. font-size: 0.475rem;
    8. color: #fff;
    9. text-align: center;
    10. line-height: 1rem;
    11. }
    12. .showTime {
    13. position: absolute;
    14. top: 0;
    15. right: 0.375rem;
    16. line-height: 0.9375rem;
    17. font-size: 0.25rem;
    18. color: rgba(255, 255, 255, 0.7);
    19. }
    20. }

    05-mainbox  主体模块

      需要一个上左右的10px 的内边距

    1. .mainbox {
    2. padding: 0.125rem 0.125rem 0;
    3. display: flex;
    4. .column {
    5. flex: 3;
    6. }
    7. &:nth-child(2) {
    8. flex: 5;
    9. }
    10. }

    06-公共面板模块 panel

      - 高度为 310px

      - 1像素的 1px solid rgba(25, 186, 139, 0.17)  边框

      - 有line.jpg 背景图片

      - padding为  上为 0  左右 15px  下为 40px

      - 下外边距是 15px

      - 利用panel  盒子 before 和after 制作上面两个角   大小为 10px  线条为  2px solid #02a6b5

      - 新加一个盒子before 和after   制作下侧两个角  宽度高度为 10px

    1. .panel {
    2. position: relative;
    3. height: 3.875rem;
    4. border: 1px solid rgba(25, 186, 139, 0.17);
    5. background: url(../images/line\(1\).png);
    6. padding: 0 0.1875rem 0.5rem;
    7. margin-bottom: 0.1875rem;
    8. &::before {
    9. position: absolute;
    10. top: 0;
    11. left: 0;
    12. content: "";
    13. width: 10px;
    14. height: 10px;
    15. border-top: 2px solid #02a6b5;
    16. border-left: 2px solid #02a6b5;
    17. }
    18. &::after {
    19. position: absolute;
    20. top: 0;
    21. right: 0;
    22. content: "";
    23. width: 10px;
    24. height: 10px;
    25. border-top: 2px solid #02a6b5;
    26. border-right: 2px solid #02a6b5;
    27. }
    28. .panel-footer {
    29. position: absolute;
    30. left: 0;
    31. bottom: 0;
    32. width: 100%;
    33. &::before {
    34. position: absolute;
    35. bottom: 0;
    36. left: 0;
    37. content: "";
    38. width: 10px;
    39. height: 10px;
    40. border-bottom: 2px solid #02a6b5;
    41. border-left: 2px solid #02a6b5;
    42. }
    43. &::after {
    44. position: absolute;
    45. bottom: 0;
    46. right: 0;
    47. content: "";
    48. width: 10px;
    49. height: 10px;
    50. border-bottom: 2px solid #02a6b5;
    51. border-right: 2px solid #02a6b5;
    52. }
    53. }
    54. }

    07-柱形图 bar 模块(布局)

      - 标题模块  h2    高度为 48px   文字颜色为白色  文字大小为  20px 

      - 图标内容模块  chart   高度 240px

      - 以上可以作为panel公共样式部分

    1. h2 {
    2. height: 0.6rem;
    3. line-height: 0.6rem;
    4. text-align: center;
    5. color: #fff;
    6. font-size: 20px;
    7. font-weight: 400;
    8. }
    9. .chart {
    10. height: 3rem;
    11. background-color: pink;
    12. }
  • 相关阅读:
    etf动量轮动+大盘择时:年化30%的策略
    Python中的文件操作和异常处理
    如何根据元素的位置关系来调整 CSS 样式
    驱动LSM6DS3TR-C实现高效运动检测与数据采集(5)----姿态解算
    【单片机毕业设计】【mcuclub-cl-025】基于单片机的儿童安全座椅的设计
    小程序全局变量与组件内部实时监听全局变量的改变
    Python 多进程间访问效率低,如何解决?
    统计一个只包含大写字母的字符串中顺序对的数量.其中顺序对的定义为前面的字符小后面的字符大.例如在“ABC“中的顺序对为3,因为有AB,AC,BC
    Java面向对象16:接口的定义与实现
    WPF 控件专题 PasswordBox控件详解
  • 原文地址:https://blog.csdn.net/m0_62520946/article/details/126522025