Nevron Forum
Back
Login
Register
Login
Register
Home
»
Nevron Vision for NET
»
Nevron Chart for .NET
»
Set Hand Cursor for Legend Item
Set Hand Cursor for Legend Item
Post Reply
Set Hand
Cursor
for
Legend
Item
View
Flat Ascending
Flat Descending
Threaded
Options
Subscribe to topic
Print This Topic
Goto Topics Forum
Author
Message
Alexander Haberl
Alexander Haberl
posted 4 Years Ago
ANSWER
Topic Details
Group: Forum Members
Posts: 15,
Visits: 48
I cannot set a Hand
Cursor
for an automatic
Legend
Item. Is this possible?
I tried this approach (the changing of the Font to an underlined Font works):
private void ChartControl_MouseMove(object sender, MouseEventArgs e)
{
NHitTestResult res = null;
try
{
res = HitTest(e.X, e.Y);
}
catch (Exception)
{
}
if (null != res)
{
if (res.ChartElement == ChartElement.
Legend
DataItem)
{
for (int i = 0; i < Charts.Count; i++)
{
foreach (NSeriesBase s in Charts[i].Series)
{
NSeries
Legend
series
Legend
= s.
Legend
;
series
Legend
.TextStyle.FontStyle.Style = FontStyle.Regular;
}
}
res.
Legend
DataItem.TextStyle.FontStyle.Style = FontStyle.Underline;
res.
Legend
DataItem.
Interactivity
Style.
Cursor
.Type =
Cursor
Type.Hand;
reset
Legend
= true;
Refresh();
}
else
{
if (reset
Legend
)
{
for (int i = 0; i < Charts.Count; i++)
{
foreach (NSeriesBase s in Charts[i].Series)
{
NSeries
Legend
series
Legend
= s.
Legend
;
series
Legend
.TextStyle.FontStyle.Style = FontStyle.Regular;
}
}
Refresh();
reset
Legend
= false;
}
}
}
}
Tags
Cursor
Interactivity
Legend
Reply
Like
0
Nevron Support
Nevron Support
posted 4 Years Ago
ANSWER
Post Details
Group: Administrators
Posts: 3.1K,
Visits: 4.2K
Hi Alexander,
Generally, you should not modify the attributes of automatically generated
legend
items, because in the general case they are clones of series
legend
attributes. Instead, you can simply create a
legend
with custom items. You can check out the Panels \
Legend
\ Custom
Legend
Items example on how to generate custom
legend
items.
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