Click here to Skip to main content
15,891,372 members
Everything / MSChart

MSChart

MSChart

Great Reads

by JL Doty
Overriding the quirky zoom in MS Chart, and scaling axes with nice round numbers
by Code Artist
Implementation of DynamicX-Largest-Triangle-Three-Bucket for chart data plotting
by Darryl Bryk
A C# class for utilizing the Microsoft chart control to graph data as a line series is described.
by MohamedKamalPharm, MohamedSabryBakry
We used VB.NET and MS Chart in a Web Application to extract the data from a user-uploaded or online database, create life tables using the Kaplan-Meier Formula and plot the survival curve. The whole operation is performed through a user friendly web-based wizard.

Latest Articles

by Code Artist
Implementation of DynamicX-Largest-Triangle-Three-Bucket for chart data plotting
by JL Doty
Overriding the quirky zoom in MS Chart, and scaling axes with nice round numbers
by Darryl Bryk
A C# class for utilizing the Microsoft chart control to graph data as a line series is described.
by MohamedKamalPharm, MohamedSabryBakry
We used VB.NET and MS Chart in a Web Application to extract the data from a user-uploaded or online database, create life tables using the Kaplan-Meier Formula and plot the survival curve. The whole operation is performed through a user friendly web-based wizard.

All Articles

Sort by Score

MSChart 

