Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
VueElementTemplate
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
黄瑜
VueElementTemplate
Commits
8c204b98
Commit
8c204b98
authored
Nov 17, 2017
by
Pan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rm:remove keyboard2 demo
parent
339d7607
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
61 additions
and
204 deletions
+61
-204
keyboard.vue
src/components/Charts/keyboard.vue
+58
-21
keyboard2.vue
src/components/Charts/keyboard2.vue
+0
-150
en.js
src/lang/en.js
+0
-1
zh.js
src/lang/zh.js
+0
-1
index.js
src/router/index.js
+3
-6
keyboard2.vue
src/views/charts/keyboard2.vue
+0
-25
No files found.
src/components/Charts/keyboard.vue
View file @
8c204b98
...
...
@@ -45,21 +45,22 @@ export default {
const
xAxisData
=
[]
const
data
=
[]
for
(
let
i
=
0
;
i
<
30
;
i
++
)
{
xAxisData
.
push
(
i
+
'号'
)
data
.
push
(
Math
.
round
(
Math
.
random
()
*
2
+
3
))
const
data2
=
[]
for
(
let
i
=
0
;
i
<
50
;
i
++
)
{
xAxisData
.
push
(
i
)
data
.
push
((
Math
.
sin
(
i
/
5
)
*
(
i
/
5
-
10
)
+
i
/
6
)
*
5
)
data2
.
push
((
Math
.
sin
(
i
/
5
)
*
(
i
/
5
+
10
)
+
i
/
6
)
*
3
)
}
this
.
chart
.
setOption
(
{
backgroundColor
:
'#08263a'
,
tooltip
:
{
trigger
:
'axis'
},
xAxis
:
{
xAxis
:
[{
show
:
false
,
data
:
xAxisData
},
},
{
show
:
false
,
data
:
xAxisData
}],
visualMap
:
{
show
:
false
,
min
:
0
,
...
...
@@ -84,19 +85,56 @@ export default {
color
:
'#08263f'
}
},
axisTick
:
{}
axisTick
:
{
show
:
false
}
},
series
:
[{
name
:
'back'
,
type
:
'bar'
,
data
,
name
:
'撸文数'
,
data
:
data2
,
z
:
1
,
itemStyle
:
{
normal
:
{
opacity
:
0.4
,
barBorderRadius
:
5
,
shadowBlur
:
10
,
shadowBlur
:
3
,
shadowColor
:
'#111'
}
}
},
{
name
:
'Simulate Shadow'
,
type
:
'line'
,
data
,
z
:
2
,
showSymbol
:
false
,
animationDelay
:
0
,
animationEasing
:
'linear'
,
animationDuration
:
1200
,
lineStyle
:
{
normal
:
{
color
:
'transparent'
}
},
areaStyle
:
{
normal
:
{
color
:
'#08263a'
,
shadowBlur
:
50
,
shadowColor
:
'#000'
}
}
},
{
name
:
'front'
,
type
:
'bar'
,
data
,
xAxisIndex
:
1
,
z
:
3
,
itemStyle
:
{
normal
:
{
barBorderRadius
:
5
}
}
}],
animationEasing
:
'elasticOut'
,
animationEasingUpdate
:
'elasticOut'
,
animationDelay
(
idx
)
{
...
...
@@ -105,7 +143,6 @@ export default {
animationDelayUpdate
(
idx
)
{
return
idx
*
20
}
}]
})
}
}
...
...
src/components/Charts/keyboard2.vue
deleted
100644 → 0
View file @
339d7607
<
template
>
<div
:class=
"className"
:id=
"id"
:style=
"
{height:height,width:width}">
</div>
</
template
>
<
script
>
import
echarts
from
'echarts'
export
default
{
props
:
{
className
:
{
type
:
String
,
default
:
'chart'
},
id
:
{
type
:
String
,
default
:
'chart'
},
width
:
{
type
:
String
,
default
:
'200px'
},
height
:
{
type
:
String
,
default
:
'200px'
}
},
data
()
{
return
{
chart
:
null
}
},
mounted
()
{
this
.
initChart
()
},
beforeDestroy
()
{
if
(
!
this
.
chart
)
{
return
}
this
.
chart
.
dispose
()
this
.
chart
=
null
},
methods
:
{
initChart
()
{
this
.
chart
=
echarts
.
init
(
document
.
getElementById
(
this
.
id
))
const
xAxisData
=
[]
const
data
=
[]
const
data2
=
[]
for
(
let
i
=
0
;
i
<
50
;
i
++
)
{
xAxisData
.
push
(
i
)
data
.
push
((
Math
.
sin
(
i
/
5
)
*
(
i
/
5
-
10
)
+
i
/
6
)
*
5
)
data2
.
push
((
Math
.
sin
(
i
/
5
)
*
(
i
/
5
+
10
)
+
i
/
6
)
*
3
)
}
this
.
chart
.
setOption
(
{
backgroundColor
:
'#08263a'
,
xAxis
:
[{
show
:
false
,
data
:
xAxisData
},
{
show
:
false
,
data
:
xAxisData
}],
visualMap
:
{
show
:
false
,
min
:
0
,
max
:
50
,
dimension
:
0
,
inRange
:
{
color
:
[
'#4a657a'
,
'#308e92'
,
'#b1cfa5'
,
'#f5d69f'
,
'#f5898b'
,
'#ef5055'
]
}
},
yAxis
:
{
axisLine
:
{
show
:
false
},
axisLabel
:
{
textStyle
:
{
color
:
'#4a657a'
}
},
splitLine
:
{
show
:
true
,
lineStyle
:
{
color
:
'#08263f'
}
},
axisTick
:
{
show
:
false
}
},
series
:
[{
name
:
'back'
,
type
:
'bar'
,
data
:
data2
,
z
:
1
,
itemStyle
:
{
normal
:
{
opacity
:
0.4
,
barBorderRadius
:
5
,
shadowBlur
:
3
,
shadowColor
:
'#111'
}
}
},
{
name
:
'Simulate Shadow'
,
type
:
'line'
,
data
,
z
:
2
,
showSymbol
:
false
,
animationDelay
:
0
,
animationEasing
:
'linear'
,
animationDuration
:
1200
,
lineStyle
:
{
normal
:
{
color
:
'transparent'
}
},
areaStyle
:
{
normal
:
{
color
:
'#08263a'
,
shadowBlur
:
50
,
shadowColor
:
'#000'
}
}
},
{
name
:
'front'
,
type
:
'bar'
,
data
,
xAxisIndex
:
1
,
z
:
3
,
itemStyle
:
{
normal
:
{
barBorderRadius
:
5
}
}
}],
animationEasing
:
'elasticOut'
,
animationEasingUpdate
:
'elasticOut'
,
animationDelay
(
idx
)
{
return
idx
*
20
},
animationDelayUpdate
(
idx
)
{
return
idx
*
20
}
})
}
}
}
</
script
>
src/lang/en.js
View file @
8c204b98
...
...
@@ -21,7 +21,6 @@ export default {
charts
:
'Charts'
,
chartsIndex
:
'Introduction'
,
keyboardChart
:
'Keyboard Chart'
,
keyboardChart2
:
'Keyboard Chart2'
,
lineChart
:
'Line chart'
,
mixChart
:
'Mix Chart'
,
example
:
'Example'
,
...
...
src/lang/zh.js
View file @
8c204b98
...
...
@@ -21,7 +21,6 @@ export default {
charts
:
'图表'
,
chartsIndex
:
'介绍'
,
keyboardChart
:
'键盘图表'
,
keyboardChart2
:
'键盘图表2'
,
lineChart
:
'折线图'
,
mixChart
:
'混合图表'
,
example
:
'综合实例'
,
...
...
src/router/index.js
View file @
8c204b98
...
...
@@ -87,8 +87,6 @@ export const asyncRouterMap = [
{
path
:
'/components'
,
component
:
Layout
,
redirect
:
'/components/index'
,
name
:
'components'
,
meta
:
{
title
:
'components'
,
icon
:
'component'
...
...
@@ -119,10 +117,9 @@ export const asyncRouterMap = [
},
children
:
[
{
path
:
'index'
,
component
:
_import
(
'charts/index'
),
name
:
'chartsIndex'
,
meta
:
{
title
:
'chartsIndex'
}},
{
path
:
'keyboard'
,
component
:
_import
(
'charts/keyboard'
),
name
:
'keyboardChart'
,
meta
:
{
title
:
'keyboardChart'
}},
{
path
:
'keyboard2'
,
component
:
_import
(
'charts/keyboard2'
),
name
:
'keyboardChart2'
,
meta
:
{
title
:
'keyboardChart2'
}},
{
path
:
'line'
,
component
:
_import
(
'charts/line'
),
name
:
'lineChart'
,
meta
:
{
title
:
'lineChart'
}},
{
path
:
'mixchart'
,
component
:
_import
(
'charts/mixChart'
),
name
:
'mixChart'
,
meta
:
{
title
:
'mixChart'
}}
{
path
:
'keyboard'
,
component
:
_import
(
'charts/keyboard'
),
name
:
'keyboardChart'
,
meta
:
{
title
:
'keyboardChart'
,
noCache
:
true
}},
{
path
:
'line'
,
component
:
_import
(
'charts/line'
),
name
:
'lineChart'
,
meta
:
{
title
:
'lineChart'
,
noCache
:
true
}},
{
path
:
'mixchart'
,
component
:
_import
(
'charts/mixChart'
),
name
:
'mixChart'
,
meta
:
{
title
:
'mixChart'
,
noCache
:
true
}}
]
},
...
...
src/views/charts/keyboard2.vue
deleted
100644 → 0
View file @
339d7607
<
template
>
<div
class=
"components-container"
style=
'height:100vh'
>
<div
class=
'chart-container'
>
<chart
height=
'100%'
width=
'100%'
></chart>
</div>
</div>
</
template
>
<
script
>
import
Chart
from
'@/components/Charts/keyboard2'
export
default
{
name
:
'keyboardChart2'
,
components
:
{
Chart
}
}
</
script
>
<
style
scoped
>
.chart-container
{
position
:
relative
;
width
:
100%
;
height
:
90%
;
}
</
style
>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment