Merge branch 'v2-ui' of http://185.100.212.76:7776/Dwinzo-Beta/Dwinzo_dev into v2-ui
This commit is contained in:
commit
8d555278d2
|
@ -5,13 +5,7 @@ import ChartComponent from "./ChartComponent";
|
||||||
import { StockIncreseIcon } from "../../../../icons/RealTimeVisulationIcons";
|
import { StockIncreseIcon } from "../../../../icons/RealTimeVisulationIcons";
|
||||||
import { generateUniqueId } from "../../../../../functions/generateUniqueId";
|
import { generateUniqueId } from "../../../../../functions/generateUniqueId";
|
||||||
|
|
||||||
const chartTypes: ChartType[] = [
|
const chartTypes: ChartType[] = ["bar", "line", "pie", "doughnut", "polarArea"];
|
||||||
"bar",
|
|
||||||
"line",
|
|
||||||
"pie",
|
|
||||||
"doughnut",
|
|
||||||
"polarArea",
|
|
||||||
];
|
|
||||||
|
|
||||||
const sampleData = {
|
const sampleData = {
|
||||||
labels: ["January", "February", "March", "April", "May", "June", "July"],
|
labels: ["January", "February", "March", "April", "May", "June", "July"],
|
||||||
|
@ -37,17 +31,17 @@ const ChartWidget: React.FC<WidgetProps> = ({ type, index, title }) => {
|
||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
className={`chart chart-${index + 1}`}
|
className={`chart chart-${index + 1}`}
|
||||||
|
id={`${type}-widget`}
|
||||||
draggable
|
draggable
|
||||||
onDragStart={() => {
|
onDragStart={() => {
|
||||||
setDraggedAsset({
|
setDraggedAsset({
|
||||||
type,
|
type,
|
||||||
id: generateUniqueId(
|
id: generateUniqueId(),
|
||||||
),
|
|
||||||
title,
|
title,
|
||||||
panel: "top",
|
panel: "top",
|
||||||
Data: {
|
Data: {
|
||||||
measurements:{},
|
measurements: {},
|
||||||
duration:'1h'
|
duration: "1h",
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
}}
|
}}
|
||||||
|
@ -62,7 +56,7 @@ const ProgressBarWidget = ({
|
||||||
id,
|
id,
|
||||||
title,
|
title,
|
||||||
data,
|
data,
|
||||||
type
|
type,
|
||||||
}: {
|
}: {
|
||||||
id: string;
|
id: string;
|
||||||
title: string;
|
title: string;
|
||||||
|
@ -75,6 +69,7 @@ const ProgressBarWidget = ({
|
||||||
<div
|
<div
|
||||||
className="chart progressBar"
|
className="chart progressBar"
|
||||||
draggable
|
draggable
|
||||||
|
id={`${type}-widget`}
|
||||||
onDragStart={() => {
|
onDragStart={() => {
|
||||||
setDraggedAsset({
|
setDraggedAsset({
|
||||||
type: type,
|
type: type,
|
||||||
|
|
|
@ -56,7 +56,6 @@
|
||||||
.card {
|
.card {
|
||||||
background: var(--background-color);
|
background: var(--background-color);
|
||||||
backdrop-filter: blur(20px);
|
backdrop-filter: blur(20px);
|
||||||
|
|
||||||
width: 100px;
|
width: 100px;
|
||||||
height: 100px;
|
height: 100px;
|
||||||
margin: 10px;
|
margin: 10px;
|
||||||
|
@ -64,6 +63,7 @@
|
||||||
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
|
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
|
||||||
position: absolute;
|
position: absolute;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -227,13 +227,13 @@
|
||||||
z-index: 1;
|
z-index: 1;
|
||||||
|
|
||||||
&:nth-child(1) {
|
&:nth-child(1) {
|
||||||
left: 0;
|
left: -10px;
|
||||||
transform: scale(1);
|
transform: scale(0.8);
|
||||||
}
|
}
|
||||||
|
|
||||||
&:nth-child(2) {
|
&:nth-child(2) {
|
||||||
right: 0;
|
right: -10px;
|
||||||
transform: scale(1);
|
transform: scale(0.8);
|
||||||
}
|
}
|
||||||
|
|
||||||
&:nth-child(4) {
|
&:nth-child(4) {
|
||||||
|
|
Loading…
Reference in New Issue