• 欢迎访问搞代码网站,推荐使用最新版火狐浏览器和Chrome浏览器访问本网站!
  • 如果您觉得本站非常有看点,那么赶紧使用Ctrl+D 收藏搞代码吧

vue中使用echarts的示例

vue 搞代码 4年前 (2022-01-08) 14次浏览 已收录 0个评论

这篇文章主要介绍了vue中使用echarts的步骤,帮助大家更好的理解和使用vue框架,感兴趣的朋友可以了解下

1:首先要用到echarts

2:在vue中安装这个依赖

3:引入要用的页面

 import echarts from 'echarts';

4:然后初始化

   <div class="layui-col-md6 tjgx-panel"> <div class="layui-card"> <div class="layui-card-header panel-title"> <span class="left-text">统计更新及时率</span> <div class="right-text" style="color: #b0b0b0"> <span class="week">{{item.name}}</span><!-- <span class="month">本月</span> <span class="year">本年</span> --></div></div><div class="layui-card-body common-height"> <!-- <div class="tjgx-con" id="container" style="min-height:280px"></div> --></div></div></div> /* .week{ padding: 0 1%; } */ .layui-card-header { position: relative; height: 42px; line-height: 42px; padding: 0 15px; border-bottom: 1px solid #f6f6f6; color: #333; border-radius: 2px 2px 0 0; font-size: 14px; } .common-height { height: 280px; } .layui-card { margin-bottom: 15px; border-radius: 2px; background-color: #fff; box-shadow: 0 1px 2px 0 rgba(0,0,0,.05); } .layui-card-body { position: relative; padding: 10px 15px; line-height: 24px; } .layui-col-md20 { width: 20%; } .time-city-panel { display: flex !important; justify-content: space-between; align-items: center; } .time-city-panel img { width: 73px !important; height: 61px !important; padding: 0 10px 10px !important; } .time-city-panel .one-row, .time-city-panel .two-row { padding: 0 10px; } .time-city-panel .one-row p:first-of-type { font-size: 18px; font-weight: bold; padding: 0 0 10px; text-align: left; } .time-city-panel .two-row p:first-of-type { padding: 0 0 10px; color: #96acbc; font-weight: bold; line-height: 22px; } .db_img { width: 20px; height: 22px; margin: 0 5px; vertical-align: middle; } .panel-title .left-text { padding-left: 10px; border-left: 8px solid #239fe6; font-size: 20px; display: inline-block; height: 30px; line-height: 30px; vertical-align: middle; } .panel-title .right-text { float: right; color: #239fe6; font-size: 14px; margin-left: 15px; } /*筒高度*/ .common-height { height: 280px; } .text-overflow { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .tjgx-panel .right-text span, .ajtj-panel .right-text span { display: inline-block; color: #b0b0b0; } .tjgx-panel .right-text span.acitive, .ajtj-panel .right-text span.acitive { color: #239fe6; } #chart, #ajtjChart { width: 100%; height: 90%; } 

5:Echarts 组件

  <div> <!-- style="min-height:280px;" --><div id="Echarts"></div><!-- <div id="Echarts"></div> --></div>

6:效果图

以上就是vue中使用echarts的步骤的详细内容,更多关于vue 使用echarts的资料请关注gaodaima搞代码网其它相本文来源gaodai#ma#com搞*!代#%^码网%关文章!

以上就是vue中使用echarts的示例的详细内容,更多请关注gaodaima搞代码网其它相关文章!


搞代码网(gaodaima.com)提供的所有资源部分来自互联网,如果有侵犯您的版权或其他权益,请说明详细缘由并提供版权或权益证明然后发送到邮箱[email protected],我们会在看到邮件的第一时间内为您处理,或直接联系QQ:872152909。本网站采用BY-NC-SA协议进行授权
转载请注明原文链接:vue中使用echarts的示例

喜欢 (0)
[搞代码]
分享 (0)
发表我的评论
取消评论

表情 贴图 加粗 删除线 居中 斜体 签到

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址