Commit b583750a by Ooh-Ao

style widjet

parent 3dc52f00
......@@ -33,7 +33,7 @@ export class LayoutWidjetSettingComponent implements OnInit {
saveLayout() {
let body = {
appId: 0,
appId: this.widgetListConfig.length + 1,
appName: this.appName,
widjet: this.widgetListConfig
}
......
<div class="row">
<app-services [id]="item.id" *ngFor="let item of widgetList" class="col-{{item.width}} p-1"></app-services>
<div class="row" style="background-color:transparent;">
<app-services [id]="item.id" *ngFor="let item of widgetList" class="col-{{item.width}}"
style="margin-top: 5px;"></app-services>
</div>
......@@ -318,6 +318,439 @@ export class WidjetService {
"tag": ""
}
]
}, {
"appId": 7,
"appName": "test",
"widjet": [
{
"id": 0,
"title": "11111",
"description": "111",
"dataModel": {
"xAxis": {
"type": "category",
"data": [
"Mon",
"Tue",
"Wed",
"Thu",
"Fri",
"Sat",
"Sun"
]
},
"yAxis": {
"type": "value"
},
"series": [
{
"data": [
820,
932,
901,
934,
1290,
1330,
1320
],
"type": "line"
}
]
},
"dataSoure": "sss",
"api": "",
"width": 6,
"heigth": "",
"tag": ""
},
{
"id": 1,
"title": "222",
"description": "222",
"dataModel": {
"legend": {},
"tooltip": {},
"dataset": {
"source": [
[
"product",
"2012",
"2013",
"2014",
"2015",
"2016",
"2017"
],
[
"Milk Tea",
86.5,
92.1,
85.7,
83.1,
73.4,
55.1
],
[
"Matcha Latte",
41.1,
30.4,
65.1,
53.3,
83.8,
98.7
],
[
"Cheese Cocoa",
24.1,
67.2,
79.5,
86.4,
65.2,
82.5
],
[
"Walnut Brownie",
55.2,
67.1,
69.2,
72.4,
53.9,
39.1
]
]
},
"series": [
{
"type": "pie",
"radius": "20%",
"center": [
"25%",
"30%"
]
},
{
"type": "pie",
"radius": "20%",
"center": [
"75%",
"30%"
],
"encode": {
"itemName": "product",
"value": "2013"
}
},
{
"type": "pie",
"radius": "20%",
"center": [
"25%",
"75%"
],
"encode": {
"itemName": "product",
"value": "2014"
}
},
{
"type": "pie",
"radius": "20%",
"center": [
"75%",
"75%"
],
"encode": {
"itemName": "product",
"value": "2015"
}
}
]
},
"dataSoure": "sss",
"api": "",
"width": 6,
"heigth": "",
"tag": ""
},
{
"id": 3,
"title": "4444",
"description": "4444",
"dataModel": {
"legend": {},
"tooltip": {},
"dataset": {
"dimensions": [
"product",
"2015",
"2016",
"2017"
],
"source": [
{
"2015": 43.3,
"2016": 85.8,
"2017": 93.7,
"product": "Matcha Latte"
},
{
"2015": 83.1,
"2016": 73.4,
"2017": 55.1,
"product": "Milk Tea"
},
{
"2015": 86.4,
"2016": 65.2,
"2017": 82.5,
"product": "Cheese Cocoa"
},
{
"2015": 72.4,
"2016": 53.9,
"2017": 39.1,
"product": "Walnut Brownie"
}
]
},
"xAxis": {
"type": "category"
},
"yAxis": {},
"series": [
{
"type": "bar"
},
{
"type": "bar"
},
{
"type": "bar"
}
]
},
"dataSoure": "2312",
"api": "https://hrplus.myhr.co.th/hr/taapi/leave/statistic?yearId=2024",
"width": 3,
"heigth": "",
"tag": ""
},
{
"id": 3,
"title": "4444",
"description": "4444",
"dataModel": "4444",
"dataSoure": "2312",
"api": "https://hrplus.myhr.co.th/hr/taapi/leave/statistic?yearId=2024",
"width": 3,
"heigth": "",
"tag": ""
},
{
"id": 0,
"title": "11111",
"description": "111",
"dataModel": {
"xAxis": {
"type": "category",
"data": [
"Mon",
"Tue",
"Wed",
"Thu",
"Fri",
"Sat",
"Sun"
]
},
"yAxis": {
"type": "value"
},
"series": [
{
"data": [
820,
932,
901,
934,
1290,
1330,
1320
],
"type": "line"
}
]
},
"dataSoure": "sss",
"api": "",
"width": 6,
"heigth": "",
"tag": ""
},
{
"id": 0,
"title": "11111",
"description": "111",
"dataModel": {
"xAxis": {
"type": "category",
"data": [
"Mon",
"Tue",
"Wed",
"Thu",
"Fri",
"Sat",
"Sun"
]
},
"yAxis": {
"type": "value"
},
"series": [
{
"data": [
820,
932,
901,
934,
1290,
1330,
1320
],
"type": "line"
}
]
},
"dataSoure": "sss",
"api": "",
"width": 6,
"heigth": "",
"tag": ""
},
{
"id": 0,
"title": "11111",
"description": "111",
"dataModel": {
"xAxis": {
"type": "category",
"data": [
"Mon",
"Tue",
"Wed",
"Thu",
"Fri",
"Sat",
"Sun"
]
},
"yAxis": {
"type": "value"
},
"series": [
{
"data": [
820,
932,
901,
934,
1290,
1330,
1320
],
"type": "line"
}
]
},
"dataSoure": "sss",
"api": "",
"width": 6,
"heigth": "",
"tag": ""
},{
"id": 0,
"title": "11111",
"description": "111",
"dataModel": {
"xAxis": {
"type": "category",
"data": [
"Mon",
"Tue",
"Wed",
"Thu",
"Fri",
"Sat",
"Sun"
]
},
"yAxis": {
"type": "value"
},
"series": [
{
"data": [
820,
932,
901,
934,
1290,
1330,
1320
],
"type": "line"
}
]
},
"dataSoure": "sss",
"api": "",
"width": 6,
"heigth": "",
"tag": ""
},
{
"id": 0,
"title": "11111",
"description": "111",
"dataModel": {
"xAxis": {
"type": "category",
"data": [
"Mon",
"Tue",
"Wed",
"Thu",
"Fri",
"Sat",
"Sun"
]
},
"yAxis": {
"type": "value"
},
"series": [
{
"data": [
820,
932,
901,
934,
1290,
1330,
1320
],
"type": "line"
}
]
},
"dataSoure": "sss",
"api": "",
"width": 6,
"heigth": "",
"tag": ""
}
]
}];
widjetList: Service[] = [{
......
......@@ -7,7 +7,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="icon" type="image/x-icon" href="favicon.ico">
</head>
<body>
<body style="background-color: transparent;">
<app-root></app-root>
</body>
</html>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment