black line surrounding chart


Author
Message
Nevron Support
Nevron Support
Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)
Group: Administrators
Posts: 3.1K, Visits: 4.2K
Hi Hans,

You need to make the chart background frame invisible:

nChartControl.nChartControl1.BackgroundStyle.FrameStyle.Visible = false;

Let us know if you have any questions.


Best Regards,
Nevron Support Team


Hans Henrik Friis Pedersen...
Hans Henrik Friis Pedersen
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
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 (337 views, 71.00 KB)
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search