forked from KimTooFlex/Social-APP-Dark-UI
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tabDashboard.cs
91 lines (76 loc) · 2.65 KB
/
tabDashboard.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
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using Bunifu.DataViz.WinForms;
namespace SOCIAL_APP_BUNIFU_FRAMEWORK_DEMO
{
public partial class tabDashboard : UserControl
{
public tabDashboard()
{
if(Program.IsInDesignMode())
{
return;
}
InitializeComponent();
//theme the charts (Collor pallete)
bunifuDataViz1.colorSet.Add(Color.FromArgb(219, 58, 108));
bunifuDataViz1.colorSet.Add(Color.FromArgb(97, 49, 137));
}
private void chartDelay_Tick(object sender, EventArgs e)
{
//delay for our charts to render.
chartDelay.Stop();
renderCharts();
}
private void renderCharts()
{
//lets get a canvas to paint graphs on
Canvas Charts = new Canvas();
//graph 1 dataPoint
DataPoint graph1 = new DataPoint(BunifuDataViz._type.Bunifu_spline);
//graph 2 datapoint
DataPoint graph2 = new DataPoint(BunifuDataViz._type.Bunifu_column);
//sample data for datapoint 1
graph1.addLabely("SUN", 1500);
graph1.addLabely("MON", 1700);
graph1.addLabely("TUE", 2300);
graph1.addLabely("WED", 1700);
graph1.addLabely("THU", 1900);
graph1.addLabely("FRI", 1600);
graph1.addLabely("SAT", 1800);
//sample data for datapoint 2
graph2.addLabely("SUN", 1000);
graph2.addLabely("MON", 1200);
graph2.addLabely("TUE", 2000);
graph2.addLabely("WED", 1400);
graph2.addLabely("THU", 1500);
graph2.addLabely("FRI", 1100);
graph2.addLabely("SAT", 1200);
//add datapoints to one canvas
Charts.addData(graph1);
Charts.addData(graph2);
//render canvas through bunifu dataviz component.
bunifuDataViz1.Render(Charts);
}
private void progressBarUpdate_Tick(object sender, EventArgs e)
{
Random r = new Random();
bunifuProgressBar1.Value = r.Next(0, 100);
bunifuProgressBar2.Value = r.Next(bunifuProgressBar1.Value, 100);
bunifuCircleProgressbar1.Value = bunifuProgressBar1.Value;
}
private void label5_Click(object sender, EventArgs e)
{
}
private void label4_Click(object sender, EventArgs e)
{
}
}
}