this->SuspendLayout();

	chart1->ChartAreas[0]->AxisY->Title = L"Kg";

	//Set max / min
	chart1->ChartAreas[0]->AxisY->Minimum = 0;
	chart1->ChartAreas[0]->AxisY->Maximum = 1000;

	//Set tool tip text
	chart1->Series[0]->ToolTip = "#VALX\n#VAL Kg";	//To get possible expressions go to the charts
									//Series > Map Area > Tool Tip property

	//Set individual bar colours
	chart1->Series[0]->Points[0]->Color = Color::Orange;	//Point value is point index to set colour of.  Set colour after databind

	this->ResumeLayout();

	//Invalidate chart to update it
	chart1->Invalidate();

Causing Chart To Update


	//Invalidate chart to update it
	chart1->Invalidate();

Changing Format Of X Axis Lables


chart.ChartAreas[0].AxisX.LabelStyle.IntervalType = DateTimeIntervalType.Seconds;
chart.ChartAreas[0].AxisX.LabelStyle.Format = "T";	//Set DateTime type to display as time not date

Good Resources

http://blogs.msdn.com/alexgor/
http://blogs.msdn.com/alexgor/archive/2008/11/11/microsoft-chart-control-how-to-using-keywords.aspx

Feel free to comment if you can add help to this page or point out issues and solutions you have found. I do not provide support on this site, if you need help with a problem head over to stack overflow.

Comments

Your email address will not be published.