Forms Data Controls :: MS Chart Does Not Display All Fields Y
Jan 12, 2011
When I try to generate a StackedBar char, some Y fields are not displaying because of space. Example with following chart
Ex :columns in DataSource : 2,4,6,8,10
Columns displayed on chart : 2,6,10
I am new to asp.net. I am suppose to continue a project. The previous person has created a line chart and I have to create a bar chart. However I do not know how to create a bar chart. Could u email me for the code as I realise that I can't upload the files.
I have 2 MS Charts(OriginalChart, encryptedChart) which are working well. I spent hrs trying to set these charts so that they display the same AxisY value. Example, OriginalChart displaying max AxisY value 50 (this value may change depends on the data), I need the encryptedChart to display max AxisY value 50 (regardless of its data) as well, This would allow user to compare the differences in these chart more easily. Currently, my encryptedChart is showing 5 to 10 for the AxisY value. I tried most of the possibility to set below but no luck. Research on this also not much useful info (or I don't understand them.)
"encryptedChart.ChartAreas(0).AxisY.ScaleView.... = OriginalChart.ChartAreas(0).AxisY.ScaleView....." Below's my HTML code fyi. [Code]....
I have use chart controller in my web application but it display wrong percentages this are the value: TOTAL COST : 75000000000.00 LOYALTY DISCOUNT : 7500000000.00
When it display on pie chart it display TOTAL COST :90.91% and LOYALTY DISCOUNT=9.09% but it should be 90% and 10 % how can I correct it chtSavingBrekDown.Series["Series1"].Points.AddXY("Total Cost", totalCost); chtSavingBrekDown.Series["Series1"].Points.AddXY("Discounted Dolers", discountValue); chtSavingBrekDown.Series["Series1"].ChartType = SeriesChartType.Pie;// Set the Pie width //chtSavingBrekDown.Series["Series1"]["PointWidth"] = "0.5";// Show data points labels chtSavingBrekDown.Series["Series1"].IsVisibleInLegend = true; chtSavingBrekDown.Series["Series1"].LegendText = "#AXISLABEL"; chtSavingBrekDown.Series["Series1"].Label = "#PERCENT"; chtSavingBrekDown.Series["Series1"]["BarLabelStyle"] = "Center";// Show chart as 3D chtSavingBrekDown.ChartAreas["ChartArea1"].Area3DStyle.Enable3D = true;// Draw chart as 3D chtSavingBrekDown.Series["Series1"]["DrawingStyle"] = "Cylinder"; chtSavingBrekDown.Series["Series1"].Points[1].Color = System.Drawing.Color.Yellow; chtSavingBrekDown.Series["Series1"].Points[0].Color = System.Drawing.Color.Blue; chtSavingBrekDown.Series["Series1"].Points[1]["Exploded"] = "true"; chtSavingBrekDown.Legends[0].Enabled = true; chtSavingBrekDown.Titles[0].Text = "SAVING ESTIMATE BREAKDOWN";
I am using asp:chart control in my 3.5 application. My dataset have three columns i.e. Subject, Score, testDate. I am drawing the chart like this, [Code].... And my chart is displaying like this. And what I want is, the third column testDate should be displayed on the top of the series as follows.
I have a chart to display the percentage of available time for a machine, but it won't display all the labels. It will only display a select few, spread out evenly apart but I need it to show ALL of them. Here is how it's set up, however, I don't know what I would change in order for it to display all labels: [Code]....
I am working on charts with ms chart 3.5 control my question is I have to display legends of pie charts in tabular form. Which will contain the color used for different points and x values and y values. I managed to show the colors and x values but not able to show the y values. I am giving the code also. Example of x and y values are: xvalues- InCorrect YValue- 5 xvalues- Correct YValue- 10 xvalues- UnAttempted YValue- 15
Here is the code used to bind legend values.---- LegendCellColumn firstColumn = new LegendCellColumn(); firstColumn.ColumnType = LegendCellColumnType.SeriesSymbol; firstColumn.HeaderText = "Color"; firstColumn.HeaderBackColor = Color.WhiteSmoke; Chart1.Legends["Default"].CellColumns.Add(firstColumn); // Add second cell column LegendCellColumn secondColumn = new LegendCellColumn(); secondColumn.ColumnType = LegendCellColumnType.Text; secondColumn.HeaderText = "Name"; secondColumn.Text = "#LEGENDTEXT"; secondColumn.HeaderBackColor = Color.White; secondColumn.Alignment = System.Drawing.ContentAlignment.MiddleLeft; Chart1.Legends["Default"].CellColumns.Add(secondColumn); // Add header separator of type line Chart1.Legends["Default"].HeaderSeparator = LegendSeparatorStyle.Line; Chart1.Legends["Default"].HeaderSeparatorColor = Color.FromArgb(64, 64, 64, 64); // Add item column separator of type line Chart1.Legends["Default"].ItemColumnSeparator = LegendSeparatorStyle.Line; Chart1.Legends["Default"].ItemColumnSeparatorColor = Color.FromArgb(64, 64, 64, 64); // Set Min cell column attributes LegendCellColumn minColumn = new LegendCellColumn(); minColumn.Alignment = System.Drawing.ContentAlignment.MiddleLeft; minColumn.Text ="#TOTAL{N1}";
I want to show the individual value of each data point is there any idea how to show the Yvalue of each datapoints minColumn.HeaderText = "Questions"; minColumn.Name = "Questions"; minColumn.HeaderBackColor = Color.WhiteSmoke; Chart1.Legends["Default"].CellColumns.Add(minColumn);
I am populating data into formfields when i select checkbox in a grid view with the following code.I have 20 record set in database,Quotenumber(Main column) starts 3001 ,3002,3003..........3020.I am allowing duplicate entries meant that i have 4 recordset only on 3000 quotenumber like wise i may have 3or more record set on 3010,problem here is when i select first one of 3000(Quotenumber) it is supposed to populate the record set of first one of 3000 but only last one of 3000(quotenumber) is getting populated into form field.Can any one provide solution to this.
Code for Populating Data into formfield when you select checkbox ina grid view.
Dim indx As Integer Dim connectionString As String = "Database=xxxx;" & "Data Source=localhost;" & "User Id=root;Password=xxxx" Dim query As String = "SELECT QuoteNumber,Revision,Vendor,PartNumber FROM quotes order by QuoteNumber" Dim connection As New MySqlConnection(connectionString) Dim da As New MySqlDataAdapter(query, connection) Dim ds As New DataSet() Dim myAdapter As New MySqlDataAdapter myAdapter = New MySqlDataAdapter(query, connection) myAdapter.Fill(ds, "QUOTES") Dim dt As DataTable = New DataTable() 'DataTable Initializes a new instance of the DataTable class with no arguments. da.Fill(dt) Dim checkbox As CheckBox = CType(sender, CheckBox) checkbox.Checked = True Dim row As GridViewRow = CType(checkbox.NamingContainer, GridViewRow) Dim i As Integer For i = 0 To dt.Rows.Count - 1 Step i + 1 If (dt.Rows(i)("QuoteNumber").ToString = row.Cells(1).Text.ToString()) Then indx = i End If Next DDQuote.Text = dt.Rows(indx)("QuoteNumber").ToString() txtRev.Text = dt.Rows(indx)("Revision").ToString() DDVend.Text = dt.Rows(indx)("Vendor").ToString() txtPart.Text = dt.Rows(indx)("PartNumber").ToString()
I have a listview control bound to an SqlDataSource. As part of the formatting I want to add a title to the data returned from my database. For instance if the data base returns a phone number I want to add 'Tel.' first. However I do not want to diplay this title if the datafield is empty. Here is what I have done so far.
Business is a phone number. If the data field contains a number I get: Tel. 1234 123456. If the field is empty I get Tel. If Business is null I want nothing dsplayed, how do I do this?
I'm trying to display data from this table in a gridview using template fields. Here's an example of a label in my item template
[Code]....
When i bind data to this grid view, i get an error saying column "PM 2" was not found. For some reason, the program is dropping the .5 from the column name. I am exploring the possibility of replacing the number with alphabets only but this may not be possible as the end user may not find it user friendly. Is there a way for me to get around this problem? I get a similar problem with B(a)p, it drops everything after the B. Any ideas on how to get the gridview to bind column names with special chars in it?
I have a grid view attached to a custom query. The query selects data and the address data in the database is split into different fields like street_address1, mail_zip etc. etc. What I would like to do is display all the address data fields in my database in one field on the Grid View.
I am trying to reconstruct a date/time period from five data elements Year, StartMonth, StartDate, EndMonth, EndDate If the event starts on June 5 and ends on June 6, 2010 - The label would read June 5 thru 6, 2010. If the event starts on June 30 and ends on July 2, 2010 - the Label would read June 30 thru July 2, 2010. and if the event starts on June 5 and ends on June 5, 2010 - The label would read June 5, 2010. I've tried a few variations without success. This one comes closest to what I'm aiming for.
Am using datalist to create a kinsd of message board, in the back end am having two tables one for the parent comment , and other for the child comments
The data source is extracted by LINQ to SQL with the load option , so I get everthing when I debug on the code behind , and I can see all the fields each parent comment and the child comments.
the problem is with binding the data on the disply for example all the parent table fildes can be rendred without any problems:
<%# DataBinder.Eval(Container.DataItem, "comment1Parent") %>; "showing me the orginal post"
Problem here:
<%# DataBinder.Eval(Container.DataItem, "Childcomment") %> is not rendred and I got this error msg:
DataBinding: 'DataAccessLayer.Comment' does not contain a property with the name 'childComment'. In the debug I navigate to the childComment and this is its HTML visualisar:
new System.Linq.SystemCore_EnumerableDebugView<DataAccessLayer.Comment>(((ASP.usercontrols_comments_ascx)this).Comments)).Items[0]._comments_Replies.entities.items[0].childComment
I have an issue in using dot net chart control. In chart last column is not completely shown which give bad appearance and on right side of chart it looks like TickMark are enabled. I set MajorTickMark of AxisY2 disabled but still tick marks on right side.
I have a drop downlist,and next to it there is an MS bar chart.i want to change the datate of the MS chart ,once the user selects another year from the dropdownlist.
When the page loads ,the chart displays the default year(2011) and it works.The problem is that is does not change the data when you select another year from the dropdownlist.
I am using MS Chart control (3.5), and have a requirement where I need to display 2 pie charts. The datapoints for the pie charts is set programatically. My doubts are as follows:
1. Can I display both the pie charts in a single chart control and area, or do I have to use two controls? (Currently I am using two controls)
2. How can I maintain the same size for both the pie charts? This is my main concern, since the pie sizes keep changing, depending on the number of datapoints. I tried using custom properties like "MinimumRelativePieSize", but it's not working.
i'm trying to create a stacked bar chart on a vb web form using vs2010.My data source returns:
Error in Functionality Awaiting on Supplier
1IMT IssuesmActive6
IMT Issues,Awaiting on Supplier
2,IMT Issues,Awaiting on User 4
IMT Issues Closed 120
Login / Password Active
But I can't get this into a stacked chart. I know I must have to do quite a bit of work declaring what the series are and soforth, or having a different dataset but can't find any documentation on it.A link to some documentation or an example of a stacked chart from an sql datasource would be much appreciated.
I started using the awesome chart controls with my asp.net apps recently and so far they've been nothing short of breath taking. Right now I have a weird problem, on the first load of my page, the chart control appears correctly and the tooltip is correct, however, when I update it with new data, the chart displays correctly, but the tooltips are for the previous set of data.
I hope this makes sense. The first time I load the chart, the pie chart segments and tooltips are correct, after a partial postback (to get the new data), the pie chart segments are correct but the tooltips are for the previous data set.
Basically once the tooltips are set the first time, they can't be updated after that without a full page postback.
Here's how I set the tooltip:
[Code]....
Anyone else noticed this behaviour and have a work around?
Currently my only workaround is to check for a partial postback and not render the tooltip, which I'd rather not do as the tooltip display actual statistical data as opposed to the pie itself (which uses percentages).