This commit is contained in:
Vishnu 2025-05-15 10:11:24 +05:30
commit 8d555278d2
2 changed files with 12 additions and 17 deletions

View File

@ -5,13 +5,7 @@ import ChartComponent from "./ChartComponent";
import { StockIncreseIcon } from "../../../../icons/RealTimeVisulationIcons";
import { generateUniqueId } from "../../../../../functions/generateUniqueId";
const chartTypes: ChartType[] = [
"bar",
"line",
"pie",
"doughnut",
"polarArea",
];
const chartTypes: ChartType[] = ["bar", "line", "pie", "doughnut", "polarArea"];
const sampleData = {
labels: ["January", "February", "March", "April", "May", "June", "July"],
@ -37,17 +31,17 @@ const ChartWidget: React.FC<WidgetProps> = ({ type, index, title }) => {
return (
<div
className={`chart chart-${index + 1}`}
id={`${type}-widget`}
draggable
onDragStart={() => {
setDraggedAsset({
type,
id: generateUniqueId(
),
id: generateUniqueId(),
title,
panel: "top",
Data: {
measurements:{},
duration:'1h'
measurements: {},
duration: "1h",
},
});
}}
@ -62,7 +56,7 @@ const ProgressBarWidget = ({
id,
title,
data,
type
type,
}: {
id: string;
title: string;
@ -75,6 +69,7 @@ const ProgressBarWidget = ({
<div
className="chart progressBar"
draggable
id={`${type}-widget`}
onDragStart={() => {
setDraggedAsset({
type: type,

View File

@ -56,7 +56,6 @@
.card {
background: var(--background-color);
backdrop-filter: blur(20px);
width: 100px;
height: 100px;
margin: 10px;
@ -64,6 +63,7 @@
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
position: absolute;
}
@ -227,13 +227,13 @@
z-index: 1;
&:nth-child(1) {
left: 0;
transform: scale(1);
left: -10px;
transform: scale(0.8);
}
&:nth-child(2) {
right: 0;
transform: scale(1);
right: -10px;
transform: scale(0.8);
}
&:nth-child(4) {