mschart

MSCHART with a transparent background

久未见 提交于 2021-02-11 15:01:18
问题 Any whay to make the background transparent of the MSCHART? thank's 回答1: You need to set the Chart background colour AND the ChartArea colour. Chart c = new Chart(); c.BackColor = Color.Transparent; c.ChartAreas.Add(new ChartArea("ChartArea1")); c.ChartAreas[0].BackColor = Color.Transparent; 回答2: maybe this help you in your .aspx file where your chart code is, look for the asp:ChartArea tag. then add BackColor = "Transparent". <asp:ChartArea Name="ChartArea1" BackColor="Transparent" </asp

MS Charts: Getting the real InnerPlotPosition?

▼魔方 西西 提交于 2021-02-07 20:24:19
问题 When creating charts using Microsoft Charts, I need to get the exact position of the grid on the chart. This page says -- as I understand it -- that this can be achieved with InnerPlotPosition. However, when using this property, I get the following rectangle: This rectangle seems to scale with the chart size; when resizing the chart, the rectangle shrinks, but still keeps on the outside of the grid on all edges. I have tried both adding and multiplying the sizes with a constant, but no single

How can I make a gannt chart with overlapping points in winforms

怎甘沉沦 提交于 2021-02-02 09:55:08
问题 There is a time interval like 8:00-17:00.In this time interval happens a task several times for example 9:00-9:20 , 11:00-12:00, 13:00-13:20.I want to make a chart in winforms to show when the task happens like this. So can I do this with DEV gannt chart? Or is there any Control I can use to make it? I want to do this in winforms. 回答1: This is quite easy with MSChart and the ChartType RangeBar. Here is an example: To get this result you need to Add an MSChart control from the data toolbox Add

How can I make a gannt chart with overlapping points in winforms

淺唱寂寞╮ 提交于 2021-02-02 09:53:48
问题 There is a time interval like 8:00-17:00.In this time interval happens a task several times for example 9:00-9:20 , 11:00-12:00, 13:00-13:20.I want to make a chart in winforms to show when the task happens like this. So can I do this with DEV gannt chart? Or is there any Control I can use to make it? I want to do this in winforms. 回答1: This is quite easy with MSChart and the ChartType RangeBar. Here is an example: To get this result you need to Add an MSChart control from the data toolbox Add

how to temporarily pause drawing updates of a realtime data chart

我是研究僧i 提交于 2021-01-27 17:51:03
问题 I would like a “Pause” the chart's series updates to do some job (like i have a button when i click it will suspend the chart update and then when I click resume button, it will update all suspended point in series. I know about chart1.Series.SuspendUpdates(); but it does not seem to work with me. I use mschart sample -- realtime data (thread safe). Here is the full code public partial class RealTimeSample : Form { public RealTimeSample() { InitializeComponent(); } private Thread

How to bind a dictionary to MSChart

邮差的信 提交于 2020-05-26 05:59:46
问题 I am trying to bind Dictionary to a Chart, Below is the code IDictionary<double, double> dict1 = new Dictionary<double, double>(); IList<double> list1 = new List<double>(); public Form1() { InitializeComponent(); InitialiseDictionary(); Series ser1 = new Series("My Series", 10); chart1.Series.Add(ser1); chart1.DataSource = dict1; chart1.DataBind(); } private void InitialiseDictionary() { for (int i = 0, j = 1; i < 1000;i = i + 100 , j=j+10) dict1.Add(i , j); } But I don't see the Chart or

Place label at center of doughnut chart

妖精的绣舞 提交于 2020-05-18 19:50:43
问题 I've developed a web page with MS Chart (.net framework 2.0, visual studio 2010). Like this picture, I have to put the percentage label inside the doughnut. What can I do? Please help me. Thanks in advance. 回答1: Use the PrePaint event to add a TextAnnotation to your chart: protected void Chart1_PrePaint(object sender, ChartPaintEventArgs e) { if (e.ChartElement is ChartArea) { var ta = new TextAnnotation(); ta.Text = "81%"; ta.Width = e.Position.Width; ta.Height = e.Position.Height; ta.X = e

How to draw a non-continous series

时光怂恿深爱的人放手 提交于 2020-05-08 17:03:50
问题 I'm trying to figure out how to draw a discontinued (non-continous) series. This is the code for the series: Chart.Series["Limit"].Points.AddXY(20000, 30); Chart.Series["Limit"].Points.AddXY(1000000, 30); //no plotting wanted here Chart.Series["Limit"].Points.AddXY(1500000, 40); Chart.Series["Limit"].Points.AddXY(2500000, 40); How do I stop it from plotting certain points, like the diagonal line shown in the image below? 回答1: You can visually break up a line chart by inserting an invisible

How To Customize ASP.NET Chart Using A Theme File

半腔热情 提交于 2020-03-04 12:36:24
问题 i want to create a line Chart, where at the x-axis are the dates and on the y-axis there are the positions green(at the position of 0), yellow (1) and red (2). How can i achieve this? At the moment there are just the numbers. I tried it with XML, but i dont know much about it and its a little bit confusing. Can i access the single elements of the y-axis with this and convert them to text? Can i somehow implement an if else method within the Chart.AddSeries Method at axisLabel? Controller /

How To Customize ASP.NET Chart Using A Theme File

孤人 提交于 2020-03-04 12:36:21
问题 i want to create a line Chart, where at the x-axis are the dates and on the y-axis there are the positions green(at the position of 0), yellow (1) and red (2). How can i achieve this? At the moment there are just the numbers. I tried it with XML, but i dont know much about it and its a little bit confusing. Can i access the single elements of the y-axis with this and convert them to text? Can i somehow implement an if else method within the Chart.AddSeries Method at axisLabel? Controller /