3dWidget dnd and 2d widgets backend api updated

This commit is contained in:
2025-03-28 19:13:20 +05:30
parent f69b601785
commit c842b81611
26 changed files with 435 additions and 150 deletions

View File

@@ -3,6 +3,7 @@ import { useWidgetStore } from "../../../../../store/useWidgetStore";
import { ChartType } from "chart.js/auto";
import ChartComponent from "./ChartComponent";
import { StockIncreseIcon } from "../../../../icons/RealTimeVisulationIcons";
import { generateUniqueId } from "../../../../../functions/generateUniqueId";
const chartTypes: ChartType[] = [
"bar",
@@ -40,7 +41,8 @@ const ChartWidget: React.FC<WidgetProps> = ({ type, index, title }) => {
onDragStart={() => {
setDraggedAsset({
type,
id: `widget-${index + 1}`,
id: generateUniqueId(
),
title,
panel: "top",
data: sampleData,