Skip to content
Snippets Groups Projects
Commit 1615794d authored by Moustafa Banqusli's avatar Moustafa Banqusli
Browse files

#373 create v-card component to display each diagram

parent 1bd64173
No related branches found
No related tags found
2 merge requests!444Develop into Master,!352Resolve "3 Diagramme für Funde hinzufügen"
Pipeline #421620 failed
import {Component, Prop, Vue} from "vue-property-decorator";
import VegaLite from "vue-vega";
@Component({
components: {
VegaLite,
},
})
/** this component to put inspections & Observations diagrams in a card */
export default class FilterHistoryDiagramCard extends Vue {
@Prop({default: () => ""}) private title!: string;
@Prop({default: () => ""}) private errorMessage!: string;
@Prop({default: () => false }) private showFailAlert!: boolean;
@Prop({
default: () => {
return {};
},
}) private spec!: any;
}
<template>
<v-row>
<v-col cols="12">
<v-card>
<v-card-title>
{{ title }}
</v-card-title>
<v-divider></v-divider>
<v-card-text v-if="spec">
<vega-lite :spec="spec"/>
<div class="black--text text-center ml-4">
{{ $t("sharedTable.selectedAreaDiagram") }}
</div>
<v-container class="justify-center" fluid>
<v-alert v-show="showFailAlert" dismissible transition="fade-transition" type="error">
{{ errorMessage }}
</v-alert>
</v-container>
</v-card-text>
</v-card>
</v-col>
</v-row>
</template>
<script lang="ts" src="./FilterHistoryDiagramCard.ts">
</script>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment