Skip to content

Commit

Permalink
feat(map): hide map of no value part
Browse files Browse the repository at this point in the history
  • Loading branch information
xiguaxigua committed Aug 10, 2018
1 parent e9b8424 commit b2b0f39
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion docs/en/map.md
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@
export default {
data () {
this.chartSettings = {
positionJsonLink: 'https://dn-quietcoder.qbox.me/HK_geo.json',
positionJsonLink: 'https://unpkg.com/[email protected]/hk-geo.json',
position: 'HK',
beforeRegisterMap (json) {
// edit data here such as:
Expand Down
2 changes: 1 addition & 1 deletion docs/map.md
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@
export default {
data () {
this.chartSettings = {
positionJsonLink: 'https://dn-quietcoder.qbox.me/HK_geo.json',
positionJsonLink: 'https://unpkg.com/[email protected]/hk-geo.json',
position: 'HK',
beforeRegisterMap (json) {
// edit data here such as:
Expand Down
4 changes: 2 additions & 2 deletions examples/data/map.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ export default {
},
settings: {
position: 'USA',
positionJsonLink: 'https://dn-quietcoder.qbox.me/USA.json',
positionJsonLink: 'https://unpkg.com/[email protected]/usa.json',
specialAreas: {
Alaska: {
left: -131,
Expand Down Expand Up @@ -110,7 +110,7 @@ export default {
]
},
settings: {
positionJsonLink: 'https://dn-quietcoder.qbox.me/HK_geo.json',
positionJsonLink: 'https://unpkg.com/[email protected]/hk-geo.json',
position: 'HK',
beforeRegisterMap (json) {
// edit data here such as:
Expand Down
1 change: 1 addition & 0 deletions src/packages/map/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ function getTooltip (dataType, digit, dataStore, metrics, color, labelMap) {
return {
formatter (item) {
let tpl = []
if (!item.name) return ''
tpl.push(`${item.name}<br>`)
metrics.forEach((label, index) => {
let title = labelMap[label] != null ? labelMap[label] : label
Expand Down

0 comments on commit b2b0f39

Please sign in to comment.