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

Excel Sort values in ascending order using function TEXTJOIN

 Excel ::  Text ::  1,3,5,2,9,5,11 Result :: 1,2,3,5,5,9,11 Formula ::     TEXTJOIN ( ",",1,SORT(MID(SUBSTITUTE( A1 ,","...