Nevron Forum
Back
Login
Register
Login
Register
Home
»
Nevron Vision for NET
»
Nevron Chart for .NET
»
different colors in a line series
different colors in a line series
Post Reply
different colors in a line series
View
Flat Ascending
Flat Descending
Threaded
Options
Subscribe to topic
Print This Topic
Goto Topics Forum
Author
Message
Manal Goyal
Manal Goyal
posted 7 Years Ago
ANSWER
Topic Details
Group: Forum Members
Posts: 29,
Visits: 405
Hi,
I have a LineSeries which goes from -2 to 2 on x axis, I want to color the part of the series from -2 to 0 on x axis in red and the part from 0 to 2 in blue. How can I achieve that.
Thank you.
Reply
Like
0
Nevron Support
Nevron Support
posted 6 Years Ago
ANSWER
Post Details
Group: Administrators
Posts: 3.1K,
Visits: 4.2K
Hi Manal,
You can assign different stroke style per line segment using the BorderStyles collection of the series - for example:
NChart chart = nChartControl1.Charts[0];
NLineSeries line = new NLineSeries();
line.Values.Add(1);
line.BorderStyles[0] = new NStrokeStyle(Color.Red);
line.Values.Add(2);
line.Values.Add(3);
chart.Series.Add(line);
will draw a line where the first segment is in different color.
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