mschart

C# MSChart - charts area limits

家住魔仙堡 提交于 2019-12-19 11:51:35
问题 I have one Chart and three ChartArea that are aligned in view, zoom, cursor: this is my related previous post. All things works well except that the three ChartArea are not aligned at the beginning. Following an image of the problem: I think it depends from the digit's number of Y values axis. From some research I try the following configuration: // selezione e zoom dlChart.ChartAreas[VOLTAGE_AREA].CursorX.Interval = 1; dlChart.ChartAreas[VOLTAGE_AREA].CursorX.IsUserEnabled = true; dlChart

How to let user create Annotations on MSChart?

走远了吗. 提交于 2019-12-19 10:12:12
问题 How do you create an Annotation on-the-run and how do you enable end-user placement with Annotation.BeginPlacement() ? I've tried to do this in multiple ways, but cannot get it working. It should render itself in real-time after the BeginPlacement() has been called. Documentations on this subject is little to none - and mostly none - so I'm not able to find any help for this problem. What I've tried so far, is to create an annotation and place it with AnchorX/Y, set all Allow- flags to true

How to add more Y-axes to MSChart with different scale at left or right side

此生再无相见时 提交于 2019-12-19 09:58:04
问题 I want to add 3 Y-axes for the chart with different scales. I want to get one x axis and different y axis. I did it like below code but I want to show one y axis like in the 2nd image that I attached.. My C# code so far: private void checkBoxUseMultipleYAxis_CheckedChanged(object sender, EventArgs e) { if (checkBoxUseMultipleYAxis.Checked) { // Set custom chart area position chart1.ChartAreas["ChartArea1"].Position = new ElementPosition(25, 10, 68, 85); chart1.ChartAreas["ChartArea1"]

MS Chart with ASP.NET chart type “column” not showing axis x label if there are more than 9 bar in the chart

六眼飞鱼酱① 提交于 2019-12-18 03:21:25
问题 I have a problem with an MS Chart chart type column. If there are more than 9 bars in the chart, the axis-x labels won't show up properly, some of them just disappear. Here's my mark-up for the chart: <asp:Chart ID="chtNBAChampionships" runat="server"> <Series> <asp:Series Name="Championships" YValueType="Int32" Palette="Berry" ChartType="Column" ChartArea="MainChartArea" IsValueShownAsLabel="true"> <Points> <asp:DataPoint AxisLabel="Celtics" YValues="17" /> <asp:DataPoint AxisLabel="Lakers"

Chart Auto Scroll (Oscilloscope Effect)

浪尽此生 提交于 2019-12-17 21:29:32
问题 My issue is that whenever I add a point to the chart, it compresses all the points. Instead, I want it to auto scroll. Here are two .gifs to explain what my issue is What I have now What I want to achieve The code I have right now is DateTime dt; private void Form1_Load(object sender, EventArgs e) { timer1.Start(); } private void timer1_Tick(object sender, EventArgs e) { dt = DateTime.Now; if (checkBox1.Checked) { chart1.Series["Light"].Points.AddXY(dt.ToShortTimeString(), 1); } else { chart1

How to set values in x axis MSChart using C#

时间秒杀一切 提交于 2019-12-17 19:06:50
问题 I have these XY values: Series S1 = new Series() S1.Points.AddXY(9, 25); S1.Points.AddXY(10, 35); S1.Points.AddXY(11, 15); chart1.Series.Add(S1); but I need to show the X values in the graph like this: X="9-10" X="10-11" X="11-12" How can I achieve that? So far this is what I've found: and here is the code: private void Form1_Shown(object sender, EventArgs e) { chart1.ChartAreas[0].AxisX.Minimum = 7; chart1.ChartAreas[0].AxisX.Maximum = 15; Series S1 = new Series(); S1.Points.AddXY(9, 25); S1

MS Chart Rectangular Annotation width in percent and not pixel

╄→гoц情女王★ 提交于 2019-12-17 06:58:08
问题 why is it that the MS chart rectangular annotation width is in percent and not pixel like msdn says it is? https://msdn.microsoft.com/en-us/library/system.windows.forms.datavisualization.charting.annotation.width(v=vs.110).aspx This is what msdn says Gets or sets the width, in pixels, of an annotation. I'd like to set my width to be pixels like it states. Am I missing something here? 回答1: Congratulations, you have found a bug in the documentation! Easy to spot simply by following the link to

How to set MS Chart LegendItem image size

强颜欢笑 提交于 2019-12-14 03:14:38
问题 I use Image from Resources to LegendItem in WinForms var ImageName = "ImageName"; myChart.Images.Add(new NamedImage(ImageName, Resources.Image)); LegendItem legendItem = new LegendItem(); legendItem.Name = "legend text"; legendItem.Image = ImageName; myChart.Legends[Legend.Name].CustomItems.Add(legendItem); But the size of Image is too small. How can I change it? 回答1: You should use custom LegendCell in this case. This means you define the cells for your LegendItem specifying their properties

How To Customize ASP.NET Chart Databound To SqlDataSource

南笙酒味 提交于 2019-12-13 16:17:54
问题 I have an ASP Chart like this: I am not sure how I can make the labels for the values to appear vertical instead of being horizontal. I am not sure if this can be achieved by CSS as the resultant output is an image. All I have with me is the code which says something like this: Saw some similar question here: C# chart rotate labels, but it is for C# and the given solution has C# code. I am using ASP.NET VBScript and also I am not using any code other than the above mark-up. Also please advice

MSChart axis misplaced for huge charts

别等时光非礼了梦想. 提交于 2019-12-13 10:25:20
问题 i'm currently running into issues with MSChart, esp. a BarChart. The chart is meant to be exported and saved into an image file and has a huge amount of seperate bars to be shown, resulting in a height of 38960px. The problem: It seems like the height of the axis' label is calculated percentual with a minimum of 1 (and again with a minimum of 10px afterwards). This way the label is about 390px away from the chart ... To illustrate the issue, i set AxisX.Crossing = 0, so the axis should be