Toggle navigation
折线图
By
你***哥
2017-05-18 09:05:44
脚本
16
21
作品使用的第三方脚本
数据管理
上传数据
支持小于 5M 任意格式(csv, xlsx, json, xml, ...)的数据文件
上传后可以通过生成的文件链接异步获取托管的数据。
历史数据
0 条
无历史数据
代码修改记录
信息提示
保存作品
对当前截图不满意?你还可以
上传本地截图
重新截图
作品名称
作品描述
标签
geo
grid
legend
markLine
markPoint
bar
effectScatter
line
lines
map
timeline
title
toolbox
tooltip
visualMap
作品默认版本
最新
16
15
14
13
12
11
10
9
8
7
6
5
4
3
2
1
20:11:45
图表已生成
整理代码
刷新
代码
var defaultFontSize = 14, defaultTextColor = '#636c72', defaultGlobalColor = ['#5d9cec', '#62c87f', '#f15755', '#fc863f', '#7053b6'], defaultFontFamily = 'microsoft yahei', defaultBackgroundColor = '#fff', defaultShadowColor = 'rgba(204, 214, 235, 0.247059)'; option = { title: { text: '访问人数(page/index)', top: 10, left: 'center', textStyle: { fontSize: 18, fontWeight: 400 } }, backgroundColor: defaultBackgroundColor, // 背景色,默认无背景。 color: defaultGlobalColor,// 调色盘颜色列表。 textStyle: {// 全局字体样式 color: defaultTextColor, fontSize: defaultFontSize }, legend: { bottom: 0, left: 'center', width: 500, itemWidth: 14, itemHeight: 14, itemBorderRadius: 8, textStyle: { // color: "#d7d7d7" }, data: ['直接访问', '必应访问', '微博访问', '知乎访问', '百度访问'] }, tooltip: {// 提示框组件 trigger: 'axis', // 触发类型 可选为:'axis' | 'item' | 'none' axisPointer: { // 坐标轴指示器,坐标轴触发有效 type: 'shadow', // 默认为直线,可选为:'line' | 'shadow' shadowStyle: { color: defaultShadowColor } } }, grid: { // 坐标系内绘图网格 top: 60, right: 10, bottom: 40, left: 10, containLabel: true }, xAxis: [{// x轴 type: 'category', data: ['2017-05-01', '2017-05-02', '2017-05-03', '2017-05-04', '2017-05-06', '2017-05-07', '2017-05-08'], //name:'时间', // 坐标轴名称。 axisTick: { // 坐标轴刻度相关设置。 alignWithLabel: true }, axisLine: { // 坐标轴轴线相关设置。 lineStyle: { color: '#6a7791' } }, axisLabel: { // 坐标轴轴线标签设置。 textStyle: { color: defaultTextColor, fontSize: defaultFontSize } } }], yAxis: [{// y轴 type: 'value', //name:'人', // 坐标轴名称。 nameTextStyle:{// name的样式,默认不需要设置,继承全局集体样式。 }, nameGap: 15, // 坐标名称跟坐标轴的距离。 axisTick:{ // 坐标轴刻度相关设置。 show:false }, axisLine:{ // 坐标轴轴线相关设置。 show:false }, splitLine:{ // 坐标轴在 grid 区域中的分隔线。 lineStyle:{ color: '#eae9e9' } }, axisLabel: { // 坐标轴轴线标签设置。 textStyle: { color: defaultTextColor, fontSize: defaultFontSize } } }], series: [{// 系列列表。每个系列通过 type 决定自己的图表类型 name: '直接访问', // 系列名称,用于tooltip的显示 type: 'line', data: [10, 52, 200, 334, 390, 330, 220] },{// 系列列表。每个系列通过 type 决定自己的图表类型 name: '必应访问', // 系列名称,用于tooltip的显示 type: 'line', data: [22, 112, 230, 334, 340, 350, 320] },{// 系列列表。每个系列通过 type 决定自己的图表类型 name: '微博访问', // 系列名称,用于tooltip的显示 type: 'line', data: [22, 82, 230, 234, 350, 350, 320] },{// 系列列表。每个系列通过 type 决定自己的图表类型 name: '知乎访问', // 系列名称,用于tooltip的显示 type: 'line', data: [22, 32, 230, 534, 360, 350, 320] },{// 系列列表。每个系列通过 type 决定自己的图表类型 name: '百度访问', // 系列名称,用于tooltip的显示 type: 'line', data: [22, 32, 230, 334, 370, 350, 320] }] };