Skip to content
Open
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
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,18 @@ object formatted like so.
}
```

For Individual Countries pass the ISO 3166 Code to the `map` prop. for US the values for the states can be set like this:

``` javascript
{
US_CA: 100,
CA_NY: 120,
UK_TX: 400,
}
```

note: Only US country map is available.

Where the key is a country's
[ISO 3166 Code](https://en.wikipedia.org/wiki/ISO_3166) and the value is a
numerical value associated with it.
Expand Down
10 changes: 8 additions & 2 deletions src/App.vue
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
<template>
<div class="vue-world-map">
<Map />
<Map v-if="map == 'world'" />
<US v-if="map === 'US'" />
</div>
</template>

<script>
import chroma from 'chroma-js';
import Map from './Map';
import US from './countries/US'
import {
getDynamicMapCss,
getBaseCss,
Expand All @@ -15,13 +17,17 @@ import {


export default {
components: { Map },
components: { US, Map },
watch: {
countryData() {
this.renderMapCSS();
},
},
props: {
map: {
type: String,
default: 'world'
},
lowColor: {
type: String,
default: '#fde2e2',
Expand Down
Loading