Commit 3db15a65 authored by alrom8's avatar alrom8
Browse files

Essai d'ajout d'icônes pour les séries.

parent c36a3b06
......@@ -13,8 +13,8 @@
</option>
</select>
{{ "pollGraphic.colorblindText" | translate }}
<div>
<canvas id="graph" width="100" height="50"></canvas>
<div class = "cvs">
<canvas id="graph" width="200%" height="30%"></canvas>
</div>
\ No newline at end of file
......@@ -2,3 +2,10 @@
direction: rtl;
padding:0;
}
.cvs {
width : 60%;
height: 50%;
margin-left:auto;
margin-right:auto;
}
......@@ -77,25 +77,28 @@ export class PollGraphicComponent implements OnInit {
this.pollData = new Chart(document.getElementById("graph"), {
type: "horizontalBar",
data: {
labels: ["jeudi"],
labels : ["Jeudi"],
datasets: [
{
{
type: "horizontalBar",
stack: "Yes",
backgroundColor: "#429a00",
data: this.yesList
data: this.yesList,
icons : ['\uf0c3']
},
{
type: "horizontalBar",
stack: "Yes",
backgroundColor: "#f5a623",
data: this.maybeList
data: this.maybeList,
icons: ['\uf0c3']
},
{
type: "horizontalBar",
stack: "No",
backgroundColor: "#cd0000",
data: this.noList
data: this.noList,
icons: ['\uf0c3']
}
]
},
......@@ -109,6 +112,7 @@ export class PollGraphicComponent implements OnInit {
stacked: true,
ticks: {
beginAtZero: true,
fontFamily: 'FontAwesome',
maxRotation: 0,
minRotation: 0
}
......@@ -122,7 +126,7 @@ export class PollGraphicComponent implements OnInit {
}
]
}
}
},
});
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment