mschart

How to set chart type to pie

两盒软妹~` 提交于 2019-12-10 04:10:29
问题 When I do it without putting chart type is working fine but when I set it to pie its not working correct. It put all series name as Point 1 the pie is only 1 blue piece (one circle) and it show only first point (Value). foreach (var tag in tags) { HtmlNode tagname = tag.SelectSingleNode("a"); HtmlNode tagcount = tag.SelectSingleNode("span/span"); chart1.Series.Add(tagname.InnerText); chart1.Series[x].Points.AddY(int.Parse(tagcount.InnerText)); chart1.Series[x].IsValueShownAsLabel = true;

WPF Toolkit Chart: Positions of Data Point Visualization shifted when changing data values

风流意气都作罢 提交于 2019-12-10 02:56:37
问题 I use a WPF Toolkit chart to display several line series with data points. I have created styles for the LineDataPoints that use a canvas on which symbols (like a circle) are drawn. Here's one of the style definitions: <Style x:Key="CircleDataPointStyleRed" TargetType="chartingToolkit:LineDataPoint"> <Setter Property="Background" Value="Red" /> <Setter Property="IsTabStop" Value="False" /> <Setter Property="Width" Value="10" /> <Setter Property="Height" Value="10" /> <Setter Property=

MSChart: ChartImageHandler pros/cons of the different storage settings

蹲街弑〆低调 提交于 2019-12-10 02:52:40
问题 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? 回答1: 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. 回答2: The two links below have some good general

C# dashed lines in chart series?

不羁岁月 提交于 2019-12-10 01:00:38
问题 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. 回答1: See the DataPointCustomProperties.BorderDashStyle property. For example... _chart.Series[1].Color =

Can I display a message if MS Chart Control has no data?

人盡茶涼 提交于 2019-12-09 15:17:51
问题 Is there a way to display a "default" message on a MS Chart Control if there is no data to chart? I have a chart, with some controls that allow the user to pick various date ranges. If there is no data to be charted in that date range, it currently just displays nothing (or at least it shows the legend, and background, but that's it.) I want there to be a message saying "no data for this period" or something instead. Thanks, Ben 回答1: Building on Chris's response, here's a more complete

Microsoft Charting, MVC 3 and Razor

橙三吉。 提交于 2019-12-09 04:03:55
问题 Related to This topic I wonder if anyone has made the Microsoft Charting library working with Asp MVC 3 and Razor. I know about the new chart helper introduced, but since that is very limited that is not really an option. To create an action method that returns an image is also easy enough, but since all interactivity breaks down (even just simple tooltips for the bars in a bar chart) this method has several limitations. This example is probably the most helpful article I have found, but I

Hide labels in pie charts (MS Chart for .Net)

半腔热情 提交于 2019-12-09 02:19:39
问题 I can't seem to find the property that controls visibility of labels in pie charts. I need to turn the labels off as the information is available in the legend. Anyone know what property I can use in code behind? I tried setting the series labels to nothing Chart1.Series[i].Label = string.Empty; but the labels seem to show up anyway. 回答1: Chart1.Series[i]["PieLabelStyle"] = "Disabled"; works too, and doesn't need to be set for each datapoint. 回答2: Found the answer here: http://social.msdn

MSCharts custom panning

北战南征 提交于 2019-12-08 12:56:56
问题 I'm trying to make my own custom panning feature in MSCharts (Microsoft Charting Controls). I realize there is an extension for zooming and panning, however it doesn't have a lot of the capabilities that I want it to have. Here is the panning function that I have currently: //handles mouse panning, will pan while mouse left click if held down.. private int prevx = 0; private int prevy = 0; private void Mouse_Up(object sender, MouseEventArgs e) { //reset previous x and y on mouse click up if

Enable scrolling in x-axis for chart control

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-08 07:38:55
问题 I can't seem to enable a scroll bar on x-axis. I'm using the code below to generate the chart. List<int> xVal = new List<int>(); List<int> yVal = new List<int>(); for (int i = 0; i <= maxQueuetime ; i++) { xVal.Add(i); yVal.Add(graph2Yaxis[i]); } chart1.ChartAreas["ChartArea1"].AxisX.Interval = 1; chart1.Series[0]["PointWidth"] = "1"; chart1.Series[0].Points.DataBindXY(xVal, yVal); 回答1: This will let the user drag over a portion of the chart he want to see and then a scrollbar will show up:

ASP.NET Chart Control errors in Event Viewer

元气小坏坏 提交于 2019-12-08 05:42:19
问题 I have been using the ASP.NET chart controls for a while on win2k3 (32bit) setups without any issue but have noticed that on our new win2k8 (64bit) box I am getting a warning message showing up in the event viewer from the chart control. In my web.config file I have the following tag telling the Chart Control where I can store the Temp Files: <add key="ChartImageHandler" value="storage=file;timeout=20;dir=c:\TempImageFiles\;" /> Below is the warning message produced by the control: Event code