Skip to content

Commit

Permalink
Merge branch '0.1.6' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
RainbowGiantSquid committed Jun 7, 2022
2 parents c0ee0d5 + 9a58b75 commit 2576889
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 11 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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

Expand Down
2 changes: 1 addition & 1 deletion app/javascript/components/map/MapPopup.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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],
Expand Down
21 changes: 11 additions & 10 deletions app/javascript/constants.js
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 2576889

Please sign in to comment.