Tuesday, 19 July 2016

Asp.net Chart Control Settings

// Remove Background lines

Chart1.ChartAreas[0].AxisX.MajorGrid.Enabled = false;
Chart1.ChartAreas[0].AxisY.MajorGrid.Enabled = false;


// Colored Chart Y & X axis lines

Chart1.ChartAreas[0].AxisX.LineColor = System.Drawing.Color.Green;

Chart1.ChartAreas[0].AxisY.LineColor = System.Drawing.Color.Red;


// Change Background line colors

Chart1.ChartAreas[0].AxisX.MajorGrid.LineColor = Color.FromArgb(90, 200, 200, 200);

Chart1.ChartAreas[0].AxisY.MajorGrid.LineColor = Color.FromArgb(90, 200, 200, 200);


// Change Data Values Angle


Chart1.Series[i].SmartLabelStyle.Enabled = false;// Remove auto property first

Chart1.Series[i].LabelAngle = -89; // Can vary from -90 to 90;


// add white space in value label in chart

Chart1.Series[i].Label ="      #VALY";




No comments:

Post a Comment

How to highlight selected text in notepad++

  –> To highlight a block of code in Notepad++, please do the following steps step-1  :- Select the required text. step-2  :- Right click...