diff --git a/StorylinesSchema.json b/StorylinesSchema.json
index b1b4a37b..3e397bef 100644
--- a/StorylinesSchema.json
+++ b/StorylinesSchema.json
@@ -185,6 +185,10 @@
"title": {
"type": "string",
"description": "A title that is displayed centered above this map."
+ },
+ "caption": {
+ "type": "string",
+ "description": "Supporting text content for the map."
}
},
"required": ["config", "type"]
diff --git a/public/StorylinesSlideSchema.json b/public/StorylinesSlideSchema.json
index fa41ece8..384caad4 100644
--- a/public/StorylinesSlideSchema.json
+++ b/public/StorylinesSlideSchema.json
@@ -192,6 +192,10 @@
"type": "string",
"description": "A title that is displayed centered above this map."
},
+ "caption": {
+ "type": "string",
+ "description": "Supporting text content for the map."
+ },
"timeSlider": {
"type": "object",
"description": "Configuration for a time slider on the map.",
@@ -256,6 +260,10 @@
"customStyles": {
"type": "string",
"description": "Additional CSS styles to apply to the panel."
+ },
+ "caption": {
+ "type": "string",
+ "description": "Supporting text content for the chart."
}
},
"additionalProperties": false,
diff --git a/src/components/chart-editor.vue b/src/components/chart-editor.vue
index b748ae75..92b6f224 100644
--- a/src/components/chart-editor.vue
+++ b/src/components/chart-editor.vue
@@ -47,8 +47,10 @@
:configFileStructure="configFileStructure"
:sourceCounts="sourceCounts"
:lang="lang"
+ :index="index"
@edit="editChart"
@delete="$vfm.open(`${element.name}-${index}`)"
+ @captionEdit="onChartsEdited"
>
diff --git a/src/components/helpers/chart-preview.vue b/src/components/helpers/chart-preview.vue
index a9a36811..e26ea1cf 100644
--- a/src/components/helpers/chart-preview.vue
+++ b/src/components/helpers/chart-preview.vue
@@ -42,13 +42,32 @@
>
-
-
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/definitions.ts b/src/definitions.ts
index bc09e317..2b67efd4 100644
--- a/src/definitions.ts
+++ b/src/definitions.ts
@@ -183,6 +183,7 @@ export interface MapPanel extends BasePanel {
title: string;
scrollguard: boolean;
customStyles?: string;
+ caption?: string;
}
export interface TimeSliderConfig {
range: number[];
@@ -252,6 +253,7 @@ export interface ChartPanel extends BasePanel {
name?: string;
options?: DQVOptions;
customStyles?: string;
+ caption?: string;
}
export interface ChartConfig {
@@ -260,6 +262,7 @@ export interface ChartConfig {
config?: any;
name?: string;
options?: DQVOptions;
+ caption?: string;
}
export interface ImageFile {
diff --git a/src/lang/lang.csv b/src/lang/lang.csv
index d748cb97..db40f12d 100644
--- a/src/lang/lang.csv
+++ b/src/lang/lang.csv
@@ -122,6 +122,7 @@ editor.next,Next,1,Suivant,1
editor.preview,Preview,1,Afficher l’aperçu,1
editor.confirm,Confirm,1,Confirmer,1
editor.cancel,Cancel,1,Annuler,1
+editor.caption.placeholder,Add a caption,1,Ajouter une légende,0
editor.unsavedChanges,Unsaved changes,1,Modifications non enregistrées,1
editor.saveChanges,Save changes,1,Enregistrer les modifications,1
editor.discardChanges,Discard changes,1,Annuler les modifications,0