Axis Specific

ChartsAreas > Collection > ChartArea1 > Axes > Collection

This is how you get to the properties for the axis of a basic chart. (more…)

Chart Control General

Installing

Microsoft Chart Control for .NET Framework is an add on to VS2008. See here for details of getting it:-

(more…)

Chart Types

Line Charts

Displaying Points

Series > Marker Style

Copy to clipboard

Copy Chart To Clipbaord


	MemoryStream ^MemoryStream1 = gcnew MemoryStream();
	Chart1->SaveImage(MemoryStream1, DataVisualization::Charting::ChartImageFormat::Bmp);
	System::Drawing::Bitmap ^Bitmap1 = gcnew System::Drawing::Bitmap(MemoryStream1);
	System::Windows::Forms::Clipboard::SetImage(Bitmap1);

Creating New Chart

Use The Sample Ap

The fastest way to choose the basic chart setup you want is to use the sample ap, select the chart you want and adjust it as you want.  The code sample it generates may be good (but isn’t always, but once you’ve seen how it works and what options you want then look in the code for that form to see how the chart created. (more…)

Deploying Applications Using The Chart Control

The Microsoft chart control is included in .NET 4 and above. For .NET3.5 your application distribution package needs to include mschart.exe and install it as a prerequisite if it is not already on the users PC. You can’t simply include a .dll – mschart.exe needs to be run. (more…)

Dynamically Altering Charts


	this->SuspendLayout();

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

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

 (more...)

Multiple lines on a chart

If you want to display multiple channels (i.e. multiple lines on a line chart) then you create a seperate series for each.

Print A Chart

You can go through a process of copying to clipboard, then printing, or you can just use:


	Chart1->Printing->Print(true);

Title

Create a global title object


private: DataVisualization::Charting::Title ^ChartTitle1;

(more…)