Пример #1
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";
 }
Пример #2
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);
 }
Пример #3
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;
        }
Пример #4
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;
            //}
        }
Пример #5
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;
     }
 }
Пример #6
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 = "";
 }
Пример #8
0
 private void chartControl2_CustomDrawSeriesPoint(object sender, CustomDrawSeriesPointEventArgs e)
 {
     e.LabelText = e.SeriesPoint.Tag.ToString();
 }
Пример #9
0
 public static void CustomDrawSeriesPointLegendMarker(object sender, CustomDrawSeriesPointEventArgs e) {
     Bitmap markerBitmap = CreateLegendMarker(e.LegendMarkerSize, e.LegendDrawOptions.Color);
     e.LegendMarkerImage = markerBitmap;
     e.DisposeLegendMarkerImage = true;
 }
Пример #10
0
 void chart_CustomDrawSeriesPoint(object sender, CustomDrawSeriesPointEventArgs e)
 {
     e.LegendText = ((slthuebao)e.SeriesPoint.Tag).Name;
 }
 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;
 }