Hi all,

I am monitoring a device every hour to check whether it is on or off, and if it is on, I set a value to 1 and if it is off, I set it to 0. I want to be able to plot this as a stacked column, plotting day 1 next to day 2 and so on. I have come up with a simple function that simulates a few days of data

Code:
Function gettable() As DataTable
        Dim table As New DataTable
        table.Columns.Add("Day1", GetType(Integer))
        table.Columns.Add("Day2", GetType(Integer))
        table.Columns.Add("Day3", GetType(Integer))
        table.Columns.Add("Day4", GetType(Integer))
        table.Columns.Add("Day5", GetType(Integer))
        table.Columns.Add("Day6", GetType(Integer))

        table.Rows.Add(0, 1, 1, 1, 0, 0)
        table.Rows.Add(1, 1, 1, 1, 0, 0)
        table.Rows.Add(1, 1, 1, 1, 0, 1)
        table.Rows.Add(1, 1, 1, 1, 0, 1)
        table.Rows.Add(1, 0, 1, 0, 1, 1)
        table.Rows.Add(1, 0, 0, 0, 1, 1)
        table.Rows.Add(1, 0, 0, 0, 1, 1)

        Debug.WriteLine("Rows: " & CStr(table.Rows.Count))


        Return table

    End Function
I can reorder this so it is orthogonal if required (i.e. swap days for hours), but from the function above, what I'd like to see in the first column is a red block at the bottom, with green to the top, in the 2nd, green up to about 1/2 and then red, and so on. I'm really struggling with this because I can't make sense of the graphing routines at all. If anyone has any idea how I could achieve this, that would be great.