echarts折れ線グラフ柱図の座標軸の色とスタイルの設定
4385 ワード
転載サイトを参照:
http://www.cnblogs.com/my-freedom/p/6699271.html
基本的な使い方はechartsの公式サイトを参照してください.
一、図例legendの設定.
1.フォントと色の設定
1
2
3
4
textStyle:{
fontSize:15,
color:
'#fff'
}
2.スタイルの設定
1
2
3
4
5
6
7
8
9
legend: {
data:systemName,
itemWidth:40,
itemHeight:20,
textStyle:{
fontSize:15,
color:
'#fff'
}
}
必要に応じて自分で設定できます.
二、ツールボックスtoolboxの設定
三、tooltip懸濁提示ボックス
1
2
3
4
5
6
7
8
9
10
11
{
type:
'line'
,
lineStyle: {
color:
'#48b'
,
width: 2,
type:
'solid'
},
textStyle:{
color:
'#fff'
}
}
三、x軸座標xAxisのフォント色の大きさ、座標線の色、およびグリッド線の設定
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
xAxis : [
{
type:
'category'
,
boundaryGap:
false
,
data: time,
splitLine:{show:
false
},
//グリッド線の除去
splitArea : {show :
true
},
//グリッド領域の保持
axisLine: {
lineStyle: {
type:
'solid'
,
color:
'#fff'
,
//左の線の色
width:
'2'
//座標線の幅
}
},
axisLabel: {
textStyle: {
color:
'#fff'
,
//座標の具体的な色
}
}
}
]
四、yAsixの設定は同じ
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
yAxis : [
{
type :
'value'
,
splitLine:{show:
false
},
//グリッド線の除去
splitArea : {show :
true
},
//グリッド領域の保持
axisLine: {
lineStyle: {
type:
'solid'
,
color:
'#fff'
,
width:
'2'
}
},
axisLabel: {
textStyle: {
color:
'#fff'
}
}
}
]
http://www.cnblogs.com/my-freedom/p/6699271.html
基本的な使い方はechartsの公式サイトを参照してください.
一、図例legendの設定.
1.フォントと色の設定
1
2
3
4
textStyle:{
fontSize:15,
color:
'#fff'
}
2.スタイルの設定
1
2
3
4
5
6
7
8
9
legend: {
data:systemName,
itemWidth:40,
itemHeight:20,
textStyle:{
fontSize:15,
color:
'#fff'
}
}
必要に応じて自分で設定できます.
二、ツールボックスtoolboxの設定
三、tooltip懸濁提示ボックス
1
2
3
4
5
6
7
8
9
10
11
{
type:
'line'
,
lineStyle: {
color:
'#48b'
,
width: 2,
type:
'solid'
},
textStyle:{
color:
'#fff'
}
}
三、x軸座標xAxisのフォント色の大きさ、座標線の色、およびグリッド線の設定
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
xAxis : [
{
type:
'category'
,
boundaryGap:
false
,
data: time,
splitLine:{show:
false
},
//グリッド線の除去
splitArea : {show :
true
},
//グリッド領域の保持
axisLine: {
lineStyle: {
type:
'solid'
,
color:
'#fff'
,
//左の線の色
width:
'2'
//座標線の幅
}
},
axisLabel: {
textStyle: {
color:
'#fff'
,
//座標の具体的な色
}
}
}
]
四、yAsixの設定は同じ
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
yAxis : [
{
type :
'value'
,
splitLine:{show:
false
},
//グリッド線の除去
splitArea : {show :
true
},
//グリッド領域の保持
axisLine: {
lineStyle: {
type:
'solid'
,
color:
'#fff'
,
width:
'2'
}
},
axisLabel: {
textStyle: {
color:
'#fff'
}
}
}
]