private void pieChartControl_CustomDrawSeriesPoint(object sender, CustomDrawSeriesPointEventArgs e)
        {
            //try
            //{
            //    Pie3DDrawOptions options = (Pie3DDrawOptions)e.SeriesDrawOptions;
            //    string NAME = e.SeriesPoint.Argument;
            //    string NM = Convert.ToString(allLegend[0]);
            //    if (e.SeriesPoint.Argument == Convert.ToString(allLegend[0]))
            //    {
            //        options.Color = Color.Red;
            //    }
            //    else if (e.SeriesPoint.Argument == Convert.ToString(allLegend[1]))
            //    {
            //        options.Color = Color.Yellow;
            //    }
            //    else if (e.SeriesPoint.Argument == Convert.ToString(allLegend[2]))
            //    {
            //        options.Color = Color.Green;
            //    }
            //}
            //catch
            //{

            //}
        }
Exemplo n.º 2
0
        private void barChart_CustomDrawSeriesPoint(object sender, CustomDrawSeriesPointEventArgs e)
        {
            BarDrawOptions barOptions = e.SeriesDrawOptions as BarDrawOptions;
            int            colorIndex = (int)e.SeriesPoint.Tag;

            barOptions.Color = paletteEntries[colorIndex].Color;
        }
Exemplo n.º 3
0
 void ChartCustomDrawSeriesPoint(object sender, CustomDrawSeriesPointEventArgs e)
 {
     if (skipEmptyPoints && e.SeriesPoint.Value == 0)
     {
         e.LabelText = string.Empty;
     }
 }
        void chart_CustomDrawSeriesPoint(object sender, CustomDrawSeriesPointEventArgs e)
        {
            try
            {
                var Ldraw = e.LegendDrawOptions as Pie3DDrawOptions;
                Ldraw.FillStyle.FillMode = FillMode3D.Solid;

                switch (e.SeriesPoint.Argument.ToString())
                {
                case "High Value":
                {
                    e.SeriesDrawOptions.Color = Color.Red;
                    Ldraw.Color = Color.Red;
                    break;
                }

                case "Low Value":
                {
                    e.SeriesDrawOptions.Color = Color.Yellow;
                    Ldraw.Color = Color.Yellow;
                    break;
                }

                case "Normal Value":
                {
                    e.SeriesDrawOptions.Color = Color.Green;
                    Ldraw.Color = Color.Green;
                    break;
                }
                }
            }
            catch { }
        }
Exemplo n.º 5
0
        private void chart_CustomDrawSeriesPoint(object sender, CustomDrawSeriesPointEventArgs e)
        {
            var value = e.SeriesPoint.Values;

            var pointtimer = DateTime.Parse(e.SeriesPoint.ArgumentSerializable).ToString("yyyy-MM-dd HH:mm:ss");

            var pointvalue = dt_line.Select(string.Format("Timer= '" + pointtimer + "'"));

            if (pointvalue.Length > 0)
            {
                if (threshold.Count > 5)
                {
                    if ((threshold[1] != (float)0 && value[0] >= threshold[1]) ||
                        (threshold[5] != (float)0 && value[0] <= threshold[5]))
                    {
                        if (chartSetting.Select("strKey='Chart_BJColor'").Length > 0)
                        {
                            Color bjColor = Color.FromArgb(int.Parse(chartSetting.Select("strKey='Chart_BJColor'")[0]["strValue"].ToString()));
                            e.SeriesDrawOptions.Color = bjColor;
                        }
                        else
                        {
                            e.SeriesDrawOptions.Color = Color.Red;
                        }
                    }
                }
            }
        }
