简体   繁体   English

如何在Visual Studio中制作噪声标准曲线的图形,使其可以动态调整大小?

[英]How can a graph in visual studio for Noise Criteria Curve be made that can be re-sized dynamically?

Here is a rework of my question. 这是我的问题的重做。 Since it hasn't been answered. 由于尚未得到答复。

How can this graph be made in visual studio that allows for it to be re-sized in a non web based application? 如何在Visual Studio中制作图,以允许在非基于Web的应用程序中调整图的大小? I have tried with WPF applications previously. 我以前尝试过WPF应用程序。 At the current time the graph that is made is static and all points are plotted based on where it is in the window. 目前,生成的图形是静态的,并且根据其在窗口中的位置绘制所有点。

Issues that I can not seem to address: 我似乎无法解决的问题:

  • X axis is not constant and I can not set variables appropriately X轴不是恒定的,我无法适当地设置变量
  • There are many labels for NC and no program I found allows for multiple label classes ie NC labels are labeled separately from measurements(squares and lines in link pic) NC有很多标签,我发现没有程序允许使用多个标签类别,即NC标签与测量值分开标记(链接图片中的正方形和线条)
  • Graph does not grow when making window bigger because it is drawn for each individual line not in graph formatting language 当增大窗口时,图形不会增长,因为它是针对每一行绘制的,而不是使用图形格式语言

Infragistics has some nice charts, but the documentation is not great and the web service often has trouble pulling up pages. Infragistics有一些不错的图表,但是文档不是很好,Web服务通常在拉动页面时遇到麻烦。

A few things first: - I used Visual Studio 2008 - You have to install the infragistic tools before you will see the chart option available - After tools are installed you will have NetAdvantage tab in Toolbox; 首先要注意以下几点:-我使用了Visual Studio 2008-必须先安装基础设施工具,然后才能看到可用的图表选项-安装工具后,您将在“工具箱”中具有“ NetAdvantage”选项卡; I used UltraChart These are needed: using Infragistics.UltraChart.Resources.Appearance; 我使用了UltraChart,这些是必需的:Infragistics.UltraChart.Resources.Appearance; using Infragistics.UltraChart.Shared.Styles; 使用Infragistics.UltraChart.Shared.Styles;

Some of the code: 一些代码:

DataTable mydata = new DataTable();
        // Define the columns and their names
        mydata.Columns.Add("Series Labels", typeof(string));
        mydata.Columns.Add("63", typeof(int));
        mydata.Columns.Add("125", typeof(int));
        mydata.Columns.Add("250", typeof(int));
        mydata.Columns.Add("500", typeof(int));
        mydata.Columns.Add("1k", typeof(int));
        mydata.Columns.Add("2k", typeof(int));
        mydata.Columns.Add("4k", typeof(int));
        // Add the rows of data
        mydata.Rows.Add(new Object[] { "RC 50", 70, 65, 60, 55, 50, 45, 40 });
        mydata.Rows.Add(new Object[] { "RC 45", 65, 60, 55, 50, 45, 40, 35 });
        mydata.Rows.Add(new Object[] { "RC 40", 60, 55, 50, 45, 40, 35, 30 });
        mydata.Rows.Add(new Object[] { "RC 35", 55, 50, 45, 40, 35, 30, 25 });
        mydata.Rows.Add(new Object[] { "RC 30", 50, 45, 40, 35, 30, 25, 20 });
        mydata.Rows.Add(new Object[] { "RC 25", 45, 40, 35, 30, 25, 20, 15 });
        mydata.Rows.Add(new Object[] { "User Input", userInput[0], userInput[1], userInput[2], userInput[3], userInput[4], userInput[5], userInput[6] });
        mydata.Rows.Add(new Object[] { "Rumble Limit", speechInterferenceLine + 25, speechInterferenceLine + 20, speechInterferenceLine + 15, speechInterferenceLine + 10, null, null, null });
        mydata.Rows.Add(new Object[] { "Hissy Limit", null, null, null, null, speechInterferenceLine + 3, speechInterferenceLine + -2, speechInterferenceLine - 7 });
        mydata.Rows.Add(new Object[] { "Reference Line", speechInterferenceLine + 20, speechInterferenceLine + 15, speechInterferenceLine + 10, speechInterferenceLine + 5, speechInterferenceLine, speechInterferenceLine - 5, speechInterferenceLine - 10 });

Hope this helps someone. 希望这对某人有帮助。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 根据容器大小调整文本大小 - Re-sizing Text According to Re-sized Container 在WPF中调整窗口大小时,如何获取列表视图以自动调整高度 - How to get List-views to automatically adjust height when the window is re-sized in WPF 可以在Visual Studio 2013中发布ClickOnce特定配置选项 - Can publish options for ClickOnce be made configuration specific in Visual Studio 2013 Visual Studio中的Crystal Reports-边距可以动态更改吗? - Crystal Reports in Visual Studio - Can margins be dynamically changed? 如何在Visual Studio 2012中动态加载另一个项目中的类? - How can I dynamically load classes from another project within Visual Studio 2012? 如何从动态制作的texbox中获取文本? - How can I get the text from a texbox that is dynamically made? 如何连接到Visual Studio中的数据库 - How can I connect to a database in Visual Studio 我可以将在Visual Studio 2012中开发的C#Windows应用程序作为便携式应用程序制作吗? - Can I make an application made as a C# Windows Application developed in Visual Studio 2012 as a portable application? 无法启动服务,错误 1053,在 Visual Studio、c# 中制作 - Can't start service, error 1053, made in Visual Studio, c# 即使我添加了对它的引用并确保它是公开的,Visual Studio也找不到控制器 - Visual studio can't find a controller even though I have added a reference to it and made sure it is public
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM