mschart

MSChart: ChartImageHandler pros/cons of the different storage settings

随声附和 提交于 2019-12-05 01:39:12
I'm using the MSChart Control in a Web Project. I saw that there are 3 different storage mode settings: file/memory/session. I couldn't find any information about the pros/cons or the impact of the settings. Anyone can help? I've found that Scott Mitchell has the best write up on this topic: Using Microsoft's Chart Controls in an ASP.NET Application: Rendering the Chart . VERY useful info. I'd recommend reading the whole multipart series. The two links below have some good general information about the ImageHandler and also list the author of it, as well as a link to the Chart forum. This

C# dashed lines in chart series?

风流意气都作罢 提交于 2019-12-04 23:38:31
I'm using the Chart control from .net 4.0 in my C# WinForms app. I have two series' of data displayed as line graphs. I'm graphing basically a supply and demand as a function of time. I want the demand to be a solid line of some colour, and the supply to be a dashed line of the same colour. I can set the colour fine, but I can't find anywhere where I can set the line style to be dashed. See the DataPointCustomProperties.BorderDashStyle property. For example... _chart.Series[1].Color = Color.Blue; _chart.Series[0].Color = Color.Blue; _chart.Series[0].BorderWidth = 3; _chart.Series[0]

Microsoft chart control zoom out and panning

岁酱吖の 提交于 2019-12-04 22:19:21
I have been playing with Ms chart control zoom feature. One thing I have not been able to do is to do Zoom out. Although we can Zoom in, there is not Zoom out feature. I could only reset the zoom that is not what i am looking for. Any one here who has done Zoom out for MS hart controls?? Any suggestions. Also any pointers to how to implement panning for Ms charts? Thanks The zoom out is done one the axis scrollbar! Also there is nothing to stop you setting the zoom diagrammatically: chart1.ChartAreas[0].AxisX.ScaleView.Zoom(-10, 110); chart1.ChartAreas[0].AxisY.ScaleView.Zoom(-10, 20); the

How to displace the origin of the Y axis on a polar Mschart?

余生颓废 提交于 2019-12-04 19:22:31
Im working on a polar chart with mschart, and I need to make this "hole" on the middle of the chart. I mean, i need the "0" of the Y axis not to be on the center. I saw this plot somewhere on stackoverflow. It´s exactly what i need, how can I do that? In order to create a radar plot that look like the provided example // disable grid a long X chart1.ChartAreas[0].AxisX.MajorGrid.Enabled = false; chart1.ChartAreas[0].AxisX.MajorTickMark.Enabled = false; // set Y axis chart1.ChartAreas[0].AxisY.Minimum = -20; // creates the 'hole' by setting min Y chart1.ChartAreas[0].AxisY.MajorGrid

Disabling/Fixing Code Analysis warnings from .Designer.cs files

落花浮王杯 提交于 2019-12-04 17:09:13
问题 I am using DataVisualization.Charting.Chart extensively, and for the most part it is working. However, I've been running Code Analysis frequently, and have all my own warnings taken care of. But, there are about 30 CA2000 (object not disposed along all exception paths) in the *.Designer.cs files that use the charting. The Designer files are generating pretty much all the charting code, and almost all the charting elements implement IDisposable . I have "Suppress results from generated code"

Get Mouse click event from Microsoft Chart Control click on data marker

被刻印的时光 ゝ 提交于 2019-12-04 16:43:22
I have a .net 4.0 point chart in my app. I would like to capture the mouse click on a data marker. When the user clicks on a particular point, I'd like to go to the row in the bound table where the data came from. Is this functionality built-in to the .net chart control? EDIT: I found that I may have actually wanted the cursor position value rather than requiring the user to click on a specific data point. Once I have the cursor location, that value can be used to find the row in the dataset that is closest to the mouse click. I accepted the answer to my original question below as it was a

How does one set an image as or along a chart axis?

让人想犯罪 __ 提交于 2019-12-04 12:07:01
I am trying to use a colored spectrum strip as an axis for a chart. The idea is to match the color on the image with its associated wavelength along the x-axis at the bottom. The strip needs to change in size to match changes of the chart area and expand and contract sections to match scroll-zooming in the chart area. I have tried using image annotations but as the chart area changes, the annotation dimensions remain fixed. Also, the scroll zooming that focuses in on mouse position obviously has no effect on the annotation. The approach that came closest was using the image as a background for

MS Chart Control Zoom MinSize issue

谁说胖子不能爱 提交于 2019-12-04 10:32:42
问题 I'm implementing a scatter plot using the MS Chart Control .NET 3.5, WinForms, C#. My x-axis data is DateTime and noticed I couldn't zoom in smaller than a resolution of 1 day, despite setting the ScaleView as follows: chart1.ChartAreas["MyChart"].AxisX.ScaleView.MinSize = 4; chart1.ChartAreas["MyChart"].AxisX.ScaleView.MinSizeType = DateTimeIntervalType.Hours; Has anyone else had this issue? Any ideas? 回答1: Figured this out... perhaps I didn't RTFM close enough, but it wasn't obvious from

MSChart / Asp.net Charts don't show tooltips

旧时模样 提交于 2019-12-04 05:27:20
问题 I have a dashboard page in which I am using various MSCharts. I have a class defined for each one of these charts, in which I am defining Tooltips of the Series in that chart like below when I run through each chart class and define its Series properties. Series[0].ToolTip = "Date = #VALX{d}\nTotal Qty Shipped = #VALY"; The problem I'm seeing is because there are multiple charts on the page, each with its own chart area. The only chart that shows a tooltip is the first chart that has one

How to modify C# Chart control chartArea percentages

寵の児 提交于 2019-12-04 05:14:37
If I have a chart control with 2 chartAreas in it, the chart control by default puts the chartAreas on top of each other makes each area take 50% of the available size of the chart control. Is there a way to change the chartAreas' percent so that I could say, have the top chart take 75% of the area, and the bottom chart take 25%? So, I eventually found it, but I do not think that it is very well documented. There each chartArea has the property ChartArea.Position . This property of the type ElementPosition , and contains 4 properties that are relevant to this problem. Height: Gets or sets the