Esempio n. 1
0
        private void xrChart1_CustomDrawAxisLabel(object sender, DevExpress.XtraCharts.CustomDrawAxisLabelEventArgs e)
        {
            AxisBase axis = e.Item.Axis;

            if (axis is AxisY)
            {
                int scoreTypeCode = Convert.ToInt32(e.Item.AxisValue);

                if (scoreTypeCode == 1)
                {
                    e.Item.Text = "Well Below";
                }
                else if (scoreTypeCode == 2)
                {
                    e.Item.Text = "Monitor";
                }
                else if (scoreTypeCode == 3)
                {
                    e.Item.Text = "Above Cutoff";
                }
                else
                {
                    e.Item.Text = "ERROR";
                }
            }
        }
 //3. Chart with Whole Number Format (X Axis)
 private void ChartControl_CustomDrawAxisLabel3(object sender, DevExpress.XtraCharts.CustomDrawAxisLabelEventArgs e)
 {
     if (e.Item.Axis is AxisX)
     {
         e.Item.Text = ((double)e.Item.AxisValue).ToString("n0");
     }
 }
 //1. Chart with the Currency Format (Y Axis)
 private void ChartControl_CustomDrawAxisLabel1(object sender, DevExpress.XtraCharts.CustomDrawAxisLabelEventArgs e)
 {
     if (e.Item.Axis is SecondaryAxisY)
     {
         e.Item.Text = "$" + e.Item.Text;
     }
 }
Esempio n. 4
0
 private void chartSlabtest_CustomDrawAxisLabel(object sender, DevExpress.XtraCharts.CustomDrawAxisLabelEventArgs e)
 {
     try
     {
         if (e.Item.Axis is AxisX)
         {
             e.Item.Text = e.Item.Text.Replace("_", "\n");
         }
     }
     catch
     {
     }
 }
 private void chart_CustomDrawAxisLabel(object sender, DevExpress.XtraCharts.CustomDrawAxisLabelEventArgs e)
 {
     try
     {
         AxisBase axis = e.Item.Axis;
         if (axis is AxisX)
         {
             e.Item.Text               = e.Item.Text.Substring(0, 1);
             e.Item.TextColor          = Color.Green;
             e.Item.EnableAntialiasing = DefaultBoolean.True;
         }
     }
     catch { }
 }
Esempio n. 6
0
 private void chart_CustomDrawAxisLabel(object sender, DevExpress.XtraCharts.CustomDrawAxisLabelEventArgs e)
 {
 }