Exemplo n.º 6
0
        public static void CustomDrawSeriesPointLegendMarker(object sender, CustomDrawSeriesPointEventArgs e)
        {
            Bitmap markerBitmap = CreateLegendMarker(e.LegendMarkerSize, e.LegendDrawOptions.Color);

            e.LegendMarkerImage        = markerBitmap;
            e.DisposeLegendMarkerImage = true;
        }
        void CustomDrawSeriesPoint(object sender, CustomDrawSeriesPointEventArgs e)
        {
            var d = e.SeriesPoint.Values[0];

            if (d >= (int)DiscountLevelCalculator.CustomerDiscountLevel[(int)DiscountLevel.Prodigious])
            {
                SetColor(e, DiscountLevel.Prodigious);
            }
            else if (d >= (int)DiscountLevelCalculator.CustomerDiscountLevel[(int)DiscountLevel.Active])
            {
                SetColor(e, DiscountLevel.Active);
            }
            else if (d >= (int)DiscountLevelCalculator.CustomerDiscountLevel[(int)DiscountLevel.Occasional])
            {
                SetColor(e, DiscountLevel.Occasional);
            }
            else if (d >= (int)DiscountLevelCalculator.CustomerDiscountLevel[(int)DiscountLevel.Basic])
            {
                SetColor(e, DiscountLevel.Basic);
            }
            else
            {
                SetColor(e, DiscountLevel.FirstTime);
            }
            ((BarDrawOptions)e.SeriesDrawOptions).FillStyle.FillMode = FillMode.Solid;
        }
Exemplo n.º 8
0
 void chartControl1_CustomDrawSeriesPoint(object sender, CustomDrawSeriesPointEventArgs e)
 {
     if (!Object.Equals(e.SeriesPoint, m_HotTrackedPoint))
     {
         e.LabelText = "";
     }
 }
Exemplo n.º 9
0
 private void OnCustomDrawSeriesPoint(object sender, CustomDrawSeriesPointEventArgs e)
 {
     if (e.SeriesPoint.Values[0] < 1)
     {
         e.LabelText = String.Empty;
     }
 }
Exemplo n.º 10
0
        protected void StatusWebChart_CustomDrawSeriesPoint(object sender, CustomDrawSeriesPointEventArgs e)
        {
            Pie3DDrawOptions drawOptions   = e.SeriesDrawOptions as Pie3DDrawOptions;
            Pie3DDrawOptions legendOptions = e.LegendDrawOptions as Pie3DDrawOptions;

            drawOptions.FillStyle.FillMode   = FillMode3D.Solid;
            legendOptions.FillStyle.FillMode = FillMode3D.Solid;
            if (e.SeriesPoint.Argument == "OK")
            {
                drawOptions.Color   = System.Drawing.Color.FromArgb(0, 128, 0);
                legendOptions.Color = System.Drawing.Color.FromArgb(0, 128, 0);
            }
            else if (e.SeriesPoint.Argument == "Issue")
            {
                drawOptions.Color   = System.Drawing.Color.FromArgb(242, 242, 0);
                legendOptions.Color = System.Drawing.Color.FromArgb(242, 242, 0);
            }
            else if (e.SeriesPoint.Argument == "Not Responding")
            {
                drawOptions.Color   = System.Drawing.Color.FromArgb(253, 0, 0);
                legendOptions.Color = System.Drawing.Color.FromArgb(253, 0, 0);
            }
            else if (e.SeriesPoint.Argument == "Maintenance")
            {
                drawOptions.Color   = System.Drawing.Color.FromArgb(80, 80, 80);
                legendOptions.Color = System.Drawing.Color.FromArgb(80, 80, 80);
            }
            else if (e.SeriesPoint.Argument == "Scanning")
            {
                drawOptions.Color   = System.Drawing.Color.FromArgb(144, 238, 144);
                legendOptions.Color = System.Drawing.Color.FromArgb(144, 238, 144);
            }
        }
