@progress/kendo-react-charts
Version:
React Chart renders a wide range of high-quality data visualizations. KendoReact Charts package
9 lines (8 loc) • 1.86 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
*-------------------------------------------------------------------------------------------
*/
;Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("react"),o=require("./BaseChart.js"),l=require("@progress/kendo-charts"),u=require("@progress/kendo-react-common");function c(a){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(a){for(const t in a)if(t!=="default"){const r=Object.getOwnPropertyDescriptor(a,t);Object.defineProperty(e,t,r.get?r:{enumerable:!0,get:()=>a[t]})}}return e.default=a,Object.freeze(e)}const s=c(i),h={autoBindElements:!0,liveDrag:!1,partialRedraw:!0};class g extends s.Component{constructor(){super(...arguments),this._baseChart=null,this.deriveOptionsFromParent=e=>{const t=Object.assign({},e.navigator||{},h);return Object.assign({},e,{navigator:t})},this.onRefresh=(e,t,r)=>{this.props.partialRedraw?(r.applyOptions(e),r.bindCategories(),r.navigator.redrawSlaves()):r.setOptions(e,t)},this.getTarget=()=>this}get chartInstance(){return this._baseChart!==null?this._baseChart.chartInstance:null}get surface(){return this._baseChart!==null?this._baseChart.surface:null}get element(){return this._baseChart!==null?this._baseChart.element:null}render(){const{children:e,className:t,...r}=this.props;return s.createElement(o.BaseChart,{...r,ref:n=>this._baseChart=n,chartConstructor:l.StockChart,getTarget:this.getTarget,wrapper:"div",deriveOptionsFromParent:this.deriveOptionsFromParent,onRefresh:this.onRefresh,className:u.classNames("k-stockchart k-widget",t)},e)}}exports.StockChart=g;