Ejemplo n.º 1
0
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="l1">Vertical line to provide bounds for filled region</param>
 /// <param name="l2">The other Vertical line to provide bounds for filled region</param>
 public FilledRegion(VerticalLine l1, VerticalLine l2)
 {
     vl1_ = l1;
     vl2_ = l2;
 }
Ejemplo n.º 2
0
        public void CreatePlot(InteractivePlotSurface2D plotSurface)
        {
            plotSurface.Clear();

            FilledRegion fr = new FilledRegion(
                new VerticalLine(1.2),
                new VerticalLine(2.4));
            fr.Brush = Brushes.BlanchedAlmond;
            plotSurface.Add(fr);

            // note that arrays can be of any type you like.
            int[] opens = { 1, 2, 1, 2, 1, 3 };
            double[] closes = { 2, 2, 2, 1, 2, 1 };
            float[] lows = { 0, 1, 1, 1, 0, 0 };
            System.Int64[] highs = { 3, 2, 3, 3, 3, 4 };
            int[] times = { 0, 1, 2, 3, 4, 5 };

            CandlePlot cp = new CandlePlot();
            cp.CloseData = closes;
            cp.OpenData = opens;
            cp.LowData = lows;
            cp.HighData = highs;
            cp.AbscissaData = times;
            plotSurface.Add(cp);

            HorizontalLine line = new HorizontalLine(1.2);
            line.LengthScale = 0.89f;
            plotSurface.Add(line, -10);

            VerticalLine line2 = new VerticalLine(1.2);
            line2.LengthScale = 0.89f;
            plotSurface.Add(line2);

            plotSurface.AddInteraction(new PlotZoom());

            plotSurface.Title = "Line in the Title Number 1\nFollowed by another title line\n and another";
            plotSurface.Refresh();
        }
Ejemplo n.º 3
0
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="l1">Vertical line to provide bounds for filled region</param>
 /// <param name="l2">The other Vertical line to provide bounds for filled region</param>
 public FilledRegion(VerticalLine l1, VerticalLine l2)
 {
     vl1_ = l1;
     vl2_ = l2;
 }