原文链接: 简单折线图 echarts 和 chartjs的 比较
上一篇: Python 统计 博客 信息
下一篇: 盒子模型边框重叠问题,已经悬浮高亮边框
由之前的博客数据,绘制折线图
数据
['2016/07', '2016/10', '2016/11', '2016/12', '2017/01', '2017/02', '2017/03', '2017/04', '2017/06', '2017/07', '2017/08', '2017/09', '2017/10', '2017/11', '2017/12', '2018/01', '2018/02']
[6, 6, 11, 4, 35, 82, 52, 11, 40, 28, 53, 35, 34, 56, 29, 72, 80]
效果对比,上面的是百度的echarts,下面是chatjs
百度默认的样式不是很好看,可以使用自定义样式,感觉macarons看起来还行。
var myChart = echarts.init(dom, macarons);
echarts
<template>
<div>
<div class="chart" ref="chart"></div>
</div>
</template>
<script>
import echarts from 'echarts'
import macarons from '../lib/macarons'
export default {
name: "blog-chart",
mou