Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion area-stacked-sm/config.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
config = {
"graphicDataURL": "data.csv",
"colourPalette": ONSpalette,
"sourceText": "Office for National Statistics",
"accessibleSummary": "The chart canvas is hidden from screen readers. The main message is summarised by the chart title and the data behind the chart is available to download below.",
"xDomain": "auto",
"yDomain": "auto",
Expand Down
4 changes: 0 additions & 4 deletions area-stacked-sm/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,6 @@ <h5 id="accessibleSummary" class="visuallyhidden"></h5>
<!-- <img src="fallback.png" alt="[Chart]" /> -->
</div>


<h5 id="source">
</h5>

<script src="https://cdn.ons.gov.uk/vendor/d3/6.3.0/d3.min.js" type="text/javascript"></script>
<script src="https://cdn.ons.gov.uk/vendor/pym/1.3.2/pym.js" type="text/javascript"></script>
<script src="../lib/colours.js"></script>
Expand Down
5 changes: 1 addition & 4 deletions area-stacked-sm/script.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { initialise, wrap, addSvg, calculateChartWidth, addChartTitleLabel, addAxisLabel, addSource } from "../lib/helpers.js";
import { initialise, wrap, addSvg, calculateChartWidth, addChartTitleLabel, addAxisLabel} from "../lib/helpers.js";

let pymChild = null;
let graphic = d3.select('#graphic');
Expand Down Expand Up @@ -223,9 +223,6 @@ function drawGraphic() {
drawChart(d3.select(this), key, value, i);
});

//create link to source
addSource('source', config.sourceText);

