Need Help to Dynamically add LineSeries to ISeries[] in WinForm #600
Answered
by
grewegreg
Thinking-319
asked this question in
Q&A
|
I want to use LiveCharts2 in my project to plot some lines in cartesianChart. Here is the code in the sample: public ISeries[] Series { get; set; } =
{
new LineSeries<double>
{
Values = new double[] { 5, 0, 5, 0, 5, 0 },
Fill = null,
GeometrySize = 0,
// use the line smoothness property to control the curve
// it goes from 0 to 1
// where 0 is a straight line and 1 the most curved
LineSmoothness = 0
},
new LineSeries<double>
{
Values = new double[] { 7, 2, 7, 2, 7, 2 },
Fill = null,
GeometrySize = 0,
LineSmoothness = 1
}
};In my project, it is difficult for me to determine the number of LineSeries that need to be plotted, because it will change according to the data. So that I don't know how to go about adding LineSeries to ISeries[] dynamically. THANKS a lot.:pray::pray::pray: |
Answered by
grewegreg
Aug 28, 2022
Replies: 2 comments 1 reply
|
You code do something like this: |
1 reply
Answer selected by
Thinking-319
|
Glad it worked out for you. |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment


You code do something like this: