VS 2008 / Show The Data Either In Chart Control Or Gridview Control?
Feb 11, 2013
I have a simple .aspx page.
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 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.
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:
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 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 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).
I have a gridview that I loop through to get the x and y values of the chart control, and upon the first execution of this code, it looks great. But when the page posts back and it "refreshes" data, the original points on the chart control are still there, as well as the new values.
Is there any way to "delete" all data in the chart control to ensure this doesn't happen?
i have asp.net chart control and gridview control in updatepanle my issue is when i click on edit link in gridview my chart control is not displaying but when i refresh my page iam to see it why is so??
I have written a web usercontrol (ascx). Inside, there is a Panel that I want to show/hide on click of a hyperlink inside the usercontrol.
Normally, this is easy just by doing something like this (the onclick attribute is added to the hyperlink on prerender):
var PanelToShow = document.getElementById('<%=PanelInvoiceHasBeenCreated.ClientID %>'); if (PanelToHide != null) { PanelToHide.style.display = 'none'; }
but because the ascx control is held within the gridview, the above will assess all the controls (of which there are many in the gridview) with the name 'PanelInvoiceHasBeenCreated'. The only time it will work is when there is 1 row in the gridview. Currently, with my existing code, if I click the hyperlink in any row, it shows/hides the panel in the bottom row of the gridview!
Therefore, my question is how do I get the actual, unique ID I need to show/hide on the correct control in the correct row?
Have an application with several gridviews where user can enter query parameters for each grid view. I am using "DropDownList_SelectedIndexChanged" to call methods that will fill and show each grid view.
For some of these queries the processing time could be several seconds, so I thought I could use and display Ajax progress control.
Code:
<div> <asp:UpdatePanel ID="UpdatePanel1" runat="server"> <ContentTemplate> <asp:Label runat="server" ID="Label15" Text="Load in progress....." /> <img src="Icons/ajax-Loader.gif" alt="The spinner should be here" /> </ContentTemplate> </asp:UpdatePanel> </div>
How can I trigger progress control to show out of my selectedindexchanged events?
I have a gridview control on a .aspx page. It is a bound control. So basically I didn't have to write any code to pull the data from database and show it on the grid.
So far so good. But where is no data is not returned from the database, I want to display something on the page saying "No data returned". But I don't know which gridview control event gets fired so that I can write some code in it to check if the records returned are zero.
Protected Sub SQLDShowActionRef_Selected(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.SqlDataSourceStatusEventArgs) Handles SQLDShowActionRef.Selected
I'm working on building a an ASP.NET composite control that is a wrapper for a GridView object. I have been able to figure out how compose the control in order for the markup to appear correctly when added to an ASPX page. Now the issue I'm having is that when I drop an instance of the control on a form from the toolbox, I can't interact with the control using the functionality exposed by a GridView (e.g. columns editor, data source selector, etc.), and I don't see any design-time rendering of the child GridView control. What I would like to do is to basically forward the designer behavior of my composite control down to its child GridView control. I have experimented with implementing a custom designer class that inherits from GridViewDesigner that simply initializes itself using the GridView child of my composite control. However, this doesn't seem to work, as I encounter an "object reference not set to an instance of object" error at design time; I'm wondering if this is even the appropriate strategy to achieve what I'm looking for. how to enable GridView-like design time behavior in composite controls. I have scoured the Web looking for articles on how this is accomplished, but I've surprisingly found virtually no resources on the topic.
im trying to create simple pie chart using the MS Chart controls. When my pie chart gets rendered in the browser i get padding around the pie chart that i cant get rid of. i would like the pie chart to sit up against the edge of the image with no padding or margin. in my code below the padding is highlighted in blue. i.e Chart1.BackColor = System.Drawing.Color.Blue;
<script type="text/C#" runat="server"> protected void Page_Load(object sender, EventArgs e) { //Set the chart type Chart1.Series["Series1"].ChartType = SeriesChartType.Pie; //add points Chart1.Series["Series1"].Points.AddY(12); Chart1.Series["Series1"].Points.AddY(45); Chart1.Series["Series1"].Points.AddY(67); //set back color of chart object Chart1.BackColor = System.Drawing.Color.Blue; //set back color of chart area Chart1.ChartAreas["ChartArea1"].BackColor = System.Drawing.Color.Green; } </script> <asp:Chart ID="Chart1" runat="server"> <Series> <asp:Series Name="Series1" ChartType="Pie"> </asp:Series> </Series> <ChartAreas> <asp:ChartArea Name="ChartArea1"> </asp:ChartArea> </ChartAreas> </asp:Chart>