@progress/kendo-react-charts
Version:
React Chart renders a wide range of high-quality data visualizations. KendoReact Charts package
68 lines (67 loc) • 2.03 kB
JavaScript
/**
* @license
*-------------------------------------------------------------------------------------------
* Copyright © 2025 Progress Software Corporation. All rights reserved.
* Licensed under commercial license. See LICENSE.md in the package root for more information
*-------------------------------------------------------------------------------------------
*/
import * as s from "react";
import { BaseChart as i } from "./BaseChart.mjs";
import { StockChart as n } from "@progress/kendo-charts";
import { classNames as o } from "@progress/kendo-react-common";
const h = {
autoBindElements: !0,
liveDrag: !1,
partialRedraw: !0
};
class m extends s.Component {
constructor() {
super(...arguments), this._baseChart = null, this.deriveOptionsFromParent = (t) => {
const r = Object.assign({}, t.navigator || {}, h);
return Object.assign({}, t, { navigator: r });
}, this.onRefresh = (t, r, e) => {
this.props.partialRedraw ? (e.applyOptions(t), e.bindCategories(), e.navigator.redrawSlaves()) : e.setOptions(t, r);
}, this.getTarget = () => this;
}
/**
* @hidden
*/
get chartInstance() {
return this._baseChart !== null ? this._baseChart.chartInstance : null;
}
/**
* The Drawing `Surface` of the StockChart.
*/
get surface() {
return this._baseChart !== null ? this._baseChart.surface : null;
}
/**
* The DOM element of the StockChart.
*/
get element() {
return this._baseChart !== null ? this._baseChart.element : null;
}
/**
* @hidden
*/
render() {
const { children: t, className: r, ...e } = this.props;
return /* @__PURE__ */ s.createElement(
i,
{
...e,
ref: (a) => this._baseChart = a,
chartConstructor: n,
getTarget: this.getTarget,
wrapper: "div",
deriveOptionsFromParent: this.deriveOptionsFromParent,
onRefresh: this.onRefresh,
className: o("k-stockchart k-widget", r)
},
t
);
}
}
export {
m as StockChart
};