@progress/kendo-react-chart-wizard
Version:
React Chart Wizard lets you create a chart using data from a Grid, another data-bound component, or an external source
9 lines (8 loc) • 3.06 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 f=require("react"),r=require("@progress/kendo-charts"),i=require("@progress/kendo-react-charts"),c=require("@progress/kendo-drawing"),p=require("@progress/kendo-file-saver");function g(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const a in t)if(a!=="default"){const o=Object.getOwnPropertyDescriptor(t,a);Object.defineProperty(e,a,o.get?o:{enumerable:!0,get:()=>t[a]})}}return e.default=t,Object.freeze(e)}const u=g(f),h=t=>{t.stopPropagation()},n={fileName:"chart",pdf:{paperSize:"A4",margin:"1cm"},image:{width:800,height:600}},C=(t={})=>({fileName:t.fileName||n.fileName,pdf:{...n.pdf,...t.pdf},image:{...n.image,...t.image}}),x=t=>{const e=i.exportVisual(t.chart),a=t.exportOptions;e&&c.exportPDF(e,a.pdf).then(o=>p.saveAs(o,a.fileName+".pdf"))},S=t=>{const e=i.exportVisual(t.chart),a=t.exportOptions;e&&c.exportSVG(e).then(o=>p.saveAs(o,a.fileName+".svg"))},k=t=>{const e=t.exportOptions,a=i.exportVisual(t.chart,e.image);a&&c.exportImage(a,e.image).then(o=>p.saveAs(o,e.fileName+".png"))},y={value:null,text:""},N=(t,e)=>e.dataItem.style?u.cloneElement(t,t.props,u.createElement("span",{style:e.dataItem.style},t.props.children)):t,v=/^\d+$/,E=t=>{if(t.text==="")return!0;if(t.value===void 0){if(!v.test(t.text))return!1;t.value=t.text+"px"}return s.find(a=>a.value===t.value)||(s.push(t),s.sort((a,o)=>parseInt(a.text,10)-parseInt(o.text,10))),!0},I={fillMode:"outline",popupSettings:{animate:!1}},W={type:"normal"},z={type:"100%"},V=t=>{var l,m;const e=typeof((l=t.series[0])==null?void 0:l.stack)=="object"?(m=t.series[0])==null?void 0:m.stack:!1,a=e===!1,o=e&&e.type==="normal",d=e&&e.type==="100%";return{isStackFalse:a,isStackNormal:o,isStack100:d}},s=r.ChartWizardCommon.fontSizes,b=r.ChartWizardCommon.fontNames,D=r.ChartWizardCommon.createInitialState,F=(t,e)=>r.ChartWizardCommon.createState(t,e),O=r.ChartWizardCommon.updateState,P=r.ChartWizardCommon.mergeStates,R=r.ChartWizardCommon.isCategorical,w=r.ChartWizardCommon.parseFont,A=r.ChartWizardCommon.ActionTypes,{getWizardDataFromDataRows:j}=r.ChartWizardCommon;exports.ActionTypes=A;exports.createInitialState=D;exports.createState=F;exports.dropdownlistCommonProps=I;exports.ensureValue=E;exports.fontNames=b;exports.fontSizes=s;exports.getWizardDataFromDataRows=j;exports.handleImageExport=k;exports.handlePDFExport=x;exports.handleSVGExport=S;exports.isCategorical=R;exports.itemRender=N;exports.mergeStates=P;exports.nullItem=y;exports.parseFont=w;exports.resolveExportOptions=C;exports.stack100=z;exports.stackNormal=W;exports.stackState=V;exports.stopPropagation=h;exports.updateState=O;