Exemplo n.º 11
0
 private void OnCustomDrawRatiosPoints(object sender, CustomDrawSeriesPointEventArgs e)
 {
     if (!DateTime.TryParseExact(e.SeriesPoint.Argument, "yyyy-MM", CultureInfo.InvariantCulture, DateTimeStyles.None, out _))
     {
         e.DrawOptions.Color = Colors.DarkGoldenrod;
     }
 }
        private void OnCustomDrawSeriesPoint(object sender, CustomDrawSeriesPointEventArgs e)
        {
            // Design a series marker image.
            Bitmap image      = new Bitmap(totalWidth, totalHeight);
            bool   isSelected = trackedPointArgument != null && e.SeriesPoint.Argument.Equals(trackedPointArgument);

            using (Graphics graphics = Graphics.FromImage(image)) {
                using (var fillBrush = isSelected ? (Brush) new HatchBrush(HatchStyle.DarkDownwardDiagonal,
                                                                           e.LegendDrawOptions.Color,
                                                                           e.LegendDrawOptions.ActualColor2)
                                                  : (Brush) new SolidBrush(e.LegendDrawOptions.Color)) {
                    graphics.FillRectangle(fillBrush, totalRect);
                }
                Image photo;
                if (photoCache.TryGetValue(e.SeriesPoint.Argument, out photo))
                {
                    graphics.DrawImage(photo, photoRect);
                }
            }

            e.LegendMarkerImage        = image;
            e.DisposeLegendMarkerImage = true;

            PieDrawOptions options = e.SeriesDrawOptions as PieDrawOptions;

            if (isSelected && options != null)
            {
                options.FillStyle.FillMode = DevExpress.XtraCharts.FillMode.Hatch;
                ((HatchFillOptions)options.FillStyle.Options).HatchStyle = HatchStyle.DarkDownwardDiagonal;
            }
        }
Exemplo n.º 13
0
        //protected void Lineplot_TransparentBar(object sender, CustomDrawSeriesPointEventArgs e)
        //{

        //	(e.SeriesDrawOptions as BarDrawOptions).Color =
        //	e.SeriesDrawOptions.Color = Color.FromArgb(80, e.SeriesDrawOptions.Color);
        //	(e.SeriesDrawOptions as BarDrawOptions).FillStyle.FillMode = FillMode.Solid;
        //}


        protected void Lineplot_TransparentPoint(object sender, CustomDrawSeriesPointEventArgs e)
        {
            var t = e.Series.View;

            if (t.ToString() != "Bar")
            {
                (e.SeriesDrawOptions as PointDrawOptions).Color =
                    e.SeriesDrawOptions.Color = Color.FromArgb(80, e.SeriesDrawOptions.Color);
                (e.SeriesDrawOptions as PointDrawOptions).Marker.FillStyle.FillMode = FillMode.Solid;

                (e.SeriesDrawOptions as PointDrawOptions).Marker.BorderVisible = false;
            }

            //e.SeriesDrawOptions.Color = Color.FromArgb(50, Color.Yellow);


            //(e.SeriesDrawOptions as PointDrawOptions).Color =
            //	e.SeriesDrawOptions.Color = Color.FromArgb(50, e.SeriesDrawOptions.Color);

            //(e.SeriesDrawOptions as BarDrawOptions).FillStyle.FillMode = FillMode.Solid;
            //e.SeriesDrawOptions.Color = Color.FromArgb(50, e.SeriesDrawOptions.Color);



            //from https://www.devexpress.com/Support/Center/Question/Details/Q102193/how-to-show-custom-data-in-the-chart-tooltip
            //var dataPoint = (e.SeriesPoint.Tag);
            ////The trick is to hide adittional info by html tags
            ////e.SeriesPoint.ToolTipHint = e.SeriesPoint.ToolTipHint + "<FONT SIZE=\"1\" COLOR=\"#FFFFFF\">~" + dataPoint + "~</FONT>";
            ////e.SeriesPoint.ToolTipHint = e.SeriesPoint.ToolTipHint + " BONUS ID: " + dataPoint + "";
            //e.LabelText = dataPoint.ToString();
        }
