Android Example [B4X] AS Scheduler - MonthView HeatMap


1706016697704.png


Setup
-Set in the designer the "Calendar Function" to "HeatMap"
-Done

Customizing
You can set your own colors
B4X:
Dim HeatColor As List : HeatColor.Initialize
HeatColor.Add(ASSchedulerUtils.CreateASScheduler_HeatMapColor(xui.Color_ARGB(255,214, 230, 133),0,xui.Color_White))
HeatColor.Add(ASSchedulerUtils.CreateASScheduler_HeatMapColor(xui.Color_ARGB(255,140, 198, 101),2,xui.Color_White))
HeatColor.Add(ASSchedulerUtils.CreateASScheduler_HeatMapColor(xui.Color_ARGB(255,68, 163, 64),4,xui.Color_White))
HeatColor.Add(ASSchedulerUtils.CreateASScheduler_HeatMapColor(xui.Color_ARGB(255,30, 104, 35),7,xui.Color_White))
ASScheduler_MonthView1.HeatMapProperties.ColorCountList = HeatColor

Example Data
B4X:
    'HeatMap Example Data
    For i = 1 To 40 -1
        Dim p As Period
        p.Initialize
        p.Days = i
        Dim Date As Long = DateUtils.AddPeriod(DateTime.Now,p)
        For z = 1 To Rnd(2,12) -1
            ASScheduler_MonthView1.API.CreateAppointment(ASSchedulerUtils.CreateASScheduler_AppointmentRecurring(0,"Test1","Description",xui.Color_ARGB(255,73, 98, 164),False,Date,Date+DateTime.TicksPerHour,False,"day",7))
        Next
    Next

    ASScheduler_MonthView1.CreateScheduler
 

Attachments

  • AS Scheduler MonthView Heatmap Example.zip
    71.9 KB · Views: 220
Top