Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
半栈学徒
incubator-echarts
提交
728ae639
I
incubator-echarts
项目概览
半栈学徒
/
incubator-echarts
与 Fork 源项目一致
从无法访问的项目Fork
通知
5
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
I
incubator-echarts
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
728ae639
编写于
2月 29, 2016
作者:
L
lang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Theme infographic and macarons
上级
c020e9e6
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
446 addition
and
2 deletion
+446
-2
theme/dark.js
theme/dark.js
+10
-0
theme/infographic.js
theme/infographic.js
+236
-0
theme/macarons.js
theme/macarons.js
+198
-0
theme/tool/thumb.js
theme/tool/thumb.js
+2
-2
未找到文件。
theme/dark.js
浏览文件 @
728ae639
...
...
@@ -55,6 +55,16 @@
var
theme
=
{
color
:
colorPalette
,
backgroundColor
:
'
#333
'
,
tooltip
:
{
axisPointer
:
{
lineStyle
:
{
color
:
contrastColor
},
crossStyle
:
{
color
:
contrastColor
}
}
},
legend
:
{
textStyle
:
{
color
:
contrastColor
...
...
theme/infographic.js
0 → 100644
浏览文件 @
728ae639
(
function
(
root
,
factory
)
{
if
(
typeof
define
===
'
function
'
&&
define
.
amd
)
{
// AMD. Register as an anonymous module.
define
([
'
exports
'
,
'
echarts
'
],
factory
);
}
else
if
(
typeof
exports
===
'
object
'
&&
typeof
exports
.
nodeName
!==
'
string
'
)
{
// CommonJS
factory
(
exports
,
require
(
'
echarts
'
));
}
else
{
// Browser globals
factory
({},
root
.
echarts
);
}
}(
this
,
function
(
exports
,
echarts
)
{
var
log
=
function
(
msg
)
{
if
(
typeof
console
!==
'
undefined
'
)
{
console
&&
console
.
error
&&
console
.
error
(
msg
);
}
};
if
(
!
echarts
)
{
log
(
'
ECharts is not Loaded
'
);
return
;
}
var
colorPalette
=
[
'
#C1232B
'
,
'
#27727B
'
,
'
#FCCE10
'
,
'
#E87C25
'
,
'
#B5C334
'
,
'
#FE8463
'
,
'
#9BCA63
'
,
'
#FAD860
'
,
'
#F3A43B
'
,
'
#60C0DD
'
,
'
#D7504B
'
,
'
#C6E579
'
,
'
#F4E001
'
,
'
#F0805A
'
,
'
#26C0C0
'
];
var
theme
=
{
// 默认色板
color
:
colorPalette
,
title
:
{
textStyle
:
{
fontWeight
:
'
normal
'
,
color
:
'
#27727B
'
}
},
visualMap
:
{
color
:[
'
#C1232B
'
,
'
#FCCE10
'
]
},
toolbox
:
{
iconStyle
:
{
normal
:
{
borderColor
:
colorPalette
[
0
]
}
}
},
// 提示框
tooltip
:
{
backgroundColor
:
'
rgba(50,50,50,0.5)
'
,
// 提示背景颜色,默认为透明度为0.7的黑色
axisPointer
:
{
// 坐标轴指示器,坐标轴触发有效
type
:
'
line
'
,
// 默认为直线,可选为:'line' | 'shadow'
lineStyle
:
{
// 直线指示器样式设置
color
:
'
#27727B
'
,
type
:
'
dashed
'
},
crossStyle
:
{
color
:
'
#27727B
'
},
shadowStyle
:
{
// 阴影指示器样式设置
color
:
'
rgba(200,200,200,0.3)
'
}
}
},
// 区域缩放控制器
dataZoom
:
{
dataBackgroundColor
:
'
rgba(181,195,52,0.3)
'
,
// 数据背景颜色
fillerColor
:
'
rgba(181,195,52,0.2)
'
,
// 填充颜色
handleColor
:
'
#27727B
'
// 手柄颜色
},
// 网格
grid
:
{
borderWidth
:
0
},
// 类目轴
categoryAxis
:
{
axisLine
:
{
// 坐标轴线
lineStyle
:
{
// 属性lineStyle控制线条样式
color
:
'
#27727B
'
}
},
splitLine
:
{
// 分隔线
show
:
false
}
},
// 数值型坐标轴默认参数
valueAxis
:
{
axisLine
:
{
// 坐标轴线
show
:
false
},
splitArea
:
{
show
:
false
},
splitLine
:
{
// 分隔线
lineStyle
:
{
// 属性lineStyle(详见lineStyle)控制线条样式
color
:
[
'
#ccc
'
],
type
:
'
dashed
'
}
}
},
timeline
:
{
lineStyle
:
{
color
:
'
#27727B
'
},
controlStyle
:
{
normal
:
{
color
:
'
#27727B
'
},
emphasis
:
{
color
:
'
#27727B
'
}
},
symbol
:
'
emptyCircle
'
,
symbolSize
:
3
},
// 折线图默认参数
line
:
{
itemStyle
:
{
normal
:
{
borderWidth
:
2
,
borderColor
:
'
#fff
'
,
lineStyle
:
{
width
:
3
}
},
emphasis
:
{
borderWidth
:
0
}
},
symbol
:
'
circle
'
,
// 拐点图形类型
symbolSize
:
3.5
// 拐点图形大小
},
// K线图默认参数
candlestick
:
{
itemStyle
:
{
normal
:
{
color
:
'
#C1232B
'
,
// 阳线填充颜色
color0
:
'
#B5C334
'
,
// 阴线填充颜色
lineStyle
:
{
width
:
1
,
color
:
'
#C1232B
'
,
// 阳线边框颜色
color0
:
'
#B5C334
'
// 阴线边框颜色
}
}
}
},
graph
:
{
color
:
colorPalette
},
map
:
{
label
:
{
normal
:
{
textStyle
:
{
color
:
'
#C1232B
'
}
},
emphasis
:
{
textStyle
:
{
color
:
'
rgb(100,0,0)
'
}
}
},
itemStyle
:
{
normal
:
{
areaColor
:
'
#ddd
'
,
borderColor
:
'
#eee
'
},
emphasis
:
{
areaColor
:
'
#fe994e
'
}
}
},
gauge
:
{
center
:[
'
50%
'
,
'
80%
'
],
radius
:
'
100%
'
,
startAngle
:
180
,
endAngle
:
0
,
axisLine
:
{
// 坐标轴线
show
:
true
,
// 默认显示,属性show控制显示与否
lineStyle
:
{
// 属性lineStyle控制线条样式
color
:
[[
0.2
,
'
#B5C334
'
],[
0.8
,
'
#27727B
'
],[
1
,
'
#C1232B
'
]],
width
:
'
40%
'
}
},
axisTick
:
{
// 坐标轴小标记
splitNumber
:
2
,
// 每份split细分多少段
length
:
5
,
// 属性length控制线长
lineStyle
:
{
// 属性lineStyle控制线条样式
color
:
'
#fff
'
}
},
axisLabel
:
{
// 坐标轴文本标签,详见axis.axisLabel
textStyle
:
{
// 其余属性默认使用全局文本样式,详见TEXTSTYLE
color
:
'
#fff
'
,
fontWeight
:
'
bolder
'
}
},
splitLine
:
{
// 分隔线
length
:
'
5%
'
,
// 属性length控制线长
lineStyle
:
{
// 属性lineStyle(详见lineStyle)控制线条样式
color
:
'
#fff
'
}
},
pointer
:
{
width
:
'
40%
'
,
length
:
'
80%
'
,
color
:
'
#fff
'
},
title
:
{
offsetCenter
:
[
0
,
-
20
],
// x, y,单位px
textStyle
:
{
// 其余属性默认使用全局文本样式,详见TEXTSTYLE
color
:
'
auto
'
,
fontSize
:
20
}
},
detail
:
{
offsetCenter
:
[
0
,
0
],
// x, y,单位px
textStyle
:
{
// 其余属性默认使用全局文本样式,详见TEXTSTYLE
color
:
'
auto
'
,
fontSize
:
40
}
}
}
};
echarts
.
registerTheme
(
'
infographic
'
,
theme
);
}));
\ No newline at end of file
theme/macarons.js
0 → 100644
浏览文件 @
728ae639
(
function
(
root
,
factory
)
{
if
(
typeof
define
===
'
function
'
&&
define
.
amd
)
{
// AMD. Register as an anonymous module.
define
([
'
exports
'
,
'
echarts
'
],
factory
);
}
else
if
(
typeof
exports
===
'
object
'
&&
typeof
exports
.
nodeName
!==
'
string
'
)
{
// CommonJS
factory
(
exports
,
require
(
'
echarts
'
));
}
else
{
// Browser globals
factory
({},
root
.
echarts
);
}
}(
this
,
function
(
exports
,
echarts
)
{
var
log
=
function
(
msg
)
{
if
(
typeof
console
!==
'
undefined
'
)
{
console
&&
console
.
error
&&
console
.
error
(
msg
);
}
};
if
(
!
echarts
)
{
log
(
'
ECharts is not Loaded
'
);
return
;
}
var
colorPalette
=
[
'
#2ec7c9
'
,
'
#b6a2de
'
,
'
#5ab1ef
'
,
'
#ffb980
'
,
'
#d87a80
'
,
'
#8d98b3
'
,
'
#e5cf0d
'
,
'
#97b552
'
,
'
#95706d
'
,
'
#dc69aa
'
,
'
#07a2a4
'
,
'
#9a7fd1
'
,
'
#588dd5
'
,
'
#f5994e
'
,
'
#c05050
'
,
'
#59678c
'
,
'
#c9ab00
'
,
'
#7eb00a
'
,
'
#6f5553
'
,
'
#c14089
'
];
var
theme
=
{
color
:
colorPalette
,
title
:
{
textStyle
:
{
fontWeight
:
'
normal
'
,
color
:
'
#008acd
'
}
},
visualMap
:
{
itemWidth
:
15
,
color
:
[
'
#5ab1ef
'
,
'
#e0ffff
'
]
},
toolbox
:
{
iconStyle
:
{
normal
:
{
borderColor
:
colorPalette
[
0
]
}
}
},
tooltip
:
{
backgroundColor
:
'
rgba(50,50,50,0.5)
'
,
axisPointer
:
{
type
:
'
line
'
,
lineStyle
:
{
color
:
'
#008acd
'
},
crossStyle
:
{
color
:
'
#008acd
'
},
shadowStyle
:
{
color
:
'
rgba(200,200,200,0.2)
'
}
}
},
dataZoom
:
{
dataBackgroundColor
:
'
#efefff
'
,
fillerColor
:
'
rgba(182,162,222,0.2)
'
,
handleColor
:
'
#008acd
'
},
grid
:
{
borderColor
:
'
#eee
'
},
categoryAxis
:
{
axisLine
:
{
lineStyle
:
{
color
:
'
#008acd
'
}
},
splitLine
:
{
lineStyle
:
{
color
:
[
'
#eee
'
]
}
}
},
valueAxis
:
{
axisLine
:
{
lineStyle
:
{
color
:
'
#008acd
'
}
},
splitArea
:
{
show
:
true
,
areaStyle
:
{
color
:
[
'
rgba(250,250,250,0.1)
'
,
'
rgba(200,200,200,0.1)
'
]
}
},
splitLine
:
{
lineStyle
:
{
color
:
[
'
#eee
'
]
}
}
},
timeline
:
{
lineStyle
:
{
color
:
'
#008acd
'
},
controlStyle
:
{
normal
:
{
color
:
'
#008acd
'
},
emphasis
:
{
color
:
'
#008acd
'
}
},
symbol
:
'
emptyCircle
'
,
symbolSize
:
3
},
line
:
{
smooth
:
true
,
symbol
:
'
emptyCircle
'
,
symbolSize
:
3
},
candlestick
:
{
itemStyle
:
{
normal
:
{
color
:
'
#d87a80
'
,
color0
:
'
#2ec7c9
'
,
lineStyle
:
{
color
:
'
#d87a80
'
,
color0
:
'
#2ec7c9
'
}
}
}
},
scatter
:
{
symbol
:
'
circle
'
,
symbolSize
:
4
},
map
:
{
label
:
{
normal
:
{
textStyle
:
{
color
:
'
#d87a80
'
}
}
},
itemStyle
:
{
normal
:
{
borderColor
:
'
#eee
'
,
areaColor
:
'
#ddd
'
},
emphasis
:
{
areaColor
:
'
#fe994e
'
}
}
},
graph
:
{
color
:
colorPalette
},
gauge
:
{
axisLine
:
{
lineStyle
:
{
color
:
[[
0.2
,
'
#2ec7c9
'
],[
0.8
,
'
#5ab1ef
'
],[
1
,
'
#d87a80
'
]],
width
:
10
}
},
axisTick
:
{
splitNumber
:
10
,
length
:
15
,
lineStyle
:
{
color
:
'
auto
'
}
},
splitLine
:
{
length
:
22
,
lineStyle
:
{
color
:
'
auto
'
}
},
pointer
:
{
width
:
5
}
}
};
echarts
.
registerTheme
(
'
macarons
'
,
theme
);
}));
\ No newline at end of file
theme/tool/thumb.js
浏览文件 @
728ae639
...
...
@@ -41,9 +41,9 @@ glob('../*.js', function (err, themePathList) {
chart
.
dispose
();
});
var
outputCanvas
=
new
Canvas
(
WIDTH
*
2
,
HEIGHT
*
canvasList
.
length
);
var
outputCtx
=
outputCanvas
.
getContext
(
'
2d
'
);
var
columnCount
=
2
;
var
outputCanvas
=
new
Canvas
(
WIDTH
*
columnCount
,
HEIGHT
*
canvasList
.
length
/
columnCount
);
var
outputCtx
=
outputCanvas
.
getContext
(
'
2d
'
);
canvasList
.
forEach
(
function
(
canvas
,
idx
)
{
outputCtx
.
drawImage
(
canvas
,
idx
%
columnCount
*
WIDTH
,
Math
.
floor
(
idx
/
columnCount
)
*
HEIGHT
,
WIDTH
,
HEIGHT
);
});
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录