diff --git a/CHANGELOG.md b/CHANGELOG.md index b10d2434..1293a14a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,11 @@ +# 0.1.6 + +- Change bar chart colour matching with actors from id to name + # 0.1.5 - Assign bar chart colours cosistently based on Actor id +- external API # 0.1.4 diff --git a/app/javascript/components/map/MapPopup.vue b/app/javascript/components/map/MapPopup.vue index a9481004..5111474c 100644 --- a/app/javascript/components/map/MapPopup.vue +++ b/app/javascript/components/map/MapPopup.vue @@ -99,7 +99,7 @@ export default { this.data.datasets = []; this.chartData.forEach((item) => { - const backgroundColor = CHART_COLORS[item.id] || "#E3E3E3" + const backgroundColor = CHART_COLORS[item.name] || "#E3E3E3" this.data.datasets.push({ data: [item.count], diff --git a/app/javascript/constants.js b/app/javascript/constants.js index 9590eace..13987256 100644 --- a/app/javascript/constants.js +++ b/app/javascript/constants.js @@ -1,14 +1,15 @@ const CHART_COLORS = { - 1: "#97001F", - 2: "#6054BA", - 3: "#00483A", - 4: "#E7C802", - 5: "#4BC0C0", - 6: "#43B2ED", - 7: "#6380FF", - 8: "#FF6384", - 9: "#FFA040", - 10: "#003E78", + "Local communities": "#97001F", + "Indigenous peoples": "#6054BA", + "Non-governmental organisation (NGO)": "#00483A", + "For-profit organisation (business and industry)": "#E7C802", + "Sub-national government": "#4BC0C0", + "Joint governance (i.e. decisions are made by many)": "#43B2ED", + "Individual landowners": "#6380FF", + "Collaborative governance (i.e. decisions are made by one group on behalf of many)": "#FF6384", + "Non-profit organisation": "#00483A", + "For-profit organisation": "#E7C802", + "Joint governance": "#43B2ED", } export default CHART_COLORS \ No newline at end of file