Click here to Skip to main content
15,902,112 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi,

I am using the following code to plot the graph for the response times of messages

The code is working fine. But I want to plot the messages passing from bus 1 to bus 2 in half space of graph and messages passing from bus 1 to bus 3 in another half space of the graph with same scale
But the following code plots all the messages in same graph
Can anyone have suggestion about this???

C#
if (numofBuses == "3")
            {

                foreach (GatewayMessageDetails GWmsgDetails in GWmsgDetailsList)
                {
                    if (GWmsgDetails.LatencyBusOnetoBusTwo == 0)
                    {

                        int MsgNo = (GWmsgDetailsList.IndexOf(GWmsgDetails) + 1);

                        pltOutput.Series[Constants.LEGEND_CYCLETIME].Points.AddXY(MsgNo, GWmsgDetails.TotalDeadLineTimeOfBusOnetoBusTwo);
                        pltOutput.Series[Constants.LEGEND_RT_SUCCESS].Points.AddXY(MsgNo, GWmsgDetails.ResponseTimeBusOnetoBusTwo);
                        pltOutput.Series[Constants.LEGEND_LATENCY].Points.AddXY(MsgNo, GWmsgDetails.LatencyBusOnetoBusTwo);

                        
                     
                    }

                   
                    if (GWmsgDetails.LatencyBusOnetoBusThree == 0)
                    {
                   

                        int MsgNo = (GWmsgDetailsList.IndexOf(GWmsgDetails) + 1);

                        pltOutput.Series[Constants.LEGEND_CYCLETIME].Points.AddXY(MsgNo, GWmsgDetails.TotalDeadLineTimeOfBusOnetoBusThree);
                        pltOutput.Series[Constants.LEGEND_RT_SUCCESS].Points.AddXY(MsgNo, GWmsgDetails.ResponseTimeBusOnetoBusThree);
                        pltOutput.Series[Constants.LEGEND_LATENCY].Points.AddXY(MsgNo, GWmsgDetails.LatencyBusOnetoBusThree);

                        // Set Plot Type for each series
                        pltOutput.Series[Constants.LEGEND_CYCLETIME].ChartType = SeriesChartType.Point;
                        pltOutput.Series[Constants.LEGEND_LATENCY].ChartType = SeriesChartType.Point;
                        pltOutput.Series[Constants.LEGEND_RT_SUCCESS].ChartType = SeriesChartType.Point;


                      

                   

                }
            }
Posted
Updated 2-Apr-14 3:02am
v5

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900