mirror of
https://github.com/SecurityBrewery/catalyst.git
synced 2025-12-11 09:42:47 +01:00
Release catalyst
This commit is contained in:
20
ui/src/components/charts/Bar.ts
Normal file
20
ui/src/components/charts/Bar.ts
Normal file
@@ -0,0 +1,20 @@
|
||||
import { Component, Mixins } from 'vue-property-decorator'
|
||||
import {HorizontalBar, mixins} from 'vue-chartjs';
|
||||
import ChartOptions from "chart.js";
|
||||
|
||||
@Component({
|
||||
extends: HorizontalBar,
|
||||
mixins: [mixins.reactiveProp],
|
||||
props: {
|
||||
chartOptions: {
|
||||
type: ChartOptions,
|
||||
default: null
|
||||
}
|
||||
},
|
||||
})
|
||||
export default class BarChart extends Mixins(mixins.reactiveProp, HorizontalBar) {
|
||||
mounted () {
|
||||
// @ts-expect-error chartOptions are not expected
|
||||
this.renderChart(this.chartData, this.chartOptions);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user