The System.Windows.Forms.UserControl class that our ChartView class derives from does not support Windows style borders. So if you want one of the Windows style borders, place the ChartView derived class in a System.Windows.Forms.Panel
object, and use the BorderStyle property of the Panel to define a border. You can set the Dock property (derived from UserControl) of the ChartView object to Fill so that the ChartView fills the entire Panel.
Or you can just draw a rectangle using the QCChart2D routines. The example below draws a border at the inside edge of the ChartView.
Color borderColor = Color.Black;
ChartAttribute attrib2 = new ChartAttribute (borderColor, 1,DashStyle.Solid);
Rectangle2D borderRect = new Rectangle2D(0, 0, 0.99 , 0.99);
GraphicsPath rectpath = new GraphicsPath();
rectpath.AddRectangle(borderRect.GetRectangleF());
ChartShape borderShape = new ChartShape(pTransform1, rectpath,
ChartObj.NORM_GRAPH_POS, 0, 0, ChartObj.NORM_GRAPH_POS,0);
borderShape.ChartObjClipping = ChartObj.GRAPH_AREA_CLIPPING;
borderShape.SetChartObjAttributes(attrib2);
chartVu.AddChartObject(borderShape);