@vizabi/core
Advanced tools
Comparing version 1.20.0 to 1.21.0
@@ -1,2 +0,2 @@ | ||
// http://vizabi.org v1.20.0 Copyright 2021 Jasper Heeffer and others at Gapminder Foundation | ||
// http://vizabi.org v1.21.0 Copyright 2021 Jasper Heeffer and others at Gapminder Foundation | ||
(function (global, factory) { | ||
@@ -3,0 +3,0 @@ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('mobx')) : |
{ | ||
"name": "@vizabi/core", | ||
"version": "1.20.0", | ||
"version": "1.21.0", | ||
"description": "Vizabi core (data layer)", | ||
@@ -5,0 +5,0 @@ "main": "dist/Vizabi.js", |
@@ -281,5 +281,11 @@ import { createKeyStr } from "../../dataframe/dfutils"; | ||
concepts = allProperties.keys(); | ||
} else if (entitySpace.length === 1) { | ||
//dimension has no entity properties --> return dimension name itself if it's the only dimension | ||
concepts = [dim]; | ||
} else { | ||
//dimension has no entity properties --> return dimension name itself | ||
concepts = [dim]; | ||
//otherwise setting concept to a single dim in a multidim situation would result | ||
//in ambiguity (i.e. "chn" label for "geo:chn gender:male" marker) | ||
//therefore we set concept to null and let the encoding be underconfigured | ||
//this situation can be handled later | ||
concepts = [null]; | ||
} | ||
@@ -286,0 +292,0 @@ occurences.push(...concepts); |
@@ -88,3 +88,13 @@ import { DataFrame } from "../../dataframe/dataFrame"; | ||
if (from == "entities.schema") { | ||
return []; | ||
//make the key itself always present in schema | ||
const conceptTpes = getConceptTypes(data); | ||
const entitiesSchema = data.key | ||
.filter(f => conceptTpes.get(f) !== "time") | ||
.map(m => ({key: [m], value: m})); | ||
//this only supports names for the first dimension, but it is possible to add more, i.e. with dot notation | ||
if (data.fields.includes("name")) | ||
entitiesSchema.push({ key: [data.key[0]], value: "name" }); | ||
return entitiesSchema; | ||
} | ||
@@ -91,0 +101,0 @@ console.warn("Invalid schema query `from` clause: ", from); |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1208230
12636