We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

Regarding chart series stop and start in same line

Thread ID:

Created:

Updated:

Platform:

Replies:

57974 Mar 15,2007 12:26 AM Mar 15,2007 07:29 AM Windows Forms 1
loading
Tags: Chart
Sathishkumar Kaliavaradhan
Asked On March 15, 2007 12:26 AM

Hi All,

My requirement is to show the trend series like example chart interval starts at 6.00 and ends at 12.00 and series show value line from 6:00 to 10.00 and give some gap in line (------ -----) and again start at 11:00 to 12:00

Please any tell me how do i achive this as soon as possiable because it is very urgent for me.

Thanks and Reagrds
k.Sathishkumar

Ramya R [Syncfusion]
Replied On March 15, 2007 07:29 AM

Hi Satishkumar,

If your intention is to draw a TrendLine for a scatter chart then the trendline can be drawn only continuously without any gap since the trend lines are used to identify the slope taking all points of scatter into account. Kindly take a look at the attached sample.

You can download the sample from the Webpage link given below,
http://websamples.syncfusion.com/samples/Chart.Windows/F57974/main.htm

Or if your intention is drawlines with gap just interesecting the ScatterChart then it can be done as shown in the code snippet below,

private void Form1_Load(object sender, EventArgs e)
{
IntializeChartData();
DrawlineforScatter();
}

private void DrawlineforScatter()
{
ChartSeries ser = this.chartControl1.Model.NewSeries("Series1", ChartSeriesType.Line);
ser.Points.Add(1, 6);
ser.Points.Add(2, 7);
ser.Points.Add(3, 8);
ser.Points.Add(4, 9);
ser.Points.Add(5, 10);
ser.Style.Interior = new Syncfusion.Drawing.BrushInfo(Color.Blue);
this.chartControl1.Series.Add(ser);
ChartSeries ser1 = this.chartControl1.Model.NewSeries("Series2", ChartSeriesType.Line);
ser1.Points.Add(6, 11);
ser1.Points.Add(7, 12);
ser1.Style.Interior = new Syncfusion.Drawing.BrushInfo(Color.Blue);
this.chartControl1.Series.Add(ser1);
}

private void IntializeChartData()
{
//Creates a new series
ChartSeries series1 = this.chartControl1.Model.NewSeries("Birds Age Record", ChartSeriesType.Scatter);
series1.Text = series1.Name;
//Add method is used to add points to the series
series1.Points.Add(1, 6);//series1.Points.Add(Xvalue,Yvalue)
series1.Points.Add(2, 7);
series1.Points.Add(3, 8);
series1.Points.Add(4, 9);
series1.Points.Add(5, 10);
series1.Points.Add(6, 11);
series1.Points.Add(7, 12);

//Series created is added to the chartcontrol
this.chartControl1.Series.Add(series1);
this.chartControl1.Series[0].Style.Symbol.Color = Color.Orange;

//To set the Range of PrimaryYAxis
this.chartControl1.PrimaryYAxis.RangeType = ChartAxisRangeType.Set;
//Range of PrimaryYAxis
this.chartControl1.PrimaryYAxis.Range = new MinMaxInfo(0, 15, 2);
//Title to be displayed along PrimaryXAxis
this.chartControl1.PrimaryXAxis.Title = "Size of Wings of a Bird";
//Title to be displayed along PrimaryYAxis
this.chartControl1.PrimaryYAxis.Title = "Age in Days";
//Visibility of Grid of PrimaryXAxis and PrimaryYAxis
this.chartControl1.PrimaryXAxis.DrawGrid = false;
this.chartControl1.PrimaryYAxis.DrawGrid = false;
this.chartControl1.PrimaryXAxis.ForeColor = Color.Green;
this.chartControl1.PrimaryYAxis.ForeColor = Color.Green;
}

Let me know if I am wrong in getting your requirement.

If I am wrong in getting you, could you also please provide me with some screenshots regarding your requirement so that it would help me to meet your requirement exactly.

Thanks & Regards,
Ramya.


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;