C# - MS Chart Control Scale - Line Graph Show 12 Months?
Jun 7, 2010
On my X Axis, I have months. The chart shows up to 11 points, i.e. Jan - Nov of the same year, but when I add 12 points (Jan - Dec), it will do an auto label thing and change the interval for every 4 months.
How can I change the graph so that it shows 12 months before it does the auto labels?
Here is the server control code I am currently using.
I have to desing line chart graph in .rdlc report, can you please help me, i have decimal values on Y-Axis and date time values on X-Axis , i have two series of product, according to product value during specific time i need to display line graph for each product.please do needfull to me.
I have Bar Chart with two Series on X axis one for Month and Other for Productvalue now if the product value is Zero then nothing is displaying on graph is there any way to show the atleast value of the product as integer Zero.
I am creating a bar graph and line graph. I am using 2 dropdown list for the date and category. The user can chose the date and category that he want to view. I also have a upload button for the user to upload the excel file and dispaly the data in girdview.
However i have error whenever i want to view the graphs.. I have upload my code in the attachment. Pls take a look. I do the coding invb.
I have a AJAX calendar control it shows selection for specific date.
However I have an input control to key in just month. Can we modify the behavior of Calendar control to show only month/year selection but not the dates ?
I been stack for the last few days trying to figure out the SilverLight 4 LineSeries graph, for some strange reason the graph being displayed but the line not being displayed. I am pretty sure that my mistake is something very basic but I been straggling to pinpoint the problem by myself.Bellow is the code that I having problem with.
<asp:Chart ID="ChartAlertes" runat="server" Width="500px"> <Titles> <asp:Title Text="Nombre d'alertes et leurs status en fonction des filtres renseignés" BorderColor="Black" Alignment="TopCenter"> </asp:Title> </Titles>
[code]...
I display 2 Points (2 columns) in the Chart Control and I change the color of the each Points with :
But sometimes, I have only 1 Point to display or nothing at all on the Chart. So I'd like to check If there are some Points before to put the color of each Point.
For example :
if (ChartAlertes.Series[0].Empty == false) { //... }
but the graph shows on the X axis only that 18, 38, 41
for (int k = 0; k < semaine.Count(); k++) { Chart4.Series["Nombre de points terminés"].Points.AddXY(nbr_num_semaine_av[k], nbr_points_Termin[k]); Chart4.Series["Nombre Total d'element"].Points.AddXY(nbr_num_semaine_av[k], nbr_element.Count()); } Chart4.Series["Nombre de points terminés"].ChartType = SeriesChartType.Line; Chart4.Series["Nombre Total d'element"].ChartType = SeriesChartType.Line; Chart4.Series["Nombre de points terminés"].IsXValueIndexed = true; Chart4.Visible = true;
I am currently making a line chart of Ajax control toolkit referring to an article [URL] .....
It works fines as described. My question is how to reverse Y axis of the line chart.
I need to place 1 (not 0) at the top of Y axis and biggest number near the bottom with some margin from axis X. The described chart is biggest number neat the top and 0 at the bottom.
I work with a charline (ajax control toolkit) and I want to manipulate from code behind but I do not really know how! I have an example but the data are in the aspx code.
<ajaxToolkit:LineChart ID="LineChart1" runat="server" ChartWidth="450" ChartHeight="300" ChartType="Basic" ChartTitle="United States versus European Widget Production" CategoriesAxis="2007,2008,2009,2010,2011,2012" ChartTitleColor="#0E426C" CategoryAxisLineColor="#D08AD9"
I want to show the data either in Chart control or Gridview control. When the user selects an option to see the data either in chart control or grid view control, that specific control has to show up and other control has to become invisible.
So far, I am able to populate data successfully in the chart control. If the user chooses "Grid view" option, how can I show the data in grid view control in the same location. I don't want the gridview control to be shown in a pop up window or any other window.
I am using the new ASP control "Chart", but I have some problems with it: I can't see anything when I execute the aspx. The data is binded to a ObjectDataSource, like this:
My whole project is about reading data from textfile(the readings is separated by delimiters) and plotting out the graph. But somehow i am meetnig some problems as i think my method is wrong... It's something like this..what should i do?
Private Sub CreateChart() 'Create some dummy data 'Dim random As New Random() 'For pointIndex As Integer = 0 To 9 ' Chart1.Series("Series1").Points.AddY(random.[Next](20, 100)) Dim h, g As String Try Dim lc As New StreamReader("C:Tempdatalogger" & date1.ToString & "int_ana_" + date1.ToString + ".txt") Dim ff As String '= Label5.Text & ":00" 'Dim sr As String = lc.ReadToEnd Dim line6 = lc.ReadLine Do While Not line6 Is Nothing 'loop until end of file If IsNumeric(line6.Chars(0)) Then Dim fields5() = Split(line6, ";") 'Dim fields5() = Split(s.Substring(sr.IndexOf(ff)), ";") h += fields5(0) + vbCr g += fields5(3) + vbCr End If line6 = lc.ReadLine Loop Catch ex As Exception End Try For pointIndex As Double = 0.0 To 2.0 Chart1.Series("Series1").Points.AddXY(h, g) Next 'line display chart Chart1.Series("Series1").ChartType = SeriesChartType.Line 'set the bar width Chart1.Series("Series1")("PointWidth") = "0.1" 'Show Data points labels Chart1.Series("Series1").IsValueShownAsLabel = True 'Set data points label style Chart1.Series("Series1")("BarLabelStyle") = "Center" 'Draw Chart as 3D Cyclinder Chart1.Series("Series1")("DrawingStyle") = "Cylinder" End Sub '****End of Graph
I have requirement to show two calander months in same JavaScript pop up. when user click start date, then open popup window then it should display the current month and next month. then user has to chanse select either this month or next month date in the same window.
I have a simple chart control on my form. it displays data fine in X and Y axis. On X axis, i have time period (1 day,1 week, to 30 Years- total of 27 points on x axis) and Y axis has interest rate.
when the cursor is moved in the chart area, I want to show the exact value of Y axis. Just like yahoo finance shows when we click on a graph of a stock symbol. Say on my chart, when user hovers on say 2 Y on the graph, it should show the exact interest rate which is on the Y axis.
Is it possible to customize Ajax Calender Extender control ?. I want it to disable some dates and show only four month (Jan,Feb,Nov,Dec) while it load.
I'm building a pretty simple application where a user can enter/modify/delete data from a table. Right now, the only field is month, which I'm storing as an integer (1-12). The actual table has more fields but I'm simplifying for the purposes of this question.I have the entry part. For modifying, I've set up a gridview with an 'Edit' button:
[Code]....
The code is putting the gridview row into edit mode. Now, I want to show a dropdownlist of months so the user can select the new month. Also, I would like the dropdownlist to default to the value in the database. I can't figure out how to bind months to the dropdown list ddlMonth.
This seems like it should be extremely simple. I have a list of x,y cords in SQL table that I am pulling out into a reader. I am then trying to bind my points to a point (have to use it since I can't find scatter) chart control.
Where Xpos = the x cord column and Ypos = the y cord column.The chart generates but my problem is that I am getting multiple x values that are the same. For example I have (67, 45) and (67,54).I would think there would be one x value for 67 with the two points on it, at 45 and at 54.Instead I am getting 2 x values listed, both for 67, one with 45 and one with 54.
Just as a test I listed these values in excel (in 2 columns) and did a scatter plot and it generated what I expected (2 items plotted on the same x value, one above the other. Is there a setting I am missing or does the chart control "Point" not have this capability.
I have a graph created with MS Chart like the following picture. As you can see the vertical lines are messed up with value of the top of each bar. Here's the mark-up for the graph:
In the "LineChart", everytime last "y-axis" point is going out of graph (i.e., somewhere in the footer of x-axis)
X-axis Y-axis
3.4 5.2
5.3 7
2 8.7
1) like in above table, all the point will plot except the last x-axis and y-axis points. Also, y-axis value = 8.7 goes away from graph and comes in the footer of x-axis line.
2) like if x-axis = 3, y-axis=6, then 6 goes out of the graph and comes in footer of x-axis line.
But this problem occurs only when Im using SELECT query for a "particular Id" i.e.,
SELECT x,y from Table1 where Id='Gaug9' and DeletionDate is null
If I will remove where Id=' ' then it will work fine. But I need to plot graph based on particular Id's.