diff --git a/css/style.css b/css/style.css index 15ef6df..9b4bfed 100644 --- a/css/style.css +++ b/css/style.css @@ -281,6 +281,18 @@ table.results .btn-link.btn-sm { padding:2px; } +#addition { + vertical-align:top; +} + +#showChart { + margin-top:30px; +} + +#Chart { + padding-right:30px; +} + /* Formulaire de vote */ #vote-form td ul, #vote-form td label { margin:0; diff --git a/js/Chart.StackedBar.js b/js/Chart.StackedBar.js new file mode 100644 index 0000000..a7712a9 --- /dev/null +++ b/js/Chart.StackedBar.js @@ -0,0 +1,518 @@ +(function (factory) { + "use strict"; + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['chart.js'], factory); + } else if (typeof exports === 'object') { + // Node/CommonJS + module.exports = factory(require('chart.js')); + } else { + // Global browser + factory(Chart); + } +}(function (Chart) { + "use strict"; + + var helpers = Chart.helpers; + + var defaultConfig = { + scaleBeginAtZero : true, + + //Boolean - Whether grid lines are shown across the chart + scaleShowGridLines : true, + + //String - Colour of the grid lines + scaleGridLineColor : "rgba(0,0,0,.05)", + + //Number - Width of the grid lines + scaleGridLineWidth : 1, + + //Boolean - Whether to show horizontal lines (except X axis) + scaleShowHorizontalLines: true, + + //Boolean - Whether to show vertical lines (except Y axis) + scaleShowVerticalLines: true, + + //Boolean - If there is a stroke on each bar + barShowStroke : true, + + //Number - Pixel width of the bar stroke + barStrokeWidth : 2, + + //Number - Spacing between each of the X value sets + barValueSpacing : 5, + + //Boolean - Whether bars should be rendered on a percentage base + relativeBars : false, + + //String - A legend template + legendTemplate : "
{__('Poll results', 'The best choice at this time is:')}
+{__('Poll results', 'The best choice at this time is:')}
{elseif $count_bests > 1}{__('Poll results', 'The bests choices at this time are:')}
+{__('Poll results', 'The bests choices at this time are:')}
{/if} @@ -206,4 +282,4 @@{__('Poll results', 'The best choice at this time is:')}
+{__('Poll results', 'The best choice at this time is:')}
{elseif $count_bests > 1}{__('Poll results', 'The bests choices at this time are:')}
+{__('Poll results', 'The bests choices at this time are:')}
{/if} @@ -263,4 +339,4 @@