Skip to content

Commit 6fe1c28

Browse files
committed
adding fix for browse/subject page
1 parent da1a448 commit 6fe1c28

3 files changed

Lines changed: 15 additions & 1 deletion

File tree

src/components/Ontologies/OntologySunburst.vue

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
<template>
2-
<highcharts v-if="!loadingData" :options="sunburstOptions" />
2+
<div class="highcharts-wrapper">
3+
<highcharts v-if="!loadingData" :options="sunburstOptions" />
4+
</div>
35
</template>
46

57
<script>
@@ -8,6 +10,7 @@ import { useTheme } from "vuetify";
810
import Highcharts from "highcharts";
911
import Sunburst from "highcharts/modules/sunburst";
1012
import Exporting from "highcharts/modules/exporting";
13+
import { defineAsyncComponent } from "vue"; //Implement Sunburst module for Highcharts
1114
1215
//Implement Sunburst module for Highcharts
1316
// check if Sunburst is a function, if not try .default
@@ -25,6 +28,14 @@ if (typeof Exporting === "function") {
2528
2629
export default {
2730
name: "OntologySunburst",
31+
components: {
32+
// Register highcharts asynchronously so it bypasses Server-Side Compilation checks safely
33+
highcharts: defineAsyncComponent(() =>
34+
import("highcharts-vue").then(
35+
(module) => module.Chart || module.default.Chart || module,
36+
),
37+
),
38+
},
2839
props: {
2940
itemClicked: { default: null, type: Object },
3041
},

src/pages/all/+description.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,8 @@ export default function description(pageContext) {
6060
"A registry of data preservation, management and sharing policies from international funding agencies, regulators, journals, and other organisations.",
6161
"/collections":
6262
'Collections group together one or more types of resource (standard, database or policy) by domain, project or organisation."',
63+
"/browse/subject":
64+
"Subject Browser helps you navigate the subjects hierarchy and find the standards, repositories, and policies relevant to you.",
6365
};
6466

6567
if (staticDescriptions[path]) {

src/pages/all/+title.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ export default function title(pageContext) {
4343
"/databases": "Databases | FAIRsharing",
4444
"/policies": "Policies | FAIRsharing",
4545
"/collections": "Collections | FAIRsharing",
46+
"/browse/subject": "Subject Browser| FAIRsharing",
4647
};
4748

4849
if (staticTitles[path]) {

0 commit comments

Comments
 (0)