11 Oct 2018 by JL Doty
Overriding the quirky zoom in MS Chart, and scaling axes with nice round numbers
1 Dec 2015 by George Jonsson
You need to sit down and think about what you are doing.Your method serialPort_DataReceived is, most likely, triggered every time a byte is received.So when a byte is received, what do you do?Well, if you expect a certain number of bytes to be received you can read the available...
21 Oct 2023 by Code Artist
Implementation of DynamicX-Largest-Triangle-Three-Bucket for chart data plotting
5 Nov 2011 by palraj001
Hi, try this.. Place Chart in DIV tag.
5 Nov 2011 by koolprasad2003
print MSChart in web application[^]print ms chart through IE[^]
25 Feb 2012 by ready to learn
I found the answer myself .I changed the line: this.Controls.AddRange(new System.Windows.Forms.Control[] { this.chart1 });to the line: this.Controls.AddRange(new System.Windows.Forms.Control[] { chart1}); and the linethis.chart1.Legends.Add(Legend1);to the...
9 May 2012 by Pandvi
Hi, I find this on msdn, it seems quite close to your suitation. Please refer:http://social.msdn.microsoft.com/Forums/ar/MSWinWebChart/thread/01b14116-a03f-4eca-aaf8-edead25f656d[^]
30 Oct 2012 by sruthyharidas
yea it works but I have to set the tooltip as y axis value .. How to do that?
28 Nov 2012 by WSourabh2590
you can use thismyMSChart.Series["SeriesName"].ToolTip="#VAL";
8 Oct 2015 by Sergey Alexandrovich Kryukov
Apparently, you are doing it wrong. You have to support drawing/redrawing permanently, by doing all rendering in your overridden OnPaint method or Paint handler. For further detail, please see my past answers:What kind of playful method is Paint? (DataGridViewImageCell.Paint(...))[^],How to...
12 Apr 2016 by Darryl Bryk
A C# class for utilizing the Microsoft chart control to graph data as a line series is described.
13 Jun 2018 by Ralf Meier
You stuck because the MSChart isn't able do do what you want to have. With the ChartArea\Area3DStyle you can tell the Chart that you like to have different (2D-) Series displayed behind each other - but that isn't the thing you want to have. For this you need another kind of Chart ... Here is a...
13 Aug 2023 by Graeme_Grant
For graphing, look at GitHub - kirsan31/winforms-datavisualization: System.Windows.Forms.DataVisualization provides charting for WinForms applications.[^]. They have many different charts, including a simple bar chart. Download the code, run the...
20 Sep 2011 by Sunita Khilar
Hello experts,Presently I am working on VB2008 project. I need to plot collected data on Ms Chart.Data is huge. Arrays generated from this data are having minimum size of 2999000.There are such 32 arrays to be plotted on Ms chart.I could plot these data successfully but the problem is...
5 Nov 2011 by Supriya Srivastav
Dear All,How to print MS Chart in ASP.Net.Can anybody give me some idea to do so,I searched alot but all solutions available are for windows application not for Web.Looking for the valuable solutions of yours,Thanks in advanceSupriya
5 Nov 2011 by Supriya Srivastav
Dear All, How can I change default alignment of columns in 3-D chart from z-axix to x-axis in MS Chart in ASP.Net. Looking for your solutions, Thanks in advanceSupriya
5 Nov 2011 by RaisKazi
From the below Question-Answer discussion on the same topic, It seems like you will have to output you MS-Chart to PDF format using "iTextSharp".http://forums.asp.net/t/1600687.aspx/1
6 Nov 2011 by amitit1989
Chart1.ChartAr...
19 Dec 2011 by Md Athaulla
I’m using column chart (Bar chart) of MSChart in my vb.net project. I need to do following 2 things.1. I need to customize y-axis labels. I want to add string "R+" before y axis labels2. I need to change the color of the bar if it is negative.Any help will be highly...
20 Dec 2011 by #realJSOP
Changing the color of the bar isn't generally done. If the color red represents a data point, it should be red whether it's positive or negative. Otherwise the user won't be able to find it, and it changes meaning of the data.
3 Jan 2012 by Supriya Srivastav
Dear All,I am using MS Chart in my application.My problem is that when data increases in volume details of x-axis(text or heading) misses as some of the text is shown and some is missed.Plz. help.looking for your valuable solution.Thanks in advance,Supriya
23 Feb 2012 by ready to learn
Hi,I'm trying to draw a chart on my form by using MsChart.I have used the following codes: Legend Legend1; // Create a Chart Chart chart1 = new Chart(); // Create Chart Area ChartArea chartArea1 = new ChartArea(); // Add Chart...
28 Feb 2012 by ready to learn
hi,I have 3 question related to mschart.1)how can I have x_value and y_value of my special points as lables( I select the points in the code).I want the user to be able to see them.2)how can I have the values of selected points by user?3)How can I add my two different series(series1 and...
9 Mar 2012 by ready to learn
Hi,I have made a chart on my form.I want to set the scale of x axis as logrithim.I mean that I have several point added to my chart.When showing the chart,I want the x_axis be shown in logarithim scale.How can I do that?
9 Mar 2012 by Ganesan Senthilvel
Here is the sample code for logrithm on x axisDim axisID As VtChAxisId' Change both x and y axes to Logarithmic scale for 2D' Line chart.MSChart1.chartType = VtChChartType2dLineFor axisID = VtChAxisIdX To VtChAxisIdYWith MSChart1.Plot.Axis(axisID).AxisScale.Type =...
10 Mar 2012 by ready to learn
I used the code:mychart.AxisX.IsLogarithmic = true;
1 May 2012 by Aequitas82
This should fix the problem..AxisX.IsMarginVisible = False
8 May 2012 by Pritesh Aryan
I'm using the Chart Controls in VS2008 that is MSChart Control. Can anyone please help with any advice as to how to avoid overlapping my pie labels? I can't use "Outside" labels because it makes the pie so tiny. I have tried Smart Label properties as shown...
17 May 2012 by honeyashu
May be this Article could Help :).. See the Tool Tip section or download the source for referenceA Guide to using MSChart for .NET[^]honeyashu
22 Aug 2012 by joe_j
Hi,I'm using MS chart control that comes with VS2010.I have one StackedColumn chart with 4 Bars.I have adjusted the inner position property of the chart area, however, the chart still keeps some amount of blank space on the left and right which is actually wasting the space on the...
30 Oct 2012 by sruthyharidas
How to show label value as tooltip in MSChart ?
30 Oct 2012 by Sandeep Mewara
Are you not able to use the following properties for tooltip?myMSChart.Series["SeriesName"].LabelToolTipORmyMSChart.Series["SeriesName"].ToolTip
31 Oct 2012 by sruthyharidas
How to set spacing for columns in column chart ??
25 Nov 2012 by WSourabh2590
hi there,i'm using visual studio charts control n trying to implement a tooltip drill down(a new chart in tool tip of chart sector).When i hover mouse over a particular chart sector there is a jscript error:object expected;what can be possible problems..thanks & regards in advance
26 Nov 2012 by VishwaKL
use can use inbuilt Tool tip felicity, and use ScriptManager on the page where you have designed for the MS Chart
30 Nov 2012 by srdusad
Hi,I have created a horizontal BAR CHART using mschart control in vs2010 . I want to show y-axis label inside the chart instead of at the bottom.For that i had used the crossing to move axis with its labels. Due to this , the axis labels and majorgridlines overlapped .but i need to show...
29 Nov 2012 by srdusad
Hi sruthyharidas,try to use the following line in your code//Width of bar or column in pixels Chart1.Series[0]["PixelPointWidth"] = "15";
29 Nov 2012 by srdusad
Hi,try the below piece of code.. //To position Inner plotting area in % of chart Chart1.ChartAreas[0].InnerPlotPosition.Auto = false; Chart1.ChartAreas[0].InnerPlotPosition.Width = 100; Chart1.ChartAreas[0].InnerPlotPosition.Height = 100;
18 Apr 2013 by Erik Rude
OK - try this:There are a few (1000) articles on this site about Charts and using MS Charts. Search articles on that, read them see if you find what you are after.Your question is a good requirement description, but without a contract you will struggle to get anyone to write this amount of...
23 Apr 2013 by Prashant Kore
I am using MsChart control for a charting application. In that, i am using MouseMove event to display the x-axis dynamic data on graph. Code snippet is as below -try { //if(EventChart.ChartAreas[0].AxisX.PixelPositionToValue(e.Location.X) == EventChart.Series[0].ChartArea) if (e.Location.X...
9 May 2013 by GTBrodie
I am trying to capture the results of Financial Formulas in my VB.Net 2012 program.I have just learned (self taught) VB.net using Visual studio 2012 Express. Almost all of the examples I have found are older C# which do not convert into 2012. I am having trouble manually translating...
17 Jul 2013 by M@n!sh
I am using Microsoft chart. in my chart I want Date and time wise point but date coming properly but time is not display properly.IQueryable incidents = new IncidentManager().GetIncidentsByDate(startDate, endDate); ...
12 Aug 2013 by TSivakumar1991
HI,I want to Switch the Axis in Mschart like in the MsExcel.My datatable: http://i.stack.imgur.com/mNHhD.png[^]Chart Control image:http://i.stack.imgur.com/78ySN.png[^]When i click switch row/Column in MsExcel it Swap the axis like this.Swapped Chart Control...
26 Aug 2013 by praveen_adb
HI All i am binding Jan2013 to Dec 2013 Values for Asp.NET chart control(Line Graph), if there is no value for the month of Aug 2013 line are not joining between Jul2013 to Sep 2013. Can any one tell what is the property i need to set to join points the charts even if...
10 Oct 2013 by Chintu Bhardwaj
I'm running with a weird issue. I'm using a mschart type bubble graph for showing my components of machine depreciation. Where it works fine.But in another place where I'm skipping plotting of points, it's getting cascaded. I find my values for x axis are overridden by the left values and...
11 Oct 2013 by diradoni
Hello, I've just found this forum from my friend.to the point..i have a datadgrid which filled with data in Visual studio 2008. I wanna make chart (line/linear) using MSChart. I already downloaded and installed MSChart and Add on for VS 2008, but I don't know how to make it.I'm newbie to...
11 Oct 2013 by diradoni
I have searched on google but with my language and have nothing but the Social MSDN site not searched yet.I haven't red FAQ, I'm so sorry.seriously really sorry..but big thanks for answered my question..
29 Nov 2018 by SrinivasEng
I have a chart in my application, in which, the points are like time and a value pair. Time On X-axis, and value on y-axis. and for each second or 100 mille seconds a new point will be added to the chart. Here the problem is when a new point added, the graph points gets closer, but i...
29 Jan 2014 by cioto
Hi everybody,I am developing a VB.NET application with visual Studio Express on Windows 7.In this app (1 form app) I have one mschart graph made up from 3 chartareas, one below the others. Data is read from an UDP port, and the 3 chart areas are aligned and "in sync" (they are 3...
12 Mar 2014 by Sergey Alexandrovich Kryukov
This is not such a simple problem that it may seem.First of all, you need to totally isolate the analysis of data, and charts, data presentation. Data presentation should only be used as output, never be a source of data. So, let's forget about charts and focus on data.I don't know the...
17 Sep 2014 by Member 10822218
Hi, I'm making a MsChart real time graph function.Everything is fine. but, when I maximize the Chart window after minimize it there is a problem.I hide the Chart window by pressing the minimize button which is on the upper right side of the window. It still receives the real time data well...
11 Dec 2014 by Member 11107452
HelloWe have an custom charting implementation using the mschart api 3.5. Everything works great with the exception of the scrollbar. We have our own implementation of a google maps type mouse zoom and drag and it works great.Problem is, You cannot properly drag using the scrollbar and...
8 Aug 2015 by neda_h
I have some information about Medicines that a patient use during a period of time, every Medicine has a StartDate and an EndDate ,I want to show them in a chart so the doctor can see the medicines in a day and duration each medicine used, what kind of Chart should I use to show them ? (ASP.Net...
8 Aug 2015 by User 11060979
I would choose a bar Chart, where abscissa reflects the period and the Ordinate lists the meds.Med1 ¦********************* ****** ¦Med2 ¦ ****** *********** ¦Med3 ¦ **************************...
8 Oct 2015 by Jesús Álvarez
I have problem whit the chart when i resize other controls, i have a seri with N point added to my chart, then i paint a line graph.DrawLine(new Pen(Color.Yellow, 1), point3, point4); when i resize other control o de form this line disapear, then when i zom in the chart appear again. I need to...
8 Oct 2015 by Jesús Álvarez
I plot several point in my chart ( 4 series x 1200points per serie), when i do that for 10 times (loop) my win form stop responding, only work the chart, progressbar stoip, timer elapsed time stop, buttons and panels stop, all GUI stop running.When a resize de form to smallest dimension, all...
28 Oct 2015 by sachinw
In the image given below, I want one Legends/Datapoints to be displayed on one single line. Here in the image you could see that due to long text the portion of the legend is shifting to second line. I want the entire text of a datapoint on single line.e.g. Child Care - Rs. 4,003 (13.70%) on...
2 Dec 2015 by Jesús Álvarez
that is all right, thanks to George, the problem was, coding and decoding, the hardware send me an byte array, when i read from de serial, i recieve this, when i use readLine whitought any decoding, i lost the order of bytes, the solution, encoding the port, and decoding the string when we use...
27 Dec 2015 by OranM
I would like to add the data table values as part of the .NET MS Chart Object.i know that i can add datagrid as a separate control as a different element but then it will not part of the chart image and its not good for me.
14 Jul 2016 by Member 10476889
Hi, i'm trying to use PolygonAnnotation to draw a Polygon within a chart where i have four points that i would like to use as vertex. These Points are putted at runtime in a Bubble SeriesSystem.Windows.Forms.DataVisualization.Charting.Series serieSA =...
24 Aug 2016 by Member 12271328
hello. i set the Axis X maximum value like under the source. float x = 0; float y = 0; for (int i = 0; i
24 Aug 2016 by Patrice T
Did you noticed that you set Maximum 2 times?chart1.ChartAreas[0].AxisX.Maximum = 1;chart1.ChartAreas[0].AxisX.Maximum = 4;I guess you meantchart1.ChartAreas[0].AxisX.Minimum = 1;chart1.ChartAreas[0].AxisX.Maximum = 4;
21 Jan 2017 by OriginalGriff
That's not a good idea: there are quite a few problems with your code here.Trivial stuff: string filepath = args[i]; //Store each file path into an arrayNo, it doesn't. And a wrong comment is much, much worse than no comment.The main problem is that you aren't considering what happens if...
3 Jan 2018 by Member 13606520
I have scenario where i have 2 or more series and single chart area( 3D style). When im adding more than 1000 data points for both the series, Im not able to the see the distance between both the series data points. If it has 100 points for both the series, it shows some space between data...
13 Jun 2018 by creizlein
I am trying to use the mschart control for WinForms to create a ZXY 3D area graph similar as the one shown in the picture above, but I was not able to find any specific example on how to do it. http://i66.tinypic.com/2cdg9pj.png or https://s33.postimg.cc/3tn1r5kcf/snap0191.png I have checked...
29 Nov 2018 by Member 14071843
I realise it has been 5 years since OP posted, but in case someone else stumbles upon this post with the same problem. This is an example of what I used in one of my projects: Chart1.Series("LoadCell").Points.AddY(receivedData) Chart1.ResetAutoValues() If...
21 Feb 2021 by Member 15079730
I am using Asp.NET Mvc frame work. WIth my code I am trying to show data week wise on Chart. I am fairly new to Chart, and also new to GroupBy Week Wise Data. Kindly share yous help so that I can generate Report for Data as per Week
13 Aug 2023 by PaulaJoannAllen
I am trying to do a simple bar chart from data in a DGV, "datagridview control". I can get the data from the DGV control, and I have attempted to show it on the chart, but all I get is a white area where the chart should be. I have no idea what I...
9 Nov 2012 by MohamedKamalPharm, MohamedSabryBakry
We used VB.NET and MS Chart in a Web Application to extract the data from a user-uploaded or online database, create life tables using the Kaplan-Meier Formula and plot the survival curve. The whole operation is performed through a user friendly web-based wizard.
11 Oct 2013 by Pheonyx
Firstly welcome to the forum, have you checked the FAQ (I suggest you do it is full of helpful information).With regards to your issue, what have you tried? Have you attempted any examples with using the MSChart component? If not, I would suggest you have a look for, and try, some as they will...
14 May 2012 by Dave Kreskowiak
The chart control you're using has to support this feature. So, what chart control are you using?
1 Jun 2011 by BobJanova
I'm using the MS Chart controls for .Net 3.5, and trying to use its automatic axis view selection feature: mainChartArea.CursorX.IsUserSelectionEnabled = mainChartArea.CursorY.IsUserSelectionEnabled = true;This works okay, but on the X axis, the visible range has an extra margin on both...
12 Jun 2012 by krunal25
Hello everyone,I have made a website in asp.net which has MS chart controls in it, now when i run the website using the development server the charts gets visible, but when i host the website on server on IIS the charts are not visible when i browse the website from different machine...I...
17 May 2012 by ready to learn
Hi.I have a chart in my project.I want the user to see the value of each point in a tooltip ,when hovering the mouse on it.How can I do that?Edit:Some One sent me the following codes,I tried but I couldn't improve it.Point? prevPosition = null; ToolTip tooltip = new ToolTip(); void...
2 Dec 2015 by Jesús Álvarez
I am reading from hardware device continuosly, the problem is the device stop sending data, i think is problem of my datareceive event but i am not sure of that.serialPort.PortName = porta;serialPort.BaudRate = 115200;serialPort.DataBits = 8;serialPort.ReadBufferSize =...
13 Aug 2023 by Dave Kreskowiak
Are you really trying to use Excel Interop to create a chart in your app or are you trying to create the chart in an Excel workbook? If in your own app, you don't need Excel. You can use the charting classes in the...
18 Apr 2013 by Prashant Kore
Hi there,Can somebody please help me out... i am new to C# application and i don't know if following is possible...i am currently developing an application in C#, which needs to have a graphical representation of some data. The time stamp of that data is recorded in certain device, i have to...
9 May 2012 by A-s-h-l-e-y
As far as i know the only solution to prevent this would be to use a coulor coded chart key instead.
27 May 2014 by linydeepak
void chart1_GetToolTipText(object sender, ToolTipEventArgs e) { HitTestResult hitTestResult = chart1.HitTest(e.X, e.Y); if (hitTestResult.PointIndex >= 0 ) if( hitTestResult.ChartElementType == ChartElementType.DataPoint) { ...
12 Mar 2014 by jp.51@hotmail.com
HelloI have a program in C# that takes two vectors X (t) and Y (mV), and plots using MSChart Visual Studio 2010. The plotted graph shows several peaks, would automatically identify the following graph:-> Beginning and end of each peak;-> Identify on the program the number of peaks;->...
22 Jan 2017 by Javiertxl
My C# classes will create a GUI that takes in csv files and plot a line graph accordingly (Refer to: C# Read string from CSV file and plot line graph for graph code[^]). Currently, my graphs are plotted and saved using the GUI file dialog.What I am trying to do now is to read, plot and save...
21 Jan 2017 by Richard MacCutchan
See Environment.GetCommandLineArgs Method (System)[^].
11 Apr 2017 by Member 13120628
I am new to ms chart i am trying to build column chart form jquery(HighChart) and Mschart control using vs 2010 using same data I am able to build column chart in jquery(high chart) but getting Null reference exception on ms chart control in my build_chart() function Chart1.DataSource =...
3 Feb 2023 by Joan M
Hello all, Using Windows 11 x64, and I must maintain an old project. I can't open dialogs with that OCX control embedded, but the application compiles and links properly and I can even execute the built exe without issues. I have already copied...
3 Feb 2023 by Joan M
WOW! Visual Studio Feedback[^] It looks like that making VS a 64 bits native program killed the opportunity to have 32 bits libraries, ocx... inside the program. Given MSCHRT20.OCX is a Microsoft old chart thing, I think the best I can do is...