⚡ link graphic in nav
This commit is contained in:
parent
e81389eae1
commit
c0f800ff91
|
@ -28,7 +28,7 @@ export const Routes =
|
||||||
{path: 'step/visibility', component: VisibilityComponent},
|
{path: 'step/visibility', component: VisibilityComponent},
|
||||||
{path: 'step/resume', component: ResumeComponent},
|
{path: 'step/resume', component: ResumeComponent},
|
||||||
{path: 'step/end', component: EndConfirmationComponent},
|
{path: 'step/end', component: EndConfirmationComponent},
|
||||||
{ path: "graphic/:poll", component: PollGraphicComponent },
|
{path: 'graphic/:poll', component: PollGraphicComponent},
|
||||||
{path: 'votechoice', component: VoteChoiceComponent},
|
{path: 'votechoice', component: VoteChoiceComponent},
|
||||||
]
|
]
|
||||||
;
|
;
|
||||||
|
|
|
@ -3,12 +3,12 @@
|
||||||
name="selector"
|
name="selector"
|
||||||
autofocus="autofocus"
|
autofocus="autofocus"
|
||||||
[(ngModel)]="isColorblind"
|
[(ngModel)]="isColorblind"
|
||||||
(change)="setColorblind()"
|
(change)="toggleColorblind()"
|
||||||
>
|
>
|
||||||
<option value="colorblind">
|
<option value="true">
|
||||||
{{ "pollGraphic.choiceColorblind" | translate }}
|
{{ "pollGraphic.choiceColorblind" | translate }}
|
||||||
</option>
|
</option>
|
||||||
<option value="notColorblind">
|
<option value="false">
|
||||||
{{ "pollGraphic.choiceNotColorblind" | translate }}
|
{{ "pollGraphic.choiceNotColorblind" | translate }}
|
||||||
</option>
|
</option>
|
||||||
</select>
|
</select>
|
||||||
|
@ -17,4 +17,3 @@
|
||||||
<canvas id="graph" width="100" height="50"></canvas>
|
<canvas id="graph" width="100" height="50"></canvas>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
@ -7,7 +7,7 @@ import { Chart } from "chart.js";
|
||||||
styleUrls: ["./poll-graphic.component.scss"]
|
styleUrls: ["./poll-graphic.component.scss"]
|
||||||
})
|
})
|
||||||
export class PollGraphicComponent implements OnInit {
|
export class PollGraphicComponent implements OnInit {
|
||||||
isColorblind: boolean;
|
isColorblind: boolean = false;
|
||||||
lineChart: Chart;
|
lineChart: Chart;
|
||||||
pollData: any;
|
pollData: any;
|
||||||
yesList: number[] = [];
|
yesList: number[] = [];
|
||||||
|
@ -15,7 +15,9 @@ export class PollGraphicComponent implements OnInit {
|
||||||
noList: number[] = [];
|
noList: number[] = [];
|
||||||
nbPoll: number = 0;
|
nbPoll: number = 0;
|
||||||
dateList: string[] = [];
|
dateList: string[] = [];
|
||||||
constructor() {}
|
|
||||||
|
constructor() {
|
||||||
|
}
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
var toto = {
|
var toto = {
|
||||||
|
@ -126,7 +128,7 @@ export class PollGraphicComponent implements OnInit {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
setColorblind() {
|
toggleColorblind() {
|
||||||
this.isColorblind = !this.isColorblind;
|
this.isColorblind = !this.isColorblind;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -23,6 +23,9 @@
|
||||||
<a [routerLink]="'/step/kind'" i18n>
|
<a [routerLink]="'/step/kind'" i18n>
|
||||||
Page démo
|
Page démo
|
||||||
</a>
|
</a>
|
||||||
|
<a [routerLink]="'/graphic/toto'" i18n>
|
||||||
|
Graphique
|
||||||
|
</a>
|
||||||
<a [routerLink]="'/home'" i18n>
|
<a [routerLink]="'/home'" i18n>
|
||||||
Accueil
|
Accueil
|
||||||
</a>
|
</a>
|
||||||
|
|
Loading…
Reference in New Issue