Not so much of a branch, more a whole new project
This commit is contained in:
parent
985c91a72e
commit
3a1ae81f08
18 changed files with 204 additions and 123 deletions
|
|
@ -1,70 +1,73 @@
|
|||
/***************************************************************************\
|
||||
* *
|
||||
* swinging-needle-meter.css *
|
||||
* rsvggraph.css *
|
||||
* *
|
||||
* CSS styling for the swinging needle meter itself. *
|
||||
* CSS styling for the radial svg graph itself. *
|
||||
* *
|
||||
\***************************************************************************/
|
||||
|
||||
.snm-cursor {
|
||||
svg {
|
||||
border: thin solid gray;
|
||||
object-fit: contain;
|
||||
}
|
||||
|
||||
.rsvggraph-cursor {
|
||||
stroke:#ff8500;
|
||||
stroke-width: 3%;
|
||||
stroke-opacity: 0.5;
|
||||
}
|
||||
|
||||
.snm-frame {
|
||||
.rsvggraph-frame {
|
||||
fill: none;
|
||||
stroke-width: 5%;
|
||||
stroke-linejoin: round;
|
||||
stroke: #444444;
|
||||
stroke: none;
|
||||
}
|
||||
|
||||
.snm-gradation path {
|
||||
.rsvggraph-gradation path {
|
||||
stroke: black;
|
||||
stroke-width: 1;
|
||||
}
|
||||
|
||||
.snm-gradation text {
|
||||
.rsvggraph-gradation text {
|
||||
font-size: 200%;
|
||||
font-weight: lighter;
|
||||
}
|
||||
|
||||
.snm-hub {
|
||||
.rsvggraph-hub {
|
||||
fill: #444444;
|
||||
}
|
||||
|
||||
.snm-meter {
|
||||
.rsvggraph-graph {
|
||||
height: 50%;
|
||||
width: auto;
|
||||
}
|
||||
|
||||
.snm-needle {
|
||||
.rsvggraph-needle {
|
||||
stroke: black;
|
||||
stroke-width: 1;
|
||||
}
|
||||
|
||||
.snm-redzone {
|
||||
.rsvggraph-redzone {
|
||||
fill:none;
|
||||
stroke: maroon;
|
||||
stroke-width: 10%;
|
||||
}
|
||||
|
||||
.snm-scale {
|
||||
.rsvggraph-scale {
|
||||
fill: none;
|
||||
stroke: silver;
|
||||
stroke-width: 10%;
|
||||
}
|
||||
|
||||
.snm-target .snm-frame {
|
||||
.rsvggraph-target .rsvggraph-frame {
|
||||
stroke: green;
|
||||
}
|
||||
|
||||
.snm-value {
|
||||
.rsvggraph-value {
|
||||
font-size: 400%;
|
||||
font-weight: bold;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.snm-warning .snm-frame {
|
||||
.rsvggraph-warning .rsvggraph-frame {
|
||||
stroke: maroon;
|
||||
}
|
||||
|
|
@ -5,16 +5,16 @@
|
|||
<link rel="stylesheet" href="http://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.5/css/bootstrap.min.css">
|
||||
<link rel="stylesheet" href="vendor/css/material-design-iconic-font.min.css">
|
||||
<link rel="stylesheet" href="css/re-com.css">
|
||||
<link rel="stylesheet" href="css/swingometer.css">
|
||||
<link rel="stylesheet" href="css/rsvggraph.css">
|
||||
<link href="http://fonts.googleapis.com/css?family=Roboto:300,400,500,700,400italic" rel="stylesheet" type="text/css">
|
||||
<link href="http://fonts.googleapis.com/css?family=Roboto+Condensed:400,300" rel="stylesheet" type="text/css">
|
||||
|
||||
|
||||
<title>Example swingometer following re-com conventions.</title>
|
||||
<title>Example rsvggraph following re-com conventions.</title>
|
||||
</head>
|
||||
<body>
|
||||
<div id="app"></div>
|
||||
<script src="js/compiled/app.js"></script>
|
||||
<script>swingometer.core.init();</script>
|
||||
<script>rsvggraph.core.init();</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
|||
40
resources/public/sample-data.edn
Normal file
40
resources/public/sample-data.edn
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
{:id "ge2024"
|
||||
:label "UK General Election 2024"
|
||||
:children [{:id "no-show"
|
||||
:label "Did not vote"
|
||||
:magnitude 18365357}
|
||||
{:id "voted"
|
||||
:label "Voted"
|
||||
:children [{:id "reform"
|
||||
:label "Reform UK Ltd."
|
||||
:magnitude 4091549}
|
||||
{:id "greenew"
|
||||
:label "Green Party of England and Wales"
|
||||
:magnitude 1939502}
|
||||
{:id "pc"
|
||||
:label "Plaid Cymru"
|
||||
:magnitude 194811}
|
||||
{:id "sf"
|
||||
:label "Sinn Féin"
|
||||
:magnitude 210891}
|
||||
{:id "ld"
|
||||
:label "Liberal Democrats"
|
||||
:magnitude 3499933}
|
||||
{:id "labour"
|
||||
:label "Labour"
|
||||
:magnitude 9712011}
|
||||
{:id "apni"
|
||||
:label "Alliance Party"
|
||||
:magnitude 117191}
|
||||
{:id "sdlp"
|
||||
:label "Social Democratic and Labour Party"
|
||||
:magnitude 86861}
|
||||
{:id "dup"
|
||||
:label "Democratic Unionist Party"
|
||||
:magnitude 172058}
|
||||
{:id "snp"
|
||||
:label "Scottish National Party"
|
||||
:magnitude 708759}
|
||||
{:id "con"
|
||||
:label "Conservative"
|
||||
:magnitude 6814469}]}]}
|
||||
Loading…
Add table
Add a link
Reference in a new issue