UNPKG

@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

69 lines (68 loc) 2.96 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 l from "react"; import { Chart as E, ChartTitle as y, ChartSubtitle as A, ChartArea as v, ChartCategoryAxis as k, ChartCategoryAxisItem as S, ChartValueAxis as I, ChartValueAxisItem as w, ChartSeries as R, ChartSeriesItem as V, ChartLegend as _ } from "@progress/kendo-react-charts"; const L = l.forwardRef((d, p) => { var r, a, n, i, c, m, s, b, f, g, C, h, u; const t = d.state; return /* @__PURE__ */ l.createElement(E, { style: { width: "100%", height: "100%" }, transitions: !1, ref: p }, /* @__PURE__ */ l.createElement(y, { text: (r = t.title) == null ? void 0 : r.text, font: (a = t.title) == null ? void 0 : a.font, color: ((n = t.title) == null ? void 0 : n.color) || "#000" }), /* @__PURE__ */ l.createElement( A, { text: (i = t.subtitle) == null ? void 0 : i.text, font: (c = t.subtitle) == null ? void 0 : c.font, color: ((m = t.subtitle) == null ? void 0 : m.color) || "#000" } ), /* @__PURE__ */ l.createElement(v, { background: (s = t.area) == null ? void 0 : s.background, margin: t.area.margin }), t.categoryAxis && /* @__PURE__ */ l.createElement(k, null, t.categoryAxis.map((e, o) => /* @__PURE__ */ l.createElement( S, { key: o, categories: e.categories, title: e.title && { text: e.title.text, font: e.title.font, color: e.title.color }, labels: e.labels && { font: e.labels.font, color: e.labels.color, rotation: e.labels.rotation }, reverse: e.reverse } ))), t.valueAxis && /* @__PURE__ */ l.createElement(I, null, t.valueAxis.map((e, o) => /* @__PURE__ */ l.createElement( w, { key: o, title: e.title && { text: e.title.text, font: e.title.font, color: e.title.color }, labels: e.labels && { format: e.labels.format, font: e.labels.font, color: e.labels.color, rotation: e.labels.rotation } } ))), /* @__PURE__ */ l.createElement(R, null, t.series.map((e, o) => /* @__PURE__ */ l.createElement(V, { key: String(e.name) + o, ...e }))), /* @__PURE__ */ l.createElement( _, { visible: (b = t.legend) == null ? void 0 : b.visible, position: (f = t.legend) == null ? void 0 : f.position, labels: { color: ((C = (g = t.legend) == null ? void 0 : g.labels) == null ? void 0 : C.color) || void 0, font: ((u = (h = t.legend) == null ? void 0 : h.labels) == null ? void 0 : u.font) || void 0 } } )); }); L.displayName = "ChartComponent"; export { L as ChartComponent };