Skip to content

Instantly share code, notes, and snippets.

View Willy-Kimura's full-sized avatar
🎯
Building front-end experiences

Willy Kimura Willy-Kimura

🎯
Building front-end experiences
View GitHub Profile
@Willy-Kimura
Willy-Kimura / Timer.cs
Created November 21, 2017 11:26
Timer event for charts-generation.
private void Timer1_Tick(object sender, EventArgs e)
{
// Stop the Timer component after the first interval - 100 Milliseconds.
Timer1.Stop();
// Then Generate the charts with the method we created.
GenerateCharts();
}
@Willy-Kimura
Willy-Kimura / Timer.vb
Created November 21, 2017 11:22
Timer event for charts-generation.
Private Sub Timer1_Tick(sender As Object, e As EventArgs) Handles Timer1.Tick
' Stop the Timer component after the first interval - 100 Milliseconds.
Timer1.Stop()
' Then Generate the charts with the method we created.
GenerateCharts()
End Sub
@Willy-Kimura
Willy-Kimura / GenerateCharts.cs
Created November 21, 2017 10:17
Method for generating Dataviz charts.
private void GenerateCharts()
{
// Let's begin by generating a chart that consists of an Area chart and a Line chart.
// We need to create one canvas that will host the first two charts inside it, that is,
// the Area chart and Line chart.
Canvas multi_chart_canvas = new Canvas();
// Create a new datapoints-set for the first chart - Area chart.
@Willy-Kimura
Willy-Kimura / GenerateCharts.vb
Last active November 21, 2017 10:15
Method for generating Dataviz charts.
Private Sub GenerateCharts()
' Let's begin by generating a chart that consists of an Area chart and a Line chart.
' We need to create one canvas that will host the first two charts inside it, that is,
' the Area chart and Line chart.
Dim multi_chart_canvas As New Canvas
' Create a new datapoints-set for the first chart - Area chart.
Dim area_chart_datapoints As New DataPoint(BunifuDataViz._type.Bunifu_area)
@Willy-Kimura
Willy-Kimura / DashboardLoad.cs
Last active November 20, 2017 11:17
The Dashboard's form-loading event.
private void Dashboard_Load(object sender, EventArgs e)
{
// Add the TaskItems inside the panel control.
AddTasks();
// Let's now add a colorset for beautifying our charts.
BunifuDataViz1.colorSet.Add(Color.FromArgb(114, 203, 66));
BunifuDataViz1.colorSet.Add(Color.FromArgb(110, 89, 237));
@Willy-Kimura
Willy-Kimura / DashboardLoad.vb
Created November 20, 2017 11:14
The Dashboard's form-loading event.
Private Sub Dashboard_Load(sender As Object, e As EventArgs) Handles Me.Load
' Add the TaskItems inside the panel control.
AddTasks()
' Let's now add a colorset for beautifying our charts.
BunifuDataViz1.colorSet.Add(Color.FromArgb(114, 203, 66))
BunifuDataViz1.colorSet.Add(Color.FromArgb(110, 89, 237))
End Sub
@Willy-Kimura
Willy-Kimura / GenerateLineCharts.cs
Last active November 20, 2017 11:08
Method for Line charts generation.
public void GenerateLineCharts()
{
// Create a new canvas for rendering our chart.
Canvas line_chart_canvas = new Canvas();
// Create the first spline chart datapoints-set.
DataPoint line1_datapoints = new DataPoint(BunifuDataViz._type.Bunifu_line);
// Add all the datapoints for the first spline chart.
@Willy-Kimura
Willy-Kimura / GenerateLineCharts.vb
Last active November 20, 2017 11:07
Method for Line charts generation.
Sub GenerateLineCharts()
' Create a new canvas for rendering our chart.
Dim line_chart_canvas As New Canvas
' Create the first spline chart datapoints-set.
Dim line1_datapoints As New DataPoint(BunifuDataViz._type.Bunifu_line)
' Add all the datapoints for the first spline chart.
line1_datapoints.addLabely("1 Jul", "2800")
@Willy-Kimura
Willy-Kimura / AddTasks.cs
Last active November 17, 2017 14:21
This adds a list of TaskItems inside our task-list panel section.
// This adds a new TaskItem inside our task-list panel section.
public void AddTask(TaskItem.TaskLabels task_label, bool show_separator, string task_subject, string task_title, string task_subtitle)
{
// Create a new TaskItem and set the required parameters with the "Add" method.
TaskItem task_item = new TaskItem();
task_item.Add(task_label, show_separator, task_subject, task_title, task_subtitle);
// Then set the TaskItem's Dock property to "Top".
task_item.Dock = DockStyle.Top;
@Willy-Kimura
Willy-Kimura / AddTasks.vb
Last active November 17, 2017 14:11
This adds a list of TaskItems inside our task-list panel section.
' This adds a new TaskItem inside our task-list panel section.
Sub AddTask(ByVal task_label As TaskItem.TaskLabels, ByVal show_separator As Boolean, ByVal task_subject As String, ByVal task_title As String, ByVal task_subtitle As String)
' Create a new TaskItem and set the required parameters with the "Add" method.
Dim task_item As New TaskItem
task_item.Add(task_label, show_separator, task_subject, task_title, task_subtitle)
' Then set the TaskItem's Dock property to "Top".
task_item.Dock = DockStyle.Top