Exemplo n.º 1
0
 /// <summary>
 /// Legend를 사용합니다.
 /// </summary>
 /// <param name="chart"></param>
 /// <param name="location"></param>
 /// <param name="visibleCheckBox"></param>
 public static void InitLegend(BTChart chart, LegendAlignments location, LegendStyles style, bool visibleCheckBox)
 {
     chart.Legend.Visible            = true;
     chart.Legend.Alignment          = location;
     chart.Legend.LegendStyle        = style;
     chart.Legend.TextStyle          = LegendTextStyles.Plain;
     chart.Legend.Font.Name          = "Tahoma";
     chart.Legend.Font.Size          = 7;
     chart.Legend.Symbol.Pen.Visible = false;
     chart.Legend.Symbol.Width       = 10;
     chart.Legend.Symbol.WidthUnits  = LegendSymbolSize.Pixels;
     chart.Legend.TopLeftPos         = 0;
     chart.Legend.CheckBoxes         = visibleCheckBox;
     chart.Legend.Shadow.Visible     = false;
     chart.Legend.Brush.Color        = chart.Panel.Color;
     chart.Legend.Pen.Visible        = false;
     chart.Legend.Font.Size          = 7;
 }
Exemplo n.º 2
0
        /// <summary>
        /// Devuelve las estructuras en un array {PointerStyles, LegendPosition}
        /// </summary>
        public static object ToArray(string nombreObjeto)
        {
            switch (nombreObjeto)
            {
            case "PointerStyles":

                PointerStyles[] pointerStyles    = new PointerStyles[16];
                int             posPointerStyles = 0;

                pointerStyles[posPointerStyles++] = PointerStyles.Arrow;
                pointerStyles[posPointerStyles++] = PointerStyles.Circle;
                pointerStyles[posPointerStyles++] = PointerStyles.Cross;
                pointerStyles[posPointerStyles++] = PointerStyles.DiagCross;
                pointerStyles[posPointerStyles++] = PointerStyles.Diamond;
                pointerStyles[posPointerStyles++] = PointerStyles.DownTriangle;
                pointerStyles[posPointerStyles++] = PointerStyles.Hexagon;
                pointerStyles[posPointerStyles++] = PointerStyles.LeftTriangle;
                pointerStyles[posPointerStyles++] = PointerStyles.Nothing;
                pointerStyles[posPointerStyles++] = PointerStyles.PolishedSphere;
                pointerStyles[posPointerStyles++] = PointerStyles.Rectangle;
                pointerStyles[posPointerStyles++] = PointerStyles.RightTriangle;
                pointerStyles[posPointerStyles++] = PointerStyles.SmallDot;
                pointerStyles[posPointerStyles++] = PointerStyles.Sphere;
                pointerStyles[posPointerStyles++] = PointerStyles.Star;
                pointerStyles[posPointerStyles++] = PointerStyles.Triangle;
                return(pointerStyles);

            case "LegendPosition":

                LegendAlignments[] legendAlignments = new LegendAlignments[4];
                int posLegendAlig = 0;

                legendAlignments[posLegendAlig++] = LegendAlignments.Left;
                legendAlignments[posLegendAlig++] = LegendAlignments.Right;
                legendAlignments[posLegendAlig++] = LegendAlignments.Top;
                legendAlignments[posLegendAlig++] = LegendAlignments.Bottom;
                return(legendAlignments);

            default:
                break;
            }

            return(null);
        }
Exemplo n.º 3
0
 public void LegendInitialize(Steema.TeeChart.TChart objChart, LegendStyles legendStyle,
                              LegendTextStyles legendTextStyle, bool VisibleCheckBox,
                              LegendAlignments legendAlignments, bool VisibleLegendPen)
 {
     objChart.Legend.Visible            = true;
     objChart.Legend.Alignment          = legendAlignments;
     objChart.Legend.LegendStyle        = legendStyle;
     objChart.Legend.TextStyle          = legendTextStyle;
     objChart.Legend.Font.Name          = "Arial";
     objChart.Legend.Font.Size          = 8;
     objChart.Legend.Symbol.Pen.Visible = false;
     objChart.Legend.Symbol.Width       = 10;
     objChart.Legend.Symbol.WidthUnits  = LegendSymbolSize.Pixels;
     objChart.Legend.TopLeftPos         = 0;
     objChart.Legend.CheckBoxes         = VisibleCheckBox;
     objChart.Legend.Shadow.Visible     = false;
     objChart.Legend.Brush.Color        = objChart.Panel.Color;
     objChart.Legend.Pen.Visible        = VisibleLegendPen;
     objChart.Legend.Pen.Color          = System.Drawing.Color.FromArgb(((System.Byte)(224)), ((System.Byte)(224)), ((System.Byte)(224)));
 }
Exemplo n.º 4
0
        internal static string TextForLegendAlignment(LegendAlignments legendAlignment)
        {
            string anchor;

            switch (legendAlignment)
            {
            case LegendAlignments.right:
                anchor = "east";
                break;

            case LegendAlignments.center:
                anchor = "center";
                break;

            default:
                anchor = "west";
                break;
            }
            return($"{{anchor={anchor}}}");
        }