UNPKG

@octavianlab/olab-ui

Version:
70 lines (69 loc) 1.43 kB
import { s as r } from "./vendor-55459b0e.js"; import { Chart as s, Colors as o } from "chart.js"; import { resolveComponent as n, openBlock as i, createBlock as p } from "vue"; import { _ as l } from "./obannerbrowsersupport-8a97766f.js"; s.register(o); const h = { name: "OChart", components: { PrimeChart: r }, props: { hasDataset: { type: Boolean, default: !1 }, type: String, data: Array, labels: Array, options: Object, height: { type: [String, Number], default: 150 } }, data() { return { loading: null }; }, computed: { dataSet() { return this.hasDataset ? { labels: this.labels, hoverOffset: 4, datasets: this.data } : { labels: this.labels, hoverOffset: 4, datasets: [ { data: this.data } ] }; }, optionsSet() { return this.options ? { ...this.options } : { plugins: { colors: { forceOverride: !0 } } }; } } }; function c(d, _, t, m, f, e) { const a = n("PrimeChart"); return i(), p(a, { type: t.type, data: e.dataSet, options: e.optionsSet, height: t.height }, null, 8, ["type", "data", "options", "height"]); } const O = /* @__PURE__ */ l(h, [["render", c], ["__scopeId", "data-v-e9171138"]]); export { O };