File tree Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Original file line number Diff line number Diff line change 1212 < script type ="text/x-template " id ="polygraph-template ">
1313 < polygon v-attr = "points:points" > </ polygon >
1414 < 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 >
1821 </ script >
1922
2023 <!-- demo root element -->
Original file line number Diff line number Diff line change @@ -24,6 +24,8 @@ Vue.component('polygraph', {
2424 components : {
2525 // a sub component for the labels
2626 'axis-label' : {
27+ template : '#axis-label-template' ,
28+ replace : true ,
2729 computed : {
2830 point : function ( ) {
2931 return valueToPoint (
You can’t perform that action at this time.
0 commit comments