예제 #1
0
            protected override void DrawBarLine(GraphView graph, Point start, Point end, Bar beingDrawn)
            {
                base.DrawBarLine(graph, start, end, beingDrawn);

                BarScreenStarts.Add(start);
                BarScreenEnds.Add(end);
            }
예제 #2
0
            protected override void DrawBarLine(GraphView graph, Terminal.Gui.Point start, Terminal.Gui.Point end, Bar beingDrawn)
            {
                var driver = Application.Driver;

                int x = start.X;

                for (int y = end.Y; y <= start.Y; y++)
                {
                    var height = graph.ScreenToGraphSpace(x, y).Y;

                    if (height >= 85)
                    {
                        driver.SetAttribute(red);
                    }
                    else
                    if (height >= 66)
                    {
                        driver.SetAttribute(brightred);
                    }
                    else
                    if (height >= 45)
                    {
                        driver.SetAttribute(brightyellow);
                    }
                    else
                    if (height >= 25)
                    {
                        driver.SetAttribute(brightgreen);
                    }
                    else
                    {
                        driver.SetAttribute(green);
                    }

                    graph.AddRune(x, y, beingDrawn.Fill.Rune);
                }
            }