mirror of
https://github.com/Azgaar/Fantasy-Map-Generator.git
synced 2025-12-17 09:41:24 +01:00
don't show bubble chart if no data
This commit is contained in:
parent
d06dba2d81
commit
e13796bd72
2 changed files with 85 additions and 18 deletions
|
|
@ -295,6 +295,7 @@ function overviewBurgs() {
|
|||
const name = s.fullName ? s.fullName : s.name;
|
||||
return {id: s.i, state: s.i ? 0 : null, color, name};
|
||||
});
|
||||
|
||||
const burgs = pack.burgs
|
||||
.filter(b => b.i && !b.removed)
|
||||
.map(b => {
|
||||
|
|
@ -306,6 +307,7 @@ function overviewBurgs() {
|
|||
return {id, i: b.i, state: b.state, culture: b.culture, province, parent, name: b.name, population, capital, x: b.x, y: b.y};
|
||||
});
|
||||
const data = states.concat(burgs);
|
||||
if (data.length < 2) return tip("No burgs to show", false, "error");
|
||||
|
||||
const root = d3
|
||||
.stratify()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue