{"id":2827,"date":"2024-11-08T14:57:38","date_gmt":"2024-11-08T14:57:38","guid":{"rendered":"https:\/\/kosningaspa.is\/?p=2827"},"modified":"2024-11-14T15:48:24","modified_gmt":"2024-11-14T15:48:24","slug":"8-nov-fylgi","status":"publish","type":"post","link":"https:\/\/kosningaspa.is\/?p=2827","title":{"rendered":"8. nov &#8211; fylgi"},"content":{"rendered":"\n<h4 class=\"wp-block-heading\"><strong><strong><strong>Sta\u00f0an &#8211; Fylgi flokka<\/strong><\/strong><\/strong><\/h4>\n\n\n<p><!DOCTYPE html><br \/>\n<html><br \/>\n<body><br \/>\n    <canvas id=\"myChart1108\" width=\"500\" height=\"400\"><\/canvas> <!-- Adjust the width and height for size --><br \/>\n<script src=\"https:\/\/cdn.jsdelivr.net\/npm\/chart.js\"><\/script><br \/>\n    <script src=\"https:\/\/cdn.jsdelivr.net\/npm\/chartjs-plugin-datalabels\"><\/script><\/p>\n<style>\n        body {\n            font-family: Arial, sans-serif;\n        }\n        canvas {\n            max-width: 500px; \/* Adjust the max-width to resize the chart *\/\n            margin: 20px auto; \/* Adjust the margin for better spacing *\/\n            @media screen and (max-width: 500px) {\n                  max-width: 100%;\n            }\n       }\n     br {\n         display: none;\n     }\n    <\/style>\n<p>    <script>\n        var ctx = document.getElementById('myChart1108').getContext('2d');\n        var myChart1108 = new Chart(ctx, {\n            type: 'bar',\n            data: {\n                labels: [\n                    'Samfylkingin', \n                    'Vi\u00f0reisn', \n                    'Mi\u00f0flokkurinn', \n                    'Sj\u00e1lfst\u00e6\u00f0isflokkurinn', \n                    'Flokkur f\u00f3lksins',\n                    'Frams\u00f3kn',\n                    'P\u00edratar',\n                    'S\u00f3s\u00edalistaflokkurinn', \n                    'Vinstri gr\u00e6n',\n                    'L\u00fd\u00f0r\u00e6\u00f0isflokkurinn',\n                    'A\u00f0rir'\n                ],\n                datasets: [{\n                    label: 'Fylgi (%)',\n                    data: [21.9, 17.2, 15.4, 14.0, 9.5, 6.7, 5.3, 5.2, 3.3, 1.3, 0.2],\n                    backgroundColor: [\n                        '#e42802', \/\/ S\n                        '#ffa500', \/\/ C\n                        '#008a9a', \/\/ M\n                        '#0248f2', \/\/ D\n                        '#ec509a', \/\/ F\n                        '#a6d670', \/\/ B\n                        '#3f0942', \/\/ P\n                        '#9c0f18', \/\/ J\n                        '#4dba35', \/\/ V\n                        '#964B00', \/\/ L\n                        '#848382'  \/\/ A\u00f0rir\n                    ],\n                    borderWidth: 0 \/\/ Removed borders for a cleaner look\n                }]\n            },\n            options: {\n                indexAxis: 'y', \/\/ Make the bars horizontal\n                plugins: {\n                    legend: {\n                        display: false \/\/ Hide the legend for simplicity\n                    },\n                    datalabels: {\n                        anchor: 'center',\n                        align: 'center',\n                        color: 'white',\n                        formatter: function(value, context) {\n                            return value + '%'; \/\/ Add percentage sign to the data labels\n                        }\n                    }\n                },\n                scales: {\n                    x: {\n                        beginAtZero: true,\n                        title: {\n                            display: true,\n                            text: 'Fylgi (%)'\n                        },\n                        ticks: {\n                            precision: 0 \/\/ Ensure whole numbers on the x-axis\n                        }\n                    }\n                },\n                elements: {\n                    bar: {\n                        borderRadius: 4 \/\/ Rounded corners for bars\n                    }\n                }\n            },\n            plugins: [ChartDataLabels]\n        });\n    <\/script><br \/>\n<\/body><br \/>\n<\/html><\/p>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>Kannanir \u00ed n\u00fdjustu kosningasp\u00e1:<\/strong><\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Gallup 1. &#8211; 31. okt (v\u00e6gi: 24%)<\/li>\n\n\n\n<li>Mask\u00edna 1. &#8211; 6. nov (v\u00e6gi: 42%)<\/li>\n\n\n\n<li>Pr\u00f3sent 1. &#8211; 7. nov (v\u00e6gi: 34%)<\/li>\n<\/ul>\n\n\n\n<p>**Flokkar me\u00f0 minna en 1% fylgi eru flokka\u00f0ir undir &#8216;A\u00f0rir&#8217;.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\"><\/h4>\n\n\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Sta\u00f0an &#8211; Fylgi flokka Kannanir \u00ed n\u00fdjustu kosningasp\u00e1: **Flokkar me\u00f0 minna en 1% fylgi eru flokka\u00f0ir undir &#8216;A\u00f0rir&#8217;.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[11],"tags":[],"class_list":["post-2827","post","type-post","status-publish","format-standard","hentry","category-althingiskosningar"],"_links":{"self":[{"href":"https:\/\/kosningaspa.is\/index.php?rest_route=\/wp\/v2\/posts\/2827","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/kosningaspa.is\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/kosningaspa.is\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/kosningaspa.is\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/kosningaspa.is\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2827"}],"version-history":[{"count":3,"href":"https:\/\/kosningaspa.is\/index.php?rest_route=\/wp\/v2\/posts\/2827\/revisions"}],"predecessor-version":[{"id":2842,"href":"https:\/\/kosningaspa.is\/index.php?rest_route=\/wp\/v2\/posts\/2827\/revisions\/2842"}],"wp:attachment":[{"href":"https:\/\/kosningaspa.is\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2827"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kosningaspa.is\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2827"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kosningaspa.is\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2827"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}