using Imsl.Chart2D; using System.Drawing; public class SampleLegend : FrameChart { public SampleLegend() { Chart chart = this.Chart; AxisXY axis = new AxisXY(chart); Legend legend = chart.Legend; legend.IsVisible = true;; legend.SetTitle("Legend"); legend.TextColor = Color.White; legend.FillType = Legend.FILL_TYPE_SOLID; legend.SetViewport(0.3, 0.4, 0.1, 0.4); double[] y1 = new double[] {4, 6, 2, 1, 8}; Data data1 = new Data(axis, y1); data1.DataType = Data.DATA_TYPE_LINE; data1.LineColor = Color.Red; data1.SetTitle("Line"); double[] y2 = new double[] {7, 3, 4, 5, 2}; Data data2 = new Data(axis, y2); data2.DataType = Data.DATA_TYPE_MARKER; data2.MarkerColor = Color.Blue; data2.SetTitle("Marker"); } public static void Main(string[] argv) { System.Windows.Forms.Application.Run(new SampleLegend()); } }