Skip to content

Commit

Permalink
Update example to use JSON file
Browse files Browse the repository at this point in the history
  • Loading branch information
voluntadpear committed Jul 21, 2017
1 parent acba493 commit ec6f9bd
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 3 additions & 2 deletions examples/src/App.vue
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
<template>
<div id="app">
<ChoroplethMap :data="pyDepartmentsData" titleKey="department_name" idKey="department_id" :value="value" :extraValues="extraValues" geojsonIdKey="dpto" :geojson="geojson" :center="center" :colorScale="colorScale" referenceTitle="Girls school enrolment" dataTitle="Department" dataPlaceholder="Hover over a department" mapStyle="height: 500px;" :zoom="6" :mapOptions="mapOptions">
<ChoroplethMap :data="pyDepartmentsData" titleKey="department_name" idKey="department_id" :value="value" :extraValues="extraValues" geojsonIdKey="dpto" :geojson="paraguayGeojson" :center="center" :colorScale="colorScale" referenceTitle="Girls school enrolment" dataTitle="Department" dataPlaceholder="Hover over a department" mapStyle="height: 500px;" :zoom="6" :mapOptions="mapOptions">
</ChoroplethMap>
</div>
</template>

<script>
import ChoroplethMap from 'vue-choropleth'
import { geojson } from './data/py-departments-geojson'
import paraguayGeojson from './data/paraguay.json'
import { pyDepartmentsData } from './data/py-departments-data'
export default {
Expand All @@ -17,7 +18,7 @@ export default {
return {
center: [-23.752961, -57.854357],
pyDepartmentsData,
geojson,
paraguayGeojson,
colorScale: ["e7d090", "e9ae7b", "de7062"],
value: {
key: "amount_w",
Expand Down
2 changes: 2 additions & 0 deletions examples/src/data/paraguay.json

Large diffs are not rendered by default.

0 comments on commit ec6f9bd

Please sign in to comment.