diff --git a/demos/xray_wip/demo.css b/demos/xray_wip/demo.css index 23cc8f9..6d7744e 100644 --- a/demos/xray_wip/demo.css +++ b/demos/xray_wip/demo.css @@ -2,6 +2,10 @@ @import url("https://code.highcharts.com/css/highcharts.css"); @import url("https://code.highcharts.com/dashboards/css/dashboards.css"); +#container { + height: 1000px; +} + body { font-family: "Helvetica Neue", Helvetica, "Segoe UI", Arial, sans-serif; } diff --git a/demos/xray_wip/demo.html b/demos/xray_wip/demo.html index 1a4444f..58b649f 100644 --- a/demos/xray_wip/demo.html +++ b/demos/xray_wip/demo.html @@ -18,7 +18,6 @@

Highcharts Dashboards + Morningstar Portfolio Risk Score

-
diff --git a/demos/xray_wip/demo.js b/demos/xray_wip/demo.js index 2ae5b72..a8b5f20 100644 --- a/demos/xray_wip/demo.js +++ b/demos/xray_wip/demo.js @@ -32,7 +32,7 @@ async function displaySecurityDetails (postmanJSON) { }, components: [ { - renderTo: 'dashboard-col-1', + renderTo: 'dashboard-col-0', connector: { id: 'xray' }, diff --git a/src/XRay/XRayConverter.ts b/src/XRay/XRayConverter.ts index cfe4194..7fc1d7f 100644 --- a/src/XRay/XRayConverter.ts +++ b/src/XRay/XRayConverter.ts @@ -142,11 +142,14 @@ export class XRayConverter extends MorningstarConverter { if (json.regionalExposure) { for (const exposure of json.regionalExposure) { - const rowId = `${benchmarkId}_RegionalExposure_${exposure.salePosition}`; + const columnName = `${benchmarkId}_RegionalExposure_${exposure.salePosition}`; + table.setColumn(columnName); const values = exposure.values; + const valueIndex = Object.keys(values); - for (let i = 1; i < 100; ++i) { - table.setCell(rowId, i - 1, values[i] || 0); + for (let i = 0; i < valueIndex.length; i++) { + table.setCell(`${benchmarkId}_Values`, i, valueIndex[i]); + table.setCell(columnName, i, values[parseInt(valueIndex[i])]); } } }