// Send the height to the parent frame
if (pymChild) {
pymChild.sendHeight();
Expand Down
1 change: 0 additions & 1 deletion area-stacked/config.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
config = {
"graphicDataURL": "data.csv",
"colourPalette": ONSpalette,
"sourceText": "Office for National Statistics",
"accessibleSummary": "The chart canvas is hidden from screen readers. The main message is summarised by the chart title and the data behind the chart is available to download below.",
"xDomain": "auto",
"yDomain": "auto",
Expand Down
4 changes: 0 additions & 4 deletions area-stacked/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,6 @@ <h5 id="accessibleSummary" class="visuallyhidden"></h5>
<!-- <img src="fallback.png" alt="[Chart]" /> -->
</div>


<h5 id="source">
</h5>

<script src="https://cdn.ons.gov.uk/vendor/d3/6.3.0/d3.min.js" type="text/javascript"></script>
<script src="https://cdn.ons.gov.uk/vendor/pym/1.3.2/pym.js" type="text/javascript"></script>
<script src="../lib/colours.js"></script>
Expand Down
5 changes: 1 addition & 4 deletions area-stacked/script.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { initialise, wrap, addSvg, addAxisLabel, addSource } from "../lib/helpers.js";
import { initialise, wrap, addSvg, addAxisLabel} from "../lib/helpers.js";

let graphic = d3.select('#graphic');
let legend = d3.select('#legend');
Expand Down Expand Up @@ -157,9 +157,6 @@ function drawGraphic() {
wrapWidth: chartWidth
});

//create link to source
addSource('source', config.sourceText);

//use pym to calculate chart dimensions
if (pymChild) {
pymChild.sendHeight();
Expand Down
1 change: 0 additions & 1 deletion bar-chart-clustered-sm/config.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
config = {
"graphicDataURL": "data.csv",
"colourPalette": ONSpalette,
"sourceText": "Office for National Statistics",
"accessibleSummary": "The chart canvas is hidden from screen readers. The main message is summarised by the chart title and the data behind the chart is available to download below.",
"dataLabels": {
"show": true,
Expand Down
4 changes: 0 additions & 4 deletions bar-chart-clustered-sm/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,6 @@ <h5 id="accessibleSummary" class="visuallyhidden"></h5>
<!-- <img src="fallback.png" alt="[Chart]" /> -->
</div>


<h5 id="source">
</h5>

<script src="https://cdn.ons.gov.uk/vendor/d3/6.3.0/d3.min.js" type="text/javascript"></script>
<script src="https://cdn.ons.gov.uk/vendor/pym/1.3.2/pym.js" type="text/javascript"></script>
<script src="../lib/colours.js"></script>
Expand Down
5 changes: 1 addition & 4 deletions bar-chart-clustered-sm/script.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { initialise, wrap, addSvg, calculateChartWidth, addDataLabels, addChartTitleLabel, addAxisLabel, addSource } from "../lib/helpers.js";
import { initialise, wrap, addSvg, calculateChartWidth, addDataLabels, addChartTitleLabel, addAxisLabel} from "../lib/helpers.js";

let graphic = d3.select('#graphic');
let legend = d3.select('#legend');
Expand Down Expand Up @@ -209,9 +209,6 @@ function drawGraphic() {
drawChart(d3.select(this), value, i);
});

//create link to source
addSource('source', config.sourceText);

//use pym to calculate chart dimensions
if (pymChild) {
pymChild.sendHeight();
Expand Down
1 change: 0 additions & 1 deletion bar-chart-clustered/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ config = {
"graphicDataURL": "data.csv",
"legendLabels": ["Category 1 goes here", "Category 2 goes here"],
"colourPalette": ONSpalette,
"sourceText": "Office for National Statistics",
"accessibleSummary": "The chart canvas is hidden from screen readers. The main message is summarised by the chart title and the data behind the chart is available to download below.",
"dataLabels": {
"show": true,
Expand Down
4 changes: 0 additions & 4 deletions bar-chart-clustered/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,6 @@ <h5 id="accessibleSummary" class="visuallyhidden"></h5>
<!-- <img src="fallback.png" alt="[Chart]" /> -->
</div>


<h5 id="source">
</h5>

<script src="https://cdn.ons.gov.uk/vendor/d3/6.3.0/d3.min.js" type="text/javascript"></script>
<script src="https://cdn.ons.gov.uk/vendor/pym/1.3.2/pym.js" type="text/javascript"></script>
<script src="../lib/colours.js"></script>
Expand Down
5 changes: 1 addition & 4 deletions bar-chart-clustered/script.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { initialise, wrap, addSvg, addDataLabels, addAxisLabel, addSource } from "../lib/helpers.js";
import { initialise, wrap, addSvg, addDataLabels, addAxisLabel} from "../lib/helpers.js";

let graphic = d3.select('#graphic');
let legend = d3.select('#legend');
Expand Down Expand Up @@ -157,9 +157,6 @@ function drawGraphic() {
wrapWidth: chartWidth
});

//create link to source
addSource('source', config.sourceText);

//use pym to calculate chart dimensions
if (pymChild) {
pymChild.sendHeight();
Expand Down
1 change: 0 additions & 1 deletion bar-chart-grouped-clustered/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ config = {
"graphicDataURL": "data.csv",
"legendLabels": ["Category 1 goes here", "Category 2 goes here"],
"colourPalette": ONSpalette,
"sourceText": "Office for National Statistics",
"accessibleSummary": "The chart canvas is hidden from screen readers. The main message is summarised by the chart title and the data behind the chart is available to download below.",
"dataLabels": {
"show": true,
Expand Down
4 changes: 0 additions & 4 deletions bar-chart-grouped-clustered/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,6 @@ <h5 id="accessibleSummary" class="visuallyhidden"></h5>
<!-- <img src="fallback.png" alt="[Chart]" /> -->
</div>


<h5 id="source">
</h5>

<script src="https://cdn.ons.gov.uk/vendor/d3/6.3.0/d3.min.js" type="text/javascript"></script>
<script src="https://cdn.ons.gov.uk/vendor/pym/1.3.2/pym.js" type="text/javascript"></script>
<script src="../lib/colours.js"></script>
Expand Down
4 changes: 1 addition & 3 deletions bar-chart-grouped-clustered/script.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { initialise, wrap, addSvg, addDataLabels, addAxisLabel, addSource } from "../lib/helpers.js";
import { initialise, wrap, addSvg, addDataLabels, addAxisLabel} from "../lib/helpers.js";

let graphic = d3.select('#graphic');
let legend = d3.select('#legend');
Expand Down Expand Up @@ -180,8 +180,6 @@ function drawGraphic() {
return d[0];
});

addSource('source', config.sourceText);

//use pym to calculate chart dimensions
if (pymChild) {
pymChild.sendHeight();
Expand Down
1 change: 0 additions & 1 deletion bar-chart-grouped/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ config={
"legendLabels": {"min":"2015-2019", "max":"2020"},
//the keys match the column names
"colourPalette": ONScolours.oceanBlue,
"sourceText": "Office for National Statistics",
"accessibleSummary": "The chart canvas is hidden from screen readers. The main message is summarised by the chart title and the data behind the chart is available to download below.",
"dataLabels":{
"show":true,
Expand Down
4 changes: 0 additions & 4 deletions bar-chart-grouped/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,6 @@ <h5 id="accessibleSummary" class="visuallyhidden"></h5>
<!-- <img src="fallback.png" alt="[Chart]" /> -->
</div>


<h5 id="source">
</h5>

<script src="https://cdn.ons.gov.uk/vendor/d3/6.3.0/d3.min.js" type="text/javascript"></script>
<script src="https://cdn.ons.gov.uk/vendor/pym/1.3.2/pym.js" type="text/javascript"></script>
<script src="../lib/colours.js"></script>
Expand Down
7 changes: 1 addition & 6 deletions bar-chart-grouped/script.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { initialise, wrap, addSvg, addAxisLabel, addSource } from "../lib/helpers.js";
import { initialise, wrap, addSvg, addAxisLabel } from "../lib/helpers.js";

let graphic = d3.select('#graphic');
let pymChild = null;
Expand Down Expand Up @@ -151,11 +151,6 @@ function drawGraphic() {
})




//create link to source
addSource('source', config.sourceText)

//use pym to calculate chart dimensions
if (pymChild) {
pymChild.sendHeight();
Expand Down
1 change: 0 additions & 1 deletion bar-chart-sm/config.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
config = {
"graphicDataURL": "data.csv",
"colourPalette": ONScolours.oceanBlue,
"sourceText": "Office for National Statistics",
"accessibleSummary": "The chart canvas is hidden from screen readers. The main message is summarised by the chart title and the data behind the chart is available to download below.",
"dataLabels": {
"show": 1,
Expand Down
4 changes: 0 additions & 4 deletions bar-chart-sm/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,6 @@ <h5 id="accessibleSummary" class="visuallyhidden"></h5>
<!-- <img src="fallback.png" alt="[Chart]" /> -->
</div>


<h5 id="source">
</h5>

<script src="https://cdn.ons.gov.uk/vendor/d3/6.3.0/d3.min.js" type="text/javascript"></script>
<script src="https://cdn.ons.gov.uk/vendor/pym/1.3.2/pym.js" type="text/javascript"></script>
<script src="../lib/colours.js"></script>
Expand Down
5 changes: 1 addition & 4 deletions bar-chart-sm/script.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { initialise, wrap, addSvg, calculateChartWidth, addDataLabels, addChartTitleLabel, addAxisLabel,addSource } from "../lib/helpers.js";
import { initialise, wrap, addSvg, calculateChartWidth, addDataLabels, addChartTitleLabel, addAxisLabel} from "../lib/helpers.js";

let graphic = d3.select('#graphic');
let pymChild = null;
Expand Down Expand Up @@ -172,9 +172,6 @@ function drawGraphic() {
drawChart(d3.select(this), key, value, i);
});

//create link to source
addSource('source', config.sourceText);

//use pym to calculate chart dimensions
if (pymChild) {
pymChild.sendHeight();
Expand Down
1 change: 0 additions & 1 deletion bar-chart-stacked-grouped/config.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
config={
"graphicDataURL": "data.csv",
"colourPalette": ONSpalette,
"sourceText": "Office for National Statistics",
"accessibleSummary": "The chart canvas is hidden from screen readers. The main message is summarised by the chart title and the data behind the chart is available to download below.",
"xDomain":"auto",
// either "auto" or an array for the x domain e.g. [0,100]
Expand Down
4 changes: 0 additions & 4 deletions bar-chart-stacked-grouped/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,6 @@ <h5 id="accessibleSummary" class="visuallyhidden"></h5>
<!-- <img src="fallback.png" alt="[Chart]" /> -->
</div>


<h5 id="source">
</h5>

<script src="https://cdn.ons.gov.uk/vendor/d3/6.3.0/d3.min.js" type="text/javascript"></script>
<script src="https://cdn.ons.gov.uk/vendor/pym/1.3.2/pym.js" type="text/javascript"></script>
<script src="../lib/colours.js"></script>
Expand Down
5 changes: 1 addition & 4 deletions bar-chart-stacked-grouped/script.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { initialise, wrap, addSvg, addAxisLabel, addSource } from "../lib/helpers.js";
import { initialise, wrap, addSvg, addAxisLabel} from "../lib/helpers.js";

let graphic = d3.select('#graphic');
let legend = d3.select('#legend');
Expand Down Expand Up @@ -157,9 +157,6 @@ function drawGraphic() {
.attr('class', 'legend--text')
.html((d) => d[0]);

//create link to source
addSource('source', config.sourceText);

//use pym to calculate chart dimensions
if (pymChild) {
pymChild.sendHeight();
Expand Down
1 change: 0 additions & 1 deletion bar-chart-stacked-sm/config.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
config = {
"graphicDataURL": "data.csv",
"colourPalette": ONSdivPlatte,
"sourceText": "Office for National Statistics",
"accessibleSummary": "The chart canvas is hidden from screen readers. The main message is summarised by the chart title and the data behind the chart is available to download below.",
"xAxisTickFormat": {
"sm": ".0f",
Expand Down
4 changes: 0 additions & 4 deletions bar-chart-stacked-sm/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,6 @@ <h5 id="accessibleSummary" class="visuallyhidden"></h5>
<!-- <img src="fallback.png" alt="[Chart]" /> -->
</div>


<h5 id="source">
</h5>

<script src="https://cdn.ons.gov.uk/vendor/d3/6.3.0/d3.min.js" type="text/javascript"></script>
<script src="https://cdn.ons.gov.uk/vendor/pym/1.3.2/pym.js" type="text/javascript"></script>
<script src="../lib/colours.js"></script>
Expand Down
5 changes: 1 addition & 4 deletions bar-chart-stacked-sm/script.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { initialise, wrap, addSvg, calculateChartWidth, addChartTitleLabel, addAxisLabel, addSource, addAnnotationRangeHorizontal } from "../lib/helpers.js";
import { initialise, wrap, addSvg, calculateChartWidth, addChartTitleLabel, addAxisLabel, addAnnotationRangeHorizontal } from "../lib/helpers.js";

let graphic = d3.select('#graphic');
let legend = d3.select('#legend');
Expand Down Expand Up @@ -222,9 +222,6 @@ function drawGraphic() {
.style('grid-template-columns', `repeat(${config.legendColumns}, 1fr)`);
}

//create source text
addSource('source', config.sourceText);

//use pym to calculate chart dimensions
if (pymChild) {
pymChild.sendHeight();
Expand Down
1 change: 0 additions & 1 deletion bar-chart-stacked/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ config = {
"colourPalette": ONSpalette,
"drawLegend": true, // set to false to remove the legend (still working on this)
"someOtherVariable": "someOtherValue",
"sourceText": "Office for National Statistics",
"accessibleSummary": "The chart canvas is hidden from screen readers. The main message is summarised by the chart title and the data behind the chart is available to download below.",
"xDomain": "auto",
// either "auto" or an array for the x domain e.g. [0,100]
Expand Down
4 changes: 0 additions & 4 deletions bar-chart-stacked/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,6 @@ <h5 id="accessibleSummary" class="visuallyhidden"></h5>
<!-- <img src="fallback.png" alt="[Chart]" /> -->
</div>


<h5 id="source">
</h5>

<script src="https://cdn.ons.gov.uk/vendor/d3/6.3.0/d3.min.js" type="text/javascript"></script>
<script src="https://cdn.ons.gov.uk/vendor/pym/1.3.2/pym.js" type="text/javascript"></script>
<script src="../lib/colours.js"></script>
Expand Down
5 changes: 1 addition & 4 deletions bar-chart-stacked/script.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { initialise, wrap, addSvg, addAxisLabel, addSource } from "../lib/helpers.js";
import { initialise, wrap, addSvg, addAxisLabel} from "../lib/helpers.js";

let graphic = d3.select('#graphic');
let legend = d3.select('#legend');
Expand Down Expand Up @@ -138,9 +138,6 @@ function drawGraphic() {
wrapWidth: chartWidth
});

//create link to source
addSource('source', config.sourceText);

//use pym to calculate chart dimensions
if (pymChild) {
pymChild.sendHeight();
Expand Down
2 changes: 0 additions & 2 deletions bar-chart-with-dropdown/config.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
config = {

"graphicDataURL": "data.csv",
"colourPalette": ONScolours.oceanBlue,
"sourceText": "Office for National Statistics",
"accessibleSummary": "The chart canvas is hidden from screen readers. The main message is summarised by the chart title and the data behind the chart is available to download below.",
"dataLabels": {
"show": true,
Expand Down
4 changes: 0 additions & 4 deletions bar-chart-with-dropdown/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,6 @@ <h5 id="accessibleSummary" class="visuallyhidden"></h5>
<!-- <img src="fallback.png" alt="[Chart]" /> -->
</div>


<h5 id="source">
</h5>

<script src="https://cdn.ons.gov.uk/vendor/d3/6.3.0/d3.min.js" type="text/javascript"></script>
<script src="https://cdn.ons.gov.uk/vendor/pym/1.3.2/pym.js" type="text/javascript"></script>
<script src="./js/jquery-3.0.0.slim.min.js"></script>
Expand Down
5 changes: 1 addition & 4 deletions bar-chart-with-dropdown/script.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { initialise, wrap, addSvg, addDataLabels, addAxisLabel, addSource } from "../lib/helpers.js";
import { initialise, wrap, addSvg, addDataLabels, addAxisLabel} from "../lib/helpers.js";

let graphic = d3.select('#graphic');
let select = d3.select('#select');
Expand Down Expand Up @@ -255,9 +255,6 @@ function drawGraphic() {
wrapWidth: chartWidth
});

//create link to source
addSource('source', config.sourceText);

$('#optionsSelect').val(config.defaultOption).trigger('chosen:updated');
changeData(config.defaultOption)
// updateLegend("Agriculture, forestry and fishing", 0)
Expand Down
1 change: 0 additions & 1 deletion bar-chart/config.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
config = {
"graphicDataURL": "data.csv",
"colourPalette": ONScolours.oceanBlue,
"sourceText": "Office for National Statistics",
"accessibleSummary": "This chart has been hidden from screen readers. The main message of the chart is summarised in the chart title.",
"dataLabels": {
"show": true,
Expand Down
Loading