All checks were successful
continuous-integration/drone/push Build is passing
37 lines
559 B
Vue
37 lines
559 B
Vue
<template>
|
|
<ChartView
|
|
v-if="config.type === 'chart'"
|
|
:data="[...data].reverse()"
|
|
:xaxis="config.x"
|
|
:yaxis="config.y"
|
|
/>
|
|
<TableView
|
|
v-else
|
|
:items="data"
|
|
:columns="config.columns"
|
|
/>
|
|
</template>
|
|
|
|
<script>
|
|
import ChartView from './ChartView.vue';
|
|
import TableView from './TableView.vue';
|
|
|
|
export default {
|
|
components: { ChartView, TableView },
|
|
props: {
|
|
config: {
|
|
type: Object,
|
|
required: true
|
|
},
|
|
data: {
|
|
type: Array,
|
|
required: true
|
|
}
|
|
}
|
|
};
|
|
</script>
|
|
|
|
<style>
|
|
|
|
</style>
|