Exemplo n.º 14
0
        private void chartControl1_CustomDrawSeriesPoint(object sender, CustomDrawSeriesPointEventArgs e)
        {
            string argument   = e.SeriesPoint.Argument;
            var    pointValue = e.SeriesPoint.Values[0];

            // You can get the argument text using e.SeriesPoint.Argument
            // Set the label text of your point
            if (argument == "Hình chưa nhập")
            {
                e.LabelText = "Hình chưa nhập: " + pointValue + " hình";
            }
            else if (argument == "Hình đang nhập")
            {
                e.LabelText = "Hình đang nhập: " + pointValue + " hình";
            }
            else if (argument == "Hình chờ check")
            {
                e.LabelText = "Hình chờ check: " + pointValue + " hình";
            }
            else if (argument == "Hình đang check")
            {
                e.LabelText = "Hình đang check: " + pointValue + " hình";
            }
            else if (argument == "Hình hoàn thành")
            {
                e.LabelText = "Hình hoàn thành: " + pointValue + " hình";
            }
        }
Exemplo n.º 15
0
 public static void CustomDrawBarSeriesPoint(object sender, CustomDrawSeriesPointEventArgs e) {
     double value = e.SeriesPoint.Values[0];
     if (value >= 1000000)
         e.LabelText = Math.Round(value / 1000000).ToString() + "M";
     else if (value >= 10000)
         e.LabelText = Math.Round(value / 1000).ToString() + "K";
 }
Exemplo n.º 16
0
 public static void CustomDrawPieSeriesPoint(object sender, CustomDrawSeriesPointEventArgs e) {
     Bitmap markerBitmap = CreateLegendMarker(e.LegendMarkerSize, e.LegendDrawOptions.Color);
     e.LegendMarkerImage = markerBitmap;
     e.DisposeLegendMarkerImage = true;
     double value = e.SeriesPoint.Values[0];
     e.LabelText = "$" + DoubleToShortString(value);
 }
Exemplo n.º 17
0
        void CustomDrawSeriesPoint(object sender, CustomDrawSeriesPointEventArgs e)
        {
            DashboardFlatDataSourceRow row = e.SeriesPoint.Tag as DashboardFlatDataSourceRow;
            string formattedValue          = flatData.GetDisplayText(dashboardItem.Metadata.Value.UniqueId, row);

            e.LabelText  = e.SeriesPoint.Argument + " - " + formattedValue;
            e.LegendText = e.SeriesPoint.Argument;
        }
 protected void WebChartControl1_CustomDrawSeriesPoint(object sender, CustomDrawSeriesPointEventArgs e)
 {
     if (e.Series.Name == "Actual")
     {
         e.LabelText       = e.SeriesPoint.Tag.ToString().Split('|')[0];
         e.SecondLabelText = e.SeriesPoint.Tag.ToString().Split('|')[1] + "%";
     }
 }
Exemplo n.º 19
0
        public static void CustomDrawPieSeriesPoint(object sender, CustomDrawSeriesPointEventArgs e)
        {
            Bitmap markerBitmap = CreateLegendMarker(e.LegendMarkerSize, e.LegendDrawOptions.Color);

            e.LegendMarkerImage        = markerBitmap;
            e.DisposeLegendMarkerImage = true;
            double value = e.SeriesPoint.Values[0];

            e.LabelText = "$" + DoubleToShortString(value);
        }
Exemplo n.º 20
0
 private void chart_CustomDrawSeriesPoint(object sender, CustomDrawSeriesPointEventArgs e)
 {
     if ((bool)chbCustomDraw.IsChecked)
     {
         string color = CorrectDrawOptions(e.SeriesPoint.Value, e.DrawOptions);
         if (!String.IsNullOrEmpty(color))
         {
             e.LabelText = color + ": " + e.LabelText;
         }
     }
 }
        private void chartControl1_CustomDrawSeriesPoint(object sender, CustomDrawSeriesPointEventArgs e)
        {
            // If the value is less than 1, hide the point's label.

            var test = e.Series.Points.Max(p => p.ArgumentX.NumericalArgument);

            if (!e.Series.Points.Max(p => p.ArgumentX.NumericalArgument).Equals(e.SeriesPoint.NumericalArgument))
            {
                e.LabelText = "";
            }
        }
