Nevron Forum
Back
Login
Register
Login
Register
Home
»
Nevron Vision for NET
»
Nevron Chart for .NET
»
Bar Chart Legend Position
Bar Chart Legend Position
Post Reply
Bar
Chart
Legend
Position
View
Flat Ascending
Flat Descending
Threaded
Options
Subscribe to topic
Print This Topic
Goto Topics Forum
Author
Message
Mike Holmes
Mike Holmes
posted 3 Years Ago
ANSWER
Topic Details
Group: Forum Members
Posts: 11,
Visits: 45
How
can
I
,
move
the
&
nbsp
;
Bar
Chart
Legend
Position
to
be
away
from
the
chart
,
also
ideally
I
would
like
to
remove
the
box
Reply
Like
0
Nevron Support
Nevron Support
posted 3 Years Ago
ANSWER
Post Details
Group: Administrators
Posts: 3.1K,
Visits: 4.2K
Hi
Mike
,
We
would
recommend
that
you
docking
to
achive
this
layout
.
In
this
case
you
can
dock
the
lagend
to
the
right
,&
nbsp
;
the
label
to
the
top
and
finally
dock
the
chart
to
fill
the
rest
.
That
way
the
chart
will
automatically
measure
the
sizes
of
the
label
and
legend
and
they
'
ll
not
overlap
-
for
example
:
&
nbsp
;&
nbsp
;&
nbsp
;
nChartControl1
.
Panels
.
Clear
();
&
nbsp
;&
nbsp
;&
nbsp
;&
nbsp
;
NLabel
label
=
new
NLabel
("
Bar
Chart
");
&
nbsp
;&
nbsp
;&
nbsp
;&
nbsp
;
label
.
DockMode
=
PanelDockMode
.
Top
;
&
nbsp
;&
nbsp
;&
nbsp
;&
nbsp
;
label
.
Margins
=
new
Nevron
.
GraphicsCore
.
NMarginsL
(
10
);
&
nbsp
;&
nbsp
;&
nbsp
;&
nbsp
;
nChartControl1
.
Panels
.
Add
(
label
);
&
nbsp
;&
nbsp
;&
nbsp
;&
nbsp
;
NLegend
legend
=
new
NLegend
();
&
nbsp
;&
nbsp
;&
nbsp
;&
nbsp
;
legend
.
DockMode
=
PanelDockMode
.
Right
;
&
nbsp
;&
nbsp
;&
nbsp
;&
nbsp
;
legend
.
FitAlignment
=
ContentAlignment
.
TopCenter
;
&
nbsp
;&
nbsp
;&
nbsp
;&
nbsp
;
legend
.
Margins
=
new
Nevron
.
GraphicsCore
.
NMarginsL
(
10
);
&
nbsp
;&
nbsp
;&
nbsp
;&
nbsp
;
legend
.
OuterTopBorderStyle
.
Width
=
new
Nevron
.
GraphicsCore
.
NLength
(
0
);
&
nbsp
;&
nbsp
;&
nbsp
;&
nbsp
;
legend
.
OuterLeftBorderStyle
.
Width
=
new
Nevron
.
GraphicsCore
.
NLength
(
0
);
&
nbsp
;&
nbsp
;&
nbsp
;&
nbsp
;
legend
.
OuterRightBorderStyle
.
Width
=
new
Nevron
.
GraphicsCore
.
NLength
(
0
);
&
nbsp
;&
nbsp
;&
nbsp
;&
nbsp
;
legend
.
OuterBottomBorderStyle
.
Width
=
new
Nevron
.
GraphicsCore
.
NLength
(
0
);
&
nbsp
;&
nbsp
;&
nbsp
;&
nbsp
;
nChartControl1
.
Panels
.
Add
(
legend
);
&
nbsp
;&
nbsp
;&
nbsp
;&
nbsp
;
NCartesianChart
chart
=
new
NCartesianChart
();
&
nbsp
;&
nbsp
;&
nbsp
;&
nbsp
;
chart
.
BoundsMode
=
Nevron
.
GraphicsCore
.
BoundsMode
.
Stretch
;
&
nbsp
;&
nbsp
;&
nbsp
;&
nbsp
;
chart
.
Margins
=
new
Nevron
.
GraphicsCore
.
NMarginsL
(
10
);
&
nbsp
;&
nbsp
;&
nbsp
;&
nbsp
;
chart
.
DockMode
=
PanelDockMode
.
Fill
;
&
nbsp
;&
nbsp
;&
nbsp
;&
nbsp
;
nChartControl1
.
Panels
.
Add
(
chart
);
&
nbsp
;&
nbsp
;&
nbsp
;&
nbsp
;
chart
.
DisplayOnLegend
=
legend
;
&
nbsp
;&
nbsp
;&
nbsp
;&
nbsp
;
NBarSeries
bar
=
new
NBarSeries
();
&
nbsp
;&
nbsp
;&
nbsp
;&
nbsp
;
bar
.
Values
.
Add
(
10
);
&
nbsp
;&
nbsp
;&
nbsp
;&
nbsp
;
bar
.
Values
.
Add
(
20
);
&
nbsp
;&
nbsp
;&
nbsp
;&
nbsp
;
bar
.
Values
.
Add
(
30
);
&
nbsp
;&
nbsp
;&
nbsp
;&
nbsp
;
bar
.
DataLabelStyle
.
Visible
=
true
;
&
nbsp
;&
nbsp
;&
nbsp
;&
nbsp
;
chart
.
Series
.
Add
(
bar
);
This
code
also
shows
how
to
turn
off
the
border
around
the
legend
.
You
can
take
a
look
at
the
following
topic
in
the
documentation
:
http
://
helpdotnetvision
.
nevron
.
com
/#
UsersGuide_Layout_Docking_Panels
.
html
We
hope
this
helps
-
let
us
know
if
you
have
any
questions
.
Best Regards,
Nevron Support Team
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