using System;
using System.Windows.Forms;
using System.Windows.Forms.DataVisualization.Charting;
namespace WindowsFormsApplication1
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
{
string[] seriesArray = { "Cats", "Dogs" };
int[] pointsArray = { 1, 2 };
this.chart1.Palette = ChartColorPalette.SeaGreen;
this.chart1.Titles.Add("Pets");
for (int i = 0; i < seriesArray.Length; i++)
{
Series series = this.chart1.Series.Add(seriesArray[i]);
series.Points.Add(pointsArray[i]);
}
}
}
}