Exemplo n.º 22
0
 private void PieChart_CustomDrawSeriesPoint(object sender, CustomDrawSeriesPointEventArgs e)
 {
     if (e.SeriesPoint == pieChart.Series[0].Points[0])
     {
         e.LegendText = e.Series.ToString();
     }
     else
     {
         e.LegendText = "";
     }
 }
 private void chartControl2_CustomDrawSeriesPoint(object sender, CustomDrawSeriesPointEventArgs e)
 {
     if (!string.IsNullOrEmpty(_columnName))
     {
         if (string.Equals(e.SeriesPoint.Argument, _columnName))
         {
             e.SeriesDrawOptions.Color = Color.Red;
             //e.SeriesDrawOptions.ActualColor2 = Color.Red;
         }
     }
 }
Exemplo n.º 24
0
        protected void chart_CustomDrawSeriesPoint(object sender, CustomDrawSeriesPointEventArgs e)
        {
            var drv = (e.SeriesPoint.Tag as System.Data.DataRowView);
            if (drv == null) return;
            var valueObj = drv.Row.ItemArray.Last();
            var valueStr = Convert.ToDecimal(valueObj).ToString("#,##0") + this.MySett.GetYUnitName("(", ")");
            var arr = drv.Row.ItemArray
                .Where(p => !Lib.IsNOE(p) && Lib.NTE(valueObj) != Lib.NTE(p))
                .Select(p => Lib.NTE(p)).ToArray();

            e.LegendText = Lib.ParseCollection2Str(arr, " | ") + " : " + valueStr;
        }
Exemplo n.º 25
0
        public static void Paint(CustomDrawSeriesPointEventArgs e)
        {
            int imageSizeW = 18, imageSizeH = 14;
            var image = new Bitmap(imageSizeW, imageSizeH);

            using (var graphics = Graphics.FromImage(image)) {
                graphics.FillRectangle(new SolidBrush(e.LegendDrawOptions.Color), new Rectangle(new Point(0, 0), new Size(imageSizeW, imageSizeH)));
            }
            e.LegendMarkerImage        = image;
            e.DisposeLegendMarkerImage = true;
            e.LegendMarkerVisible      = true;
        }
Exemplo n.º 26
0
        void Chart_CustomDrawSeriesPoint(object sender, CustomDrawSeriesPointEventArgs e)
        {
            ChartControl chart = sender as ChartControl;

            if (chart == null)
            {
                return;
            }
            if (chart.Diagram.Series.Count > 0 && !chart.Diagram.Series[0].Equals(e.Series))
            {
                e.LegendText = string.Empty;
            }
        }
Exemplo n.º 27
0
        public static void CustomDrawBarSeriesPoint(object sender, CustomDrawSeriesPointEventArgs e)
        {
            double value = e.SeriesPoint.Values[0];

            if (value >= 1000000)
            {
                e.LabelText = Math.Round(value / 1000000).ToString() + "M";
            }
            else if (value >= 10000)
            {
                e.LabelText = Math.Round(value / 1000).ToString() + "K";
            }
        }
Exemplo n.º 28
0
 void chartControl1_CustomDrawSeriesPoint(object sender, CustomDrawSeriesPointEventArgs e)
 {
     if (e.Series.Name == "BuySellVolume")
     {
         if (e.SeriesPoint.Values[0] > 0)
         {
             e.SeriesDrawOptions.Color = Color.Green;
         }
         else
         {
             e.SeriesDrawOptions.Color = Color.Red;
         }
     }
 }
 private void OnCustomDrawSeriesPoint(object sender, CustomDrawSeriesPointEventArgs e)
 {
     if (e.SeriesPoint.Values.Length > 0)
     {
         var value = e.SeriesPoint.Values[0];
         if (value > 50)
         {
             e.LabelText = $"{value}";
         }
         else
         {
             e.LabelText = string.Empty;
         }
     }
 }
