Profile Picture

black line surrounding chart

Posted By Hans Henrik Friis Pedersen... 9 Years Ago
Author
Message
Hans Henrik Friis Pedersen...
Question Posted 9 Years Ago
View Quick Profile
Forum Newbie

Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)

Group: Forum Members
Last Active: 8 Years Ago
Posts: 28, Visits: 136
Hi,

When I export a Chart using the code below, a black line is present around the chart, see the attached chart. How do I remove that black line??


  // set a default file
            this.saveFileDialog1.FileName = "untitled.Png";
            // set filters - this can be done in properties as well
            this.saveFileDialog1.Filter = "Png Files (*.Png)|*.Png";
            this.saveFileDialog1.DefaultExt = "Png";
            if (this.saveFileDialog1.ShowDialog() == DialogResult.OK)
            {
                Bitmap bitmap = new Bitmap(this.nChartControl2.ClientSize.Width, this.nChartControl2.ClientSize.Height, PixelFormat.Format24bppRgb);
                this.nChartControl2.ImageExporter.RenderToBitmap(bitmap, false);
                bitmap.Save(this.saveFileDialog1.FileName, ImageFormat.Png);
            }




Attachments
untitled.Png (317 views, 71.00 KB)



Similar Topics


Reading This Topic