By shweta jain - 4 Years Ago
|
Hello sir,
I want to create chart like this attached snapshot. How can I style line series chart to create chart like this attached snapshot?
|
By Nevron Support - 4 Years Ago
|
Hi Sweta,
To achieve this appearance of line styles you need to modify the line color and width as well as marker appearance and shape - the following code shows how to achieve that:
NChart chart = nChartControl1.Charts[0];
NLineSeries line = new NLineSeries();
line.MarkerStyle.Visible = true; line.MarkerStyle.PointShape = PointShape.Pyramid; line.BorderStyle.Color = Color.Red; line.MarkerStyle.FillStyle = new NColorFillStyle(Color.Red); line.MarkerStyle.BorderStyle.Width = new NLength(0); line.DataLabelStyle.Visible = false;
line.Values.Add(10); line.Values.Add(30); line.Values.Add(20);
chart.Series.Add(line);
We hope this helps - let us know if you meet any problems or have any questions.
|