File tree 2 files changed +8
-3
lines changed 2 files changed +8
-3
lines changed Original file line number Diff line number Diff line change 12
12
< script type ="text/x-template " id ="polygraph-template ">
13
13
< polygon v-attr = "points:points" > </ polygon >
14
14
< circle cx = "100" cy = "100" r = "80" > < / circle >
15
- < text v-repeat = "stats" v-component = "axis-label" v-attr = "x:point.x, y:point.y" >
16
- { { label} }
17
- </ text >
15
+ < text v-repeat = "stats" v-component = "axis-label" > </ text >
16
+ </ script >
17
+
18
+ <!-- template for the axis label component. -->
19
+ < script type ="text/x-template " id ="axis-label-template ">
20
+ < text v-attr = "x:point.x, y:point.y" > { { label} } </ text >
18
21
</ script >
19
22
20
23
<!-- demo root element -->
Original file line number Diff line number Diff line change @@ -24,6 +24,8 @@ Vue.component('polygraph', {
24
24
components : {
25
25
// a sub component for the labels
26
26
'axis-label' : {
27
+ template : '#axis-label-template' ,
28
+ replace : true ,
27
29
computed : {
28
30
point : function ( ) {
29
31
return valueToPoint (
You can’t perform that action at this time.
0 commit comments