@trackunit/react-chart-components 1.6.66 → 1.6.68

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.cjs.js CHANGED
@@ -165,7 +165,7 @@ const cvaEChart = cssClassVarianceUtilities.cvaMerge(["w-full", "h-full"]);
165
165
  * The Chart component is a wrapper component for ECharts.
166
166
  * Handles events and click functionality.
167
167
  */
168
- const Chart = ({ options, showLoading, className, style, onChartReady, onClick, onEvents, merge = true, loadingOption, timezoneLabel, renderer = "canvas", dataTestId, }) => {
168
+ const Chart = ({ options, showLoading = false, className, style, onChartReady, onClick, onEvents, merge = true, loadingOption, timezoneLabel, renderer = "canvas", dataTestId, }) => {
169
169
  const containerStyle = {
170
170
  height: style?.height ?? "300px",
171
171
  width: style?.width ?? "100%",
@@ -284,7 +284,7 @@ const useLimitDataSet = (data, limit, autoSortData = true) => {
284
284
  * @param {DonutChartProps} props - The props for the Chart component
285
285
  * @returns {ReactElement} Chart component
286
286
  */
287
- const DonutChart = ({ data, size = "full", loading, onClick, className, dataTestId, legendPosition = "Right", maxDataPoints = 6, showOthers = true, unit, overrideTotal, autoSortData = true, hideLegendValues = false, }) => {
287
+ const DonutChart = ({ data, size = "full", loading = false, onClick, className, dataTestId, legendPosition = "Right", maxDataPoints = 6, showOthers = true, unit, overrideTotal, autoSortData = true, hideLegendValues = false, }) => {
288
288
  const containerRef = react.useRef(null);
289
289
  const chartRef = react.useRef(null);
290
290
  const totalValue = react.useMemo(() => overrideTotal ?? data?.map(item => item.value ?? 0).reduce((a, b) => a + b, 0) ?? 0, [data, overrideTotal]);
@@ -464,7 +464,7 @@ const cvaLegend = cssClassVarianceUtilities.cvaMerge(["flex", "overflow-auto"],
464
464
  * @param {BarChartProps} props - The props for the Chart component
465
465
  * @returns {ReactElement} Chart component
466
466
  */
467
- const BarChart = ({ series, loading, onClick, className, dataTestId, units, showDataZoom = false, }) => {
467
+ const BarChart = ({ series, loading = false, onClick, className, dataTestId, units, showDataZoom = false, }) => {
468
468
  const { formatDate } = reactDateAndTimeHooks.useDateAndTime();
469
469
  const { chartColor } = useChartColor();
470
470
  const seriesData = react.useMemo(() => {
package/index.esm.js CHANGED
@@ -144,7 +144,7 @@ const cvaEChart = cvaMerge(["w-full", "h-full"]);
144
144
  * The Chart component is a wrapper component for ECharts.
145
145
  * Handles events and click functionality.
146
146
  */
147
- const Chart = ({ options, showLoading, className, style, onChartReady, onClick, onEvents, merge = true, loadingOption, timezoneLabel, renderer = "canvas", dataTestId, }) => {
147
+ const Chart = ({ options, showLoading = false, className, style, onChartReady, onClick, onEvents, merge = true, loadingOption, timezoneLabel, renderer = "canvas", dataTestId, }) => {
148
148
  const containerStyle = {
149
149
  height: style?.height ?? "300px",
150
150
  width: style?.width ?? "100%",
@@ -263,7 +263,7 @@ const useLimitDataSet = (data, limit, autoSortData = true) => {
263
263
  * @param {DonutChartProps} props - The props for the Chart component
264
264
  * @returns {ReactElement} Chart component
265
265
  */
266
- const DonutChart = ({ data, size = "full", loading, onClick, className, dataTestId, legendPosition = "Right", maxDataPoints = 6, showOthers = true, unit, overrideTotal, autoSortData = true, hideLegendValues = false, }) => {
266
+ const DonutChart = ({ data, size = "full", loading = false, onClick, className, dataTestId, legendPosition = "Right", maxDataPoints = 6, showOthers = true, unit, overrideTotal, autoSortData = true, hideLegendValues = false, }) => {
267
267
  const containerRef = useRef(null);
268
268
  const chartRef = useRef(null);
269
269
  const totalValue = useMemo(() => overrideTotal ?? data?.map(item => item.value ?? 0).reduce((a, b) => a + b, 0) ?? 0, [data, overrideTotal]);
@@ -443,7 +443,7 @@ const cvaLegend = cvaMerge(["flex", "overflow-auto"], {
443
443
  * @param {BarChartProps} props - The props for the Chart component
444
444
  * @returns {ReactElement} Chart component
445
445
  */
446
- const BarChart = ({ series, loading, onClick, className, dataTestId, units, showDataZoom = false, }) => {
446
+ const BarChart = ({ series, loading = false, onClick, className, dataTestId, units, showDataZoom = false, }) => {
447
447
  const { formatDate } = useDateAndTime();
448
448
  const { chartColor } = useChartColor();
449
449
  const seriesData = useMemo(() => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trackunit/react-chart-components",
3
- "version": "1.6.66",
3
+ "version": "1.6.68",
4
4
  "repository": "https://github.com/Trackunit/manager",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "engines": {
@@ -9,13 +9,13 @@
9
9
  "dependencies": {
10
10
  "echarts": "5.6.0",
11
11
  "react": "19.0.0",
12
- "@trackunit/date-and-time-utils": "1.6.48",
13
- "@trackunit/react-date-and-time-hooks": "1.6.52",
14
- "@trackunit/ui-design-tokens": "1.6.50",
15
- "@trackunit/shared-utils": "1.8.48",
16
- "@trackunit/css-class-variance-utilities": "1.6.48",
17
- "@trackunit/react-components": "1.8.21",
18
- "@trackunit/react-test-setup": "1.3.48"
12
+ "@trackunit/date-and-time-utils": "1.6.50",
13
+ "@trackunit/react-date-and-time-hooks": "1.6.54",
14
+ "@trackunit/ui-design-tokens": "1.6.52",
15
+ "@trackunit/shared-utils": "1.8.50",
16
+ "@trackunit/css-class-variance-utilities": "1.6.50",
17
+ "@trackunit/react-components": "1.8.23",
18
+ "@trackunit/react-test-setup": "1.3.50"
19
19
  },
20
20
  "module": "./index.esm.js",
21
21
  "main": "./index.cjs.js",