UNPKG

@progress/kendo-vue-charts

Version:
146 lines (145 loc) 3.69 kB
/** * @license *------------------------------------------------------------------------------------------- * Copyright © 2025 Progress Software Corporation. All rights reserved. * Licensed under commercial license. See LICENSE.md in the package root for more information *------------------------------------------------------------------------------------------- */ import { defineComponent as C, createVNode as n } from "vue"; import { BaseChart as b } from "./BaseChart.mjs"; import { DonutCenter as g } from "./DonutCenter.mjs"; import { Chart as F } from "@progress/kendo-charts"; import { getDefaultSlots as D, templateRendering as k, getListeners as a, classNames as v, setRef as y, getRef as r } from "@progress/kendo-vue-common"; const A = /* @__PURE__ */ C({ name: "KendoChart", props: { donutCenterRender: [String, Function, Object], dir: String, renderAs: { type: String, default: void 0, validator: function(e) { return ["svg", "canvas"].includes(e); } }, pannable: { type: [Boolean, Object], default: void 0 }, zoomable: { type: [Boolean, Object], default: void 0 }, seriesColors: { type: Array, default: void 0 }, transitions: { type: Boolean, default: !0 }, paneDefaults: { type: Object, default: void 0 }, panes: { type: Array, default: void 0 }, seriesDefaults: { type: Object, default: void 0 }, axisDefaults: { type: Object, default: void 0 }, onAxislabelclick: Function, onDrag: Function, onDragend: Function, onDragstart: Function, onLegenditemhover: Function, onLegenditemclick: Function, onNoteclick: Function, onNotehover: Function, onPlotareaclick: Function, onPlotareahover: Function, onRender: Function, onSelect: Function, onSelectend: Function, onSelectstart: Function, onSeriesclick: Function, onSerieshover: Function, onZoom: Function, onZoomend: Function, onZoomstart: Function }, updated() { this.baseChart = r(this, "baseChart"); }, mounted() { this.baseChart = r(this, "baseChart"); }, methods: { chartInstance() { return this.baseChart !== null ? this.baseChart.chartInstance : null; }, surface() { return this.baseChart !== null ? this.baseChart.surface : null; }, element() { return this.baseChart !== null ? this.baseChart.element : null; }, getTarget() { return this; }, handleBaseChartEvents(e, t) { this.$emit(e, t); }, handleLegendItemClick(e) { this.$emit("legenditemclick", e); } }, render() { const e = D(this), { donutCenterRender: t, dir: s, renderAs: o, pannable: i, zoomable: l, seriesColors: u, transitions: c, paneDefaults: d, panes: h, seriesDefaults: f, axisDefaults: p } = this.$props, m = t ? k.call(this, t, a.call(this)) : null; return n(b, { dir: s, renderAs: o, pannable: i, zoomable: l, seriesColors: u, transitions: c, paneDefaults: d, panes: h, seriesDefaults: f, axisDefaults: p, ref: y(this, "baseChart"), chartConstructor: F, getTarget: this.getTarget, wrapper: "div", class: v("k-chart k-widget"), onLegenditemclick: this.handleLegendItemClick, onBasechartevent: this.handleBaseChartEvents, allListeners: a.call(this) }, { default: () => [e, n(g, { render: m }, null)] }); } }); export { A as Chart };