openownership / visualisation-tool

A visualisation library for beneficial ownership structures
https://www.openownership.org/en/publications/beneficial-ownership-visualisation-system/bods-data-visualiser/
Apache License 2.0
19 stars 4 forks source link

Represent PLCs based only on publicListing.hasPublicListing #110

Closed kd-ods closed 1 year ago

kd-ods commented 2 years ago

At the moment, this json renders as expected with a standard company icon:

[
  {
    "entityType": "legalEntity",
    "foundingDate": "1992-06-17T00:00:00+00:00",
    "identifiers": [
      {
        "id": "02723534",
        "scheme": "GB-COH"
      },
      {
        "id": "PY6ZZQWO2IZFZC3IOL08",
        "scheme": "XI-LEI"
      }
    ],
    "jurisdiction": {
      "code": "GB",
      "name": "United Kingdom of Great Britain and Northern Ireland (the)"
    },
    "isComponent": false,
    "name": "AstraZeneca PLC",
    "publicationDetails": {
      "bodsVersion": "0.3",
      "license": "https://creativecommons.org/licenses/by/2.0/legalcode",
      "publicationDate": "2021-02-09",
      "publisher": {
        "name": "Open Ownership",
        "url": "http://www.openownership.org"
      }
    },
    "source": {
      "description": "This information has been retrieved from diverse public sources.",
      "type": [
        "primaryResearch"
      ]
    },
    "statementDate": "2021-02-09",
    "statementID": "openo-es-00006565580581270044236",
    "statementType": "entityStatement"
  }
]

However, when the following is added, the node is given the PLC icon.

"publicListing": {}

It is also given the PLC icon if this is added:

    "publicListing": {
      "hasPublicListing": false
    }

The expected behaviour is that the node icon should be set by the entityType and subType properties. And only if publicListing.hasPublicListing is true should that icon be replaced by the PLC icon. (If publicListing.hasPublicListing is non-existent or false then the entityType (and subtype) should determine the icon.)

[This post was edited on 2022-05-31 following an initial error]

Lathrisk commented 2 years ago

@kd-ods This does work if the additional data is valid json, specifically the comma at the end of "hasPublicListing": true, needs to be removed: "hasPublicListing": true

kd-ods commented 2 years ago

specifically the comma at the end of "hasPublicListing": true, needs to be removed: "hasPublicListing": true

Ah. Yes. That would help! Thanks, @Lathrisk. I've edited my initial post to take out my error and report the issue accurately.