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
HireTest
VueElementTemplate
Commits
4b4bf494
Commit
4b4bf494
authored
7 years ago
by
Pan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
refine echarts demo
parent
b15caf63
Changes
8
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
673 additions
and
669 deletions
+673
-669
keyboard.vue
src/components/Charts/keyboard.vue
+104
-104
keyboard2.vue
src/components/Charts/keyboard2.vue
+129
-129
lineMarker.vue
src/components/Charts/lineMarker.vue
+199
-197
mixchart.vue
src/components/Charts/mixchart.vue
+235
-233
keyboard.vue
src/views/charts/keyboard.vue
+1
-1
keyboard2.vue
src/views/charts/keyboard2.vue
+1
-1
line.vue
src/views/charts/line.vue
+1
-1
mixchart.vue
src/views/charts/mixchart.vue
+3
-3
No files found.
src/components/Charts/keyboard.vue
View file @
4b4bf494
...
@@ -2,18 +2,9 @@
...
@@ -2,18 +2,9 @@
<div
:class=
"className"
:id=
"id"
:style=
"
{height:height,width:width}">
</div>
<div
:class=
"className"
:id=
"id"
:style=
"
{height:height,width:width}">
</div>
</
template
>
</
template
>
<
script
>
<
script
>
// 引入 ECharts 主模块
import
echarts
from
'echarts'
;
const
echarts
=
require
(
'echarts/lib/echarts'
);
// 引入柱状图
require
(
'echarts/lib/chart/bar'
);
require
(
'echarts/lib/chart/line'
);
// 引入提示框和标题组件
require
(
'echarts/lib/component/tooltip'
);
require
(
'echarts/lib/component/title'
);
require
(
'echarts/lib/component/visualMap'
);
export
default
{
export
default
{
name
:
'barPercent'
,
props
:
{
props
:
{
className
:
{
className
:
{
type
:
String
,
type
:
String
,
...
@@ -33,13 +24,22 @@
...
@@ -33,13 +24,22 @@
}
}
},
},
data
()
{
data
()
{
return
{};
return
{
chart
:
null
};
},
},
mounted
()
{
mounted
()
{
this
.
initBar
();
this
.
initChart
();
},
beforeDestroy
()
{
if
(
!
this
.
chart
)
{
return
}
this
.
chart
.
dispose
();
this
.
chart
=
null
;
},
},
methods
:
{
methods
:
{
initBar
()
{
initChart
()
{
this
.
chart
=
echarts
.
init
(
document
.
getElementById
(
this
.
id
));
this
.
chart
=
echarts
.
init
(
document
.
getElementById
(
this
.
id
));
const
xAxisData
=
[];
const
xAxisData
=
[];
...
...
This diff is collapsed.
Click to expand it.
src/components/Charts/keyboard2.vue
View file @
4b4bf494
...
@@ -2,18 +2,9 @@
...
@@ -2,18 +2,9 @@
<div
:class=
"className"
:id=
"id"
:style=
"
{height:height,width:width}">
</div>
<div
:class=
"className"
:id=
"id"
:style=
"
{height:height,width:width}">
</div>
</
template
>
</
template
>
<
script
>
<
script
>
// 引入 ECharts 主模块
import
echarts
from
'echarts'
;
const
echarts
=
require
(
'echarts/lib/echarts'
);
// 引入柱状图
require
(
'echarts/lib/chart/bar'
);
require
(
'echarts/lib/chart/line'
);
// 引入提示框和标题组件
require
(
'echarts/lib/component/tooltip'
);
require
(
'echarts/lib/component/title'
);
require
(
'echarts/lib/component/visualMap'
);
export
default
{
export
default
{
name
:
'barPercent'
,
props
:
{
props
:
{
className
:
{
className
:
{
type
:
String
,
type
:
String
,
...
@@ -33,13 +24,22 @@
...
@@ -33,13 +24,22 @@
}
}
},
},
data
()
{
data
()
{
return
{};
return
{
chart
:
null
};
},
},
mounted
()
{
mounted
()
{
this
.
initBar
();
this
.
initChart
();
},
beforeDestroy
()
{
if
(
!
this
.
chart
)
{
return
}
this
.
chart
.
dispose
();
this
.
chart
=
null
;
},
},
methods
:
{
methods
:
{
initBar
()
{
initChart
()
{
this
.
chart
=
echarts
.
init
(
document
.
getElementById
(
this
.
id
));
this
.
chart
=
echarts
.
init
(
document
.
getElementById
(
this
.
id
));
const
xAxisData
=
[];
const
xAxisData
=
[];
...
...
This diff is collapsed.
Click to expand it.
src/components/Charts/lineMarker.vue
View file @
4b4bf494
...
@@ -2,16 +2,9 @@
...
@@ -2,16 +2,9 @@
<div
:class=
"className"
:id=
"id"
:style=
"
{height:height,width:width}">
</div>
<div
:class=
"className"
:id=
"id"
:style=
"
{height:height,width:width}">
</div>
</
template
>
</
template
>
<
script
>
<
script
>
// 引入 ECharts 主模块
import
echarts
from
'echarts'
;
const
echarts
=
require
(
'echarts/lib/echarts'
);
require
(
'echarts/lib/chart/line'
);
// 引入提示框和标题组件
require
(
'echarts/lib/component/tooltip'
);
require
(
'echarts/lib/component/title'
);
require
(
'echarts/lib/component/legend'
);
export
default
{
export
default
{
name
:
'barPercent'
,
props
:
{
props
:
{
className
:
{
className
:
{
type
:
String
,
type
:
String
,
...
@@ -31,11 +24,20 @@
...
@@ -31,11 +24,20 @@
}
}
},
},
data
()
{
data
()
{
return
{};
return
{
chart
:
null
};
},
},
mounted
()
{
mounted
()
{
this
.
initChart
();
this
.
initChart
();
},
},
beforeDestroy
()
{
if
(
!
this
.
chart
)
{
return
}
this
.
chart
.
dispose
();
this
.
chart
=
null
;
},
methods
:
{
methods
:
{
initChart
()
{
initChart
()
{
this
.
chart
=
echarts
.
init
(
document
.
getElementById
(
this
.
id
));
this
.
chart
=
echarts
.
init
(
document
.
getElementById
(
this
.
id
));
...
@@ -215,5 +217,5 @@
...
@@ -215,5 +217,5 @@
})
})
}
}
}
}
}
}
</
script
>
</
script
>
This diff is collapsed.
Click to expand it.
src/components/Charts/mixchart.vue
View file @
4b4bf494
...
@@ -2,17 +2,9 @@
...
@@ -2,17 +2,9 @@
<div
:class=
"className"
:id=
"id"
:style=
"
{height:height,width:width}">
</div>
<div
:class=
"className"
:id=
"id"
:style=
"
{height:height,width:width}">
</div>
</
template
>
</
template
>
<
script
>
<
script
>
// 引入 ECharts 主模块
import
echarts
from
'echarts'
;
const
echarts
=
require
(
'echarts/lib/echarts'
);
require
(
'echarts/lib/chart/bar'
);
require
(
'echarts/lib/chart/line'
);
// 引入提示框和标题组件
require
(
'echarts/lib/component/tooltip'
);
require
(
'echarts/lib/component/title'
);
require
(
'echarts/lib/component/legend'
);
require
(
'echarts/lib/component/dataZoom'
);
export
default
{
export
default
{
name
:
'barPercent'
,
props
:
{
props
:
{
className
:
{
className
:
{
type
:
String
,
type
:
String
,
...
@@ -32,10 +24,20 @@
...
@@ -32,10 +24,20 @@
}
}
},
},
data
()
{
data
()
{
return
{};
return
{
chart
:
null
};
},
},
mounted
()
{
mounted
()
{
this
.
initChart
();
this
.
initChart
();
this
.
chart
=
null
;
},
beforeDestroy
()
{
if
(
!
this
.
chart
)
{
return
}
this
.
chart
.
dispose
();
this
.
chart
=
null
;
},
},
methods
:
{
methods
:
{
initChart
()
{
initChart
()
{
...
...
This diff is collapsed.
Click to expand it.
src/views/charts/keyboard.vue
View file @
4b4bf494
<
template
>
<
template
>
<div
class=
"components-container"
style=
'height:100vh'
>
<div
class=
"components-container"
style=
'height:100vh'
>
<div
class=
'chart-container'
>
<div
class=
'chart-container'
>
<keyboard
Chart
height=
'100%'
width=
'100%'
/
>
<keyboard
-chart
height=
'100%'
width=
'100%'
></keyboard-chart
>
</div>
</div>
</div>
</div>
</
template
>
</
template
>
...
...
This diff is collapsed.
Click to expand it.
src/views/charts/keyboard2.vue
View file @
4b4bf494
<
template
>
<
template
>
<div
class=
"components-container"
style=
'height:100vh'
>
<div
class=
"components-container"
style=
'height:100vh'
>
<div
class=
'chart-container'
>
<div
class=
'chart-container'
>
<keyboard
Chart2
id=
'apple'
height=
'100%'
width=
'100%'
/
>
<keyboard
-chart2
id=
'apple'
height=
'100%'
width=
'100%'
></keyboard-chart2
>
</div>
</div>
</div>
</div>
</
template
>
</
template
>
...
...
This diff is collapsed.
Click to expand it.
src/views/charts/line.vue
View file @
4b4bf494
<
template
>
<
template
>
<div
class=
"components-container"
style=
'height:100vh'
>
<div
class=
"components-container"
style=
'height:100vh'
>
<div
class=
'chart-container'
>
<div
class=
'chart-container'
>
<line
Marker
height=
'100%'
width=
'100%'
/
>
<line
-marker
height=
'100%'
width=
'100%'
></line-marker
>
</div>
</div>
</div>
</div>
</
template
>
</
template
>
...
...
This diff is collapsed.
Click to expand it.
src/views/charts/mixchart.vue
View file @
4b4bf494
<
template
>
<
template
>
<div
class=
"components-container"
style=
'height:100vh'
>
<div
class=
"components-container"
style=
'height:100vh'
>
<div
class=
'chart-container'
>
<div
class=
'chart-container'
>
<mix
chart
id=
'apple'
height=
'100%'
width=
'100%'
/
>
<mix
-chart
id=
'apple'
height=
'100%'
width=
'100%'
></mix-chart
>
</div>
</div>
</div>
</div>
</
template
>
</
template
>
<
script
>
<
script
>
import
mix
chart
from
'components/Charts/mixc
hart'
;
import
mix
Chart
from
'components/Charts/mixC
hart'
;
export
default
{
export
default
{
components
:
{
mix
c
hart
}
components
:
{
mix
C
hart
}
};
};
</
script
>
</
script
>
...
...
This diff is collapsed.
Click to expand it.
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