3dWidget dnd and 2d widgets backend api updated
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user