Skip to content

Commit

Permalink
Enhancements: Add captions for charts
Browse files Browse the repository at this point in the history
  • Loading branch information
AbigailFernandes committed Apr 28, 2019
1 parent 40ae1b6 commit bacebc9
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 5 deletions.
6 changes: 3 additions & 3 deletions src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
<div class="back" v-if="isCityView" @click="showCountryView">
<img src="./assets/ic-back.png">
</div>
<CityView v-if="isCityView" :cityTrends="cityTrends" :countryCode="countryCode"/>
<CityView v-if="isCityView" :cityTrends="cityTrends" :countryCode="countryCode" :country="country"/>
<WorldMap v-else :data="countryTrends" @selectedCountry="showCityInfo"/>
</div>
<WordCloud class="word-cloud" :words="defaultWords" :urls="urls"/>
<WordCloud class="word-cloud" :words="defaultWords" :urls="urls" :key='isCityView'/>
<TrendBarChart class="trends-volume" :barData="singleCountry"/>
</main>
</template>
Expand Down Expand Up @@ -41,7 +41,7 @@ export default {
cityWords: null,
singleCountry: [],
country: "",
barChartData: []
barChartData: [],
};
},
mounted() {
Expand Down
14 changes: 13 additions & 1 deletion src/components/CityView.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<template>
<div>
<div class="box">Trends and Sentiment for {{country}}</div>
<GeoMapGCharts :cityTrends="cityTrends" :countryCode="countryCode"/>
</div>
</template>
Expand All @@ -12,6 +13,17 @@ export default {
components: {
GeoMapGCharts
},
props: ["cityTrends", "countryCode"]
props: ["cityTrends", "countryCode", "country"]
};
</script>

<style>
.box {
padding: 15px;
background-color: #262933;
color: white;
font-family: "Fira Sans Regular";
font-size: 18px;
text-align: center;
}
</style>
12 changes: 11 additions & 1 deletion src/components/WordCloud.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
<template>
<section class='wordcloud'>
<section class="wordcloud">
<div class="box">
Twitter Trend Word Cloud
</div>
<AppCloud
:data="words"
nameKey="name"
Expand Down Expand Up @@ -40,5 +43,12 @@ export default {
.wordcloud {
background-color: #262933;
}
.box {
color: white;
padding: 10px;
font-family: "Fira Sans Regular";
font-size: 18px;
text-align: center;
}
</style>

0 comments on commit bacebc9

Please sign in to comment.