Exemplo n.º 30
0
        void _chCtrl_CustomDrawSeriesPoint(object sender, CustomDrawSeriesPointEventArgs e)
        {
            string customLabel = (string)e.SeriesPoint.Tag;

            if (customLabel != string.Empty)
            {
                e.LabelText = customLabel;
            }
            if (_report.GraphType == OlapReport.GraphTypeEnum.Pie)
            {
                if (_chCtrl.Series.Count > 0 && _chCtrl.Series[0] != e.Series)
                {
                    e.LegendText = "";
                }
            }
        }
Exemplo n.º 31
0
        protected void chart_CustomDrawSeriesPoint(object sender, CustomDrawSeriesPointEventArgs e)
        {
            var drv = (e.SeriesPoint.Tag as System.Data.DataRowView);

            if (drv == null)
            {
                return;
            }
            var valueObj = drv.Row.ItemArray.Last();
            var valueStr = Convert.ToDecimal(valueObj).ToString("#,##0") + this.MySett.GetYUnitName("(", ")");
            var arr      = drv.Row.ItemArray
                           .Where(p => !Lib.IsNOE(p) && Lib.NTE(valueObj) != Lib.NTE(p))
                           .Select(p => Lib.NTE(p)).ToArray();

            e.LegendText = Lib.ParseCollection2Str(arr, " | ") + " : " + valueStr;
        }
Exemplo n.º 32
0
        static void abc_CustomDrawSeriesPoint(object sender, CustomDrawSeriesPointEventArgs e)
        {
            string tagsr = e.SeriesPoint.Tag.ToString();

            switch (tagsr)
            {
            case ("5"):
                e.DrawOptions.Color = Color.FromArgb(255, 95, 158, 160);
                break;

            case ("7"):
                e.DrawOptions.Color = Color.FromArgb(255, 144, 238, 144);
                break;

            case ("8"):
                e.DrawOptions.Color = Colors.Red;
                break;

            case ("9"):
                e.DrawOptions.Color = Color.FromArgb(255, 238, 130, 238);
                break;

            case ("10"):
                e.DrawOptions.Color = Colors.Purple;
                break;

            case ("11"):
                e.DrawOptions.Color = Color.FromArgb(255, 222, 184, 135);
                break;

            case ("12"):
                e.DrawOptions.Color = Colors.Blue;
                break;

            case ("13"):
                e.DrawOptions.Color = Color.FromArgb(255, 199, 199, 199);
                break;

            case ("14"):
                e.DrawOptions.Color = Colors.Green;
                break;

            case ("15"):
                e.DrawOptions.Color = Colors.Yellow;
                break;
            }
        }
Exemplo n.º 33
0
        private void ChartControl_CustomDrawSeriesPoint(object sender, CustomDrawSeriesPointEventArgs e)
        {
            if (e.SeriesPoint.Value <= 10)
            {
                e.DrawOptions.Color = Color.FromArgb(0xFF, 0x51, 0x89, 0x03);
            }

            else if ((e.SeriesPoint.Value > 10) & (e.SeriesPoint.Value <= 20))
            {
                e.DrawOptions.Color = Color.FromArgb(0xFF, 0xF9, 0xAA, 0x0F);
            }

            else if (e.SeriesPoint.Value > 20)
            {
                e.DrawOptions.Color = Color.FromArgb(0xFF, 0xC7, 0x39, 0x0C);
            }
        }
Exemplo n.º 34
0
 private void chartControl2_CustomDrawSeriesPoint(object sender, CustomDrawSeriesPointEventArgs e)
 {
     e.LabelText = e.SeriesPoint.Tag.ToString();
 }
