Nevron Forum
Back
Login
Register
Login
Register
Home
»
Nevron Open Vision for NET
»
NOV Chart for .NET
»
Legend appears above chart
Legend appears above chart
Post Reply
Legend appears above chart
View
Flat Ascending
Flat Descending
Threaded
Options
Subscribe to topic
Print This Topic
Goto Topics Forum
Author
Message
Devin Ellis
Devin Ellis
posted 6 Years Ago
ANSWER
Topic Details
Group: Forum Members
Posts: 9,
Visits: 87
We are using Nevron chart 18.7 for .NET.
We create our charts with two dock panels, one on the top for textual header information and one at the bottom for the actual chart. Whenever the chart has a legend, the legend appears in the middle of the header as seen in the attached image.
How do we make the legend appear below the chart in the chart's dock panel?
Reply
Like
0
Nevron Support
Nevron Support
posted 6 Years Ago
ANSWER
Post Details
Group: Administrators
Posts: 3.1K,
Visits: 4.2K
Hi Devin,
You can nest the chart and legend in a single dock panel - the following code shows how to create a layout configuration that docks a header to the top and a legend to the bottom:
nChartControl1.Panels.Clear();
NLabel label = new NLabel("Some Header");
label.DockMode = PanelDockMode.Top;
nChartControl1.Panels.Add(label);
NDockPanel chartAndLegend = new NDockPanel();
chartAndLegend.Margins = new NMarginsL(10);
chartAndLegend.DockMode = PanelDockMode.Fill;
chartAndLegend.PositionChildPanelsInContentBounds = true;
nChartControl1.Panels.Add(chartAndLegend);
NLegend legend = new NLegend();
legend.DockMode = PanelDockMode.Bottom;
chartAndLegend.ChildPanels.Add(legend);
NCartesianChart chart = new NCartesianChart();
chart.BoundsMode = BoundsMode.Stretch;
chartAndLegend.ChildPanels.Add(chart);
chart.DisplayOnLegend = legend;
NBarSeries bar = new NBarSeries();
bar.Values.Add(10);
bar.Values.Add(20);
bar.Values.Add(30);
chart.Series.Add(bar);
Hope this helps - let us know if you have any questions.
Best Regards,
Nevron Support Team
Reply
Like
0
Devin Ellis
Devin Ellis
posted 6 Years Ago
ANSWER
Post Details
Group: Forum Members
Posts: 9,
Visits: 87
I was able to use your code to set the legend inside the chart. Thanks for the help.
Reply
Like
0
GO
Merge Selected
Merge into selected topic...
Merge into merge target...
Merge into a specific topic ID...
Open Merge
Post Reply
Similar Topics
Post Quoted Reply
Reading This Topic
Login
Login
Remember Me
Reset Password
Resend Validation Email
Login
Explore
Messages
Mentions
Search