Profile Picture

Border and Background

Posted By Karl Baum 9 Years Ago
Author
Message
Karl Baum
Question Posted 9 Years Ago
View Quick Profile
Forum Newbie

Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)

Group: Forum Members
Last Active: 9 Years Ago
Posts: 9, Visits: 23
Hi,

We are using the WPF charting control (NChartControl) and am attempting to do some style adjustments to fit in with the style of the application.

1) We have a surface mesh plot (3d with NGridSurfaceSeries).  The control has a 3d style border around it.  We would like to remove this border.  Our graph has a black background and this border does not look good with it.

2) We have a 2D vector plot (NVectorSeries).  I was unable to find a way to make the background black.  It also has a border around the control I would like to remove.

I'm sure these things are simple to do, but I haven't stumbled across how.
Thanks

Nevron Support
Posted 9 Years Ago
View Quick Profile
Supreme Being

Supreme Being (4,329 reputation)Supreme Being (4,329 reputation)Supreme Being (4,329 reputation)Supreme Being (4,329 reputation)Supreme Being (4,329 reputation)Supreme Being (4,329 reputation)Supreme Being (4,329 reputation)Supreme Being (4,329 reputation)Supreme Being (4,329 reputation)

Group: Forum Members
Last Active: Last Year
Posts: 3,039, Visits: 3,746
Hi Karl,
In order to hide the border you need to use the following code:

nChartControl1.BackgroundStyle.FrameStyle.Visible = false;

Regarding the background - do you need to change the background of the plot or the background of the control:
1. To change the background of the of the control use:
nChartControl1.BackgroundStyle.FillStyle = new NColorFillStyle(Color.Black);
2. To change the background of the plot you can use:
nChartControl1.Charts[0].BackgroundFillStyle = new NColorFillStyle(Color.Black);

Hope this helps - let us know if you have any questions.





Best Regards,
Nevron Support Team



Karl Baum
Posted 9 Years Ago
View Quick Profile
Forum Newbie

Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)

Group: Forum Members
Last Active: 9 Years Ago
Posts: 9, Visits: 23
Thanks for the prompt response.

    nChartControl1.BackgroundStyle.FrameStyle.Visible = false;
Did not work to remove the border of the 3d chart.  It changes the style of the border, but it was still there. 
For example, if I set the chart background to black, and set the window background to black, I still end up with a white line border along two sides of the control.
    chartnChartControl1.Charts[0].BackgroundFillStyle = new NColorFillStyle(System.Drawing.Color.Black);
    this.Background = System.Windows.Media.Brushes.Black; // In my tests 'this' was a WPF user control
    chartnChartControl1.BackgroundStyle.FrameStyle.Visible = false;

It does look like it worked to remove the border from the 2d vector chart.

For setting the background black, I am referring to the area the vectors are being drawn on.  I believe that is the plot.  Neither of the calls worked to change the background color.  Both affected only the area of the chart outside of the area the vectors are being drawn on.


Karl Baum
Posted 9 Years Ago
View Quick Profile
Forum Newbie

Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)

Group: Forum Members
Last Active: 9 Years Ago
Posts: 9, Visits: 23
Building on your suggestions I succeeded on getting the 2d vector chart to be styled with a black background and reside within a black window without a border by doing all of the following.   It appears the back wall was the culprit.

nChartControl1.Charts[0].Wall(ChartWallType.Back).Visible = false;
nChartControl1.BackgroundStyle.FillStyle = new NColorFillStyle(System.Drawing.Color.Black);

For the 3d plot the following worked.
nChartControl1.BackgroundStyle.FillStyle = new NColorFillStyle(System.Drawing.Color.Black);



Similar Topics


Reading This Topic