如何在两个不同的图中绘制消息 [英] How can I plot the messages in two different graphs

查看:86
本文介绍了如何在两个不同的图中绘制消息的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述





我使用以下代码绘制消息响应时间图表



代码工作正常。但我想绘制从图1的半空间中的总线1到总线2的消息以及在相同比例的图形的另一半空间中从总线1传递到总线3的消息

但是以下代码绘制同一图表中的所有消息

任何人都可以对此提出建议???



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???

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;


                      

                   

                }
            }

推荐答案

这篇关于如何在两个不同的图中绘制消息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