Exemplo n.º 35
0
 static void abc_CustomDrawSeriesPoint(object sender, CustomDrawSeriesPointEventArgs e)
 {
     string tagsr = e.SeriesPoint.Tag.ToString();
     switch (tagsr)
     {
         case ("5"):
             e.DrawOptions.Color = Color.FromArgb(255, 95, 158, 160);
             break;
         case ("7"):
             e.DrawOptions.Color = Color.FromArgb(255, 144, 238, 144);
             break;
         case ("8"):
             e.DrawOptions.Color = Colors.Red;
             break;
         case ("9"):
             e.DrawOptions.Color = Color.FromArgb(255, 238, 130, 238);
             break;
         case ("10"):
             e.DrawOptions.Color = Colors.Purple;
             break;
         case ("11"):
             e.DrawOptions.Color = Color.FromArgb(255, 222, 184, 135);
             break;
         case ("12"):
             e.DrawOptions.Color = Colors.Blue;
             break;
         case ("13"):
             e.DrawOptions.Color = Color.FromArgb(255, 199, 199, 199);
             break;
         case ("14"):
             e.DrawOptions.Color = Colors.Green;
             break;
         case ("15"):
             e.DrawOptions.Color = Colors.Yellow;
             break;
     }
 }
Exemplo n.º 36
0
 private void chartControl1_CustomDrawSeriesPoint(object sender, CustomDrawSeriesPointEventArgs e)
 {
     
 }
 void _chCtrl_CustomDrawSeriesPoint(object sender, CustomDrawSeriesPointEventArgs e)
 {
     string customLabel = (string)e.SeriesPoint.Tag;
     if (customLabel != string.Empty)
         e.LabelText = customLabel;
     if (_report.GraphType == OlapReport.GraphTypeEnum.Pie)
         if (_chCtrl.Series.Count > 0 && _chCtrl.Series[0] != e.Series)
             e.LegendText = "";
 }
Exemplo n.º 38
0
        private void chartControl_CustomDrawSeriesPoint(object sender, CustomDrawSeriesPointEventArgs e)
        {
            //RectangleFillStyle fillstyle = (RectangleFillStyle)((BarDrawOptions)e.SeriesDrawOptions).FillStyle;
            //RectangleGradientFillOptions opts = (RectangleGradientFillOptions)fillstyle.Options;

            //if (dem==0)
            //{
            //    opts.Color2 = Color.Green;
            //    e.SeriesDrawOptions.Color = Color.White;
            //    dem = 1;
            //}
            //else if (dem==1)
            //{
            //    opts.Color2 = Color.Red;
            //    e.SeriesDrawOptions.Color = Color.Yellow;
            //    dem = 0;
            //}
        }
Exemplo n.º 39
0
 public static void CustomDrawSeriesPointLegendMarker(object sender, CustomDrawSeriesPointEventArgs e) {
     Bitmap markerBitmap = CreateLegendMarker(e.LegendMarkerSize, e.LegendDrawOptions.Color);
     e.LegendMarkerImage = markerBitmap;
     e.DisposeLegendMarkerImage = true;
 }
Exemplo n.º 40
0
 void chart_CustomDrawSeriesPoint(object sender, CustomDrawSeriesPointEventArgs e)
 {
     e.LegendText = ((slthuebao)e.SeriesPoint.Tag).Name;
 }
Exemplo n.º 41
0
 private void stockChart_CustomDrawSeriesPoint(object sender, CustomDrawSeriesPointEventArgs e)
 {
     if (e.SeriesPoint.Value < 5)
         e.DrawOptions.Color = Colors.Red;
     else if (e.SeriesPoint.Value >= 4 && e.SeriesPoint.Value <= 30)
         e.DrawOptions.Color = Colors.Yellow;
     else
         e.DrawOptions.Color = Colors.Green;
 }