@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
47 lines (46 loc) • 1.77 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 e from "react";
import { Reveal as l } from "@progress/kendo-react-animation";
import { useLocalization as d } from "@progress/kendo-react-intl";
import { ExpansionPanel as h, ExpansionPanelContent as C } from "@progress/kendo-react-layout";
import { mergeStates as u, createState as P } from "../../utils.mjs";
import { pieChart as x, messages as i, pieChartPie as f } from "../../messages.mjs";
import { SeriesTypesWrap as g } from "../SeriesTypesWrap.mjs";
import { SeriesTypeButton as S } from "../SeriesTypeButton.mjs";
import { chartPieIcon as E } from "@progress/kendo-svg-icons";
const R = (a) => {
const n = d(), t = a.state, o = t.seriesType, [r, s] = e.useState(!0), p = e.useCallback((c) => {
s(!c.expanded);
}, []), m = () => {
a.onStateChange(u(t, P(t.data, "pie")));
};
return /* @__PURE__ */ e.createElement(
h,
{
style: { maxWidth: "576px" },
title: n.toLanguageString(x, i.pieChart),
expanded: r,
tabIndex: 0,
onAction: p
},
/* @__PURE__ */ e.createElement(l, null, r && /* @__PURE__ */ e.createElement(C, null, /* @__PURE__ */ e.createElement(g, null, /* @__PURE__ */ e.createElement(
S,
{
selected: o === "pie",
onClick: m,
icon: E,
iconName: "chart-pie"
},
n.toLanguageString(f, i.pieChartPie)
))))
);
};
export {
R as PieChartPanel
};