feat(wheel): get subjets from app

This commit is contained in:
2020-01-13 23:24:08 +01:00
parent 13ea057544
commit 48d42178e3
2 changed files with 5 additions and 5 deletions

View File

@@ -6,7 +6,7 @@
<v-content> <v-content>
<SpeechlessSubject @inputData="updateSubjects"/> <SpeechlessSubject @inputData="updateSubjects"/>
<SpinningWheel/> <SpinningWheel :subjects="subjects"/>
</v-content> </v-content>
</v-app> </v-app>
</template> </template>

View File

@@ -12,7 +12,7 @@
data: function () { data: function () {
return { return {
container: null, container: null,
dataSpin : [ subjects : [
{Nom:"Un film", Lien:""}, {Nom:"Un film", Lien:""},
{Nom:"Une serie", Lien:""}, {Nom:"Une serie", Lien:""},
{Nom:"Un logiciel", Lien:""} {Nom:"Un logiciel", Lien:""}
@@ -20,8 +20,8 @@
} }
}, },
methods : { methods : {
getDataSpin(){ getSubjects(){
return this.dataSpin; return this.subjects;
}, },
removeGraph(){ removeGraph(){
d3.select('#chart svg').remove() d3.select('#chart svg').remove()
@@ -36,7 +36,7 @@
oldrotation = 0, oldrotation = 0,
picked = 100000, picked = 100000,
color = d3.scale.category20(); color = d3.scale.category20();
var data = this.getDataSpin(); var data = this.getSubjects();
var svg = d3.select('#chart') var svg = d3.select('#chart')
.append("svg") .append("svg")
.data([data]) .data([data])