-
Notifications
You must be signed in to change notification settings - Fork 0
/
Default.aspx.cs
136 lines (126 loc) · 2.6 KB
/
Default.aspx.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
using Newtonsoft.Json;
using Newtonsoft.Json.Serialization;
using System;
using System.Collections.Generic;
using System.Web.UI;
namespace WebFormsSample
{
public class CardData
{
public string Status { get; set; }
public int Value { get; set; }
public string Trend { get; set; }
public string Icon { get; set; }
}
public class ChartDataPoint
{
[JsonProperty("key")]
public string Key { get; set; }
[JsonProperty("value")]
public int Value { get; set; }
[JsonProperty("color")]
public string Color { get; set; }
}
public partial class _Default : Page
{
public IEnumerable<CardData> CardData { get; } = new List<CardData>
{
new CardData
{
Status = "Compliant",
Value = 14,
Trend = "+4",
Icon = "person-success"
},
new CardData
{
Status = "Non-Compliant",
Value = 23,
Trend = "-10",
Icon = "person-error",
},
new CardData
{
Status = "Needs to Order",
Value = 38,
Trend = " ",
Icon = "person-add"
},
new CardData
{
Status = "Vinh test",
Value = 39,
Trend = " ",
Icon = "person-add"
}
};
public IEnumerable<ChartDataPoint> DonutChartData { get; } = new List<ChartDataPoint>
{
new ChartDataPoint
{
Key = "In Progress",
Value = 80
},
new ChartDataPoint
{
Key = "Pending",
Value = 80
},
new ChartDataPoint
{
Key = "Needs to Order",
Value = 160
},
};
public string DonutChartJson
{
get
{
return JsonConvert.SerializeObject(this.DonutChartData, Formatting.None);
}
}
public IEnumerable<ChartDataPoint> BarChartData { get; } = new List<ChartDataPoint>
{
new ChartDataPoint
{
Key = "Needs Review",
Value = 12
},
new ChartDataPoint
{
Key = "Non-Compliant",
Value = 5
},
new ChartDataPoint
{
Key = "Compliant",
Value = 28
},
new ChartDataPoint
{
Key = "Needs to Order",
Value = 17
},
new ChartDataPoint
{
Key = "In Progress",
Value = 26
},
new ChartDataPoint
{
Key = "Pending",
Value = 3
},
};
public string BarChartJson
{
get
{
return JsonConvert.SerializeObject(this.BarChartData, Formatting.None);
}
}
protected void Page_Load(object sender, EventArgs e)
{
}
}
}