.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Chart Control Legend

Posted By:      Posted Date: October 27, 2010    Points: 0   Category :ASP.Net

Here is my dilemna. I am using a Chart Control, and I have 2 series. In my case 1 for month and 1 for year. The problem is when the chart control is displayed during run time for some reason the legend has 4 entries 1 says Mont, 1 says Year, 1 says Series 1, and 1 says series 2. My question is why are there 4 entries for the legend? Thanks for any Help. It would be Greatly Appreciated.

View Complete Post

More Related Resource Links

How do I add a legend to an ASP.NET 3.5 chart control?


Is there a way to add a legend to the chart it creates? I have created a line chart and by default it has created different colors for the different y - axis data.

I would like a legend on the side that displays what data goes with which line color.

Thank You.

using jquery tooltip with asp:Chart control


I'm trying to use qtip (jquery plugin) instead of the standard tooltip control provided for the asp:Chart. I think the best way to do this is with an img map, though I don't know how to implement it. Does anyone know how to implement the img map for an asp:Chart?

WPF Chart Control

Hi,I'm trying to locate the WPF chart control that Microsoft treated as an intern project a while back: http://channel9.msdn.com/ShowPost.aspx?PostID=232493  The reason that I'm interested is that I'm in the process of taking a Windows Forms graph control (think of a line graph versus a bar chart) and converting it to be a WPF one . and would be very interested in taking a look at what those two interns had done . to try and determine best practices and the right approach for our new WPF graph control. I contacted Kevin Moore and he thought that this component was getting pretty close to being released to the public. Anyone know the current status of it? Thanks, Cory

Chart control with sqldatasource?

Hi,I am working with chart controls in VS 2010. I have used sqldatasource. I want to populate select values from sqldatasource and display it on the chart controls.According to the chart samples: http://code.msdn.microsoft.com/mschart/Release/ProjectReleases.aspx?ReleaseId=4418the chart controls are databound in the page_load event. Then in which page event should I select data from sqldatasource?Code for sqldatasource selection will also be appreciated.Regards,ap.

Chart Control

I have a chart control in  my web page which is working fine on my local machine but the time I deploy my site on server, the chart control is causing prob........... I installed seperate exe for chart control...and copy dll as well but still error continues......can anybody help me?

Chart Control 3.5 - X-axis Labels

I have a fairly basic line graph which is bound to a SQLDataSource control.  The graph displays perfectly, but I want the labels on the X-axis to display vertically rather than horizontally.I have used the following code to try and do this but it is having no effect:<AxisX Title="Patient Safety Submissions" IsLabelAutoFit="True">    <LabelStyle Angle="90" interval="1" /></AxisX>Can anyone help?Here is the complete code for my chart:<asp:Chart ID="chrtHHcompliance" runat="server" DataSourceID="sqlHHcompliance" Width="1000px">                    <Titles>                        <asp:Title Font="Microsoft Sans Serif, 12pt, style=Bold, Underline"                                    Name="Title1" Text="Hand Hygiene Weekly Percentage Compliance">                 &nbs

How to draw Triangle in ASP.NET Chart Control

Hi I am looking for a control that can draw a very customized chart in ASP.NET.  The chart comprises: 1. A closed triangle, or polygon, shaded, drawn according to a fixed set of xy vertices. 2. A series of x,y points plotted on top of the triangle or polygon. I thought the chart Control wasthe best, but I can't figure out how to draw the close triangle or polygon. Is GDI+ the better way? Thanks   Alan

Printing MS Chart Control C# ASP.NET

I found a pretty good post on how to create a Print Helper class to print controls but am having quite a bit of difficulty getting it to work with MS Chart controls. Just to make sure the code worked in general, I used it with a drop down list control and it worked just fine. I tried placing the chart control within a panel and used the panel as the control to print, to no avail. Here is the code for the PrintHelper class I found: public class PrintHelper { public PrintHelper() { } public static void PrintWebControl(Control ctrl) { PrintWebControl(ctrl, string.Empty); } public static void PrintWebControl(Control ctrl, string Script) { StringWriter stringWrite = new StringWriter(); System.Web.UI.HtmlTextWriter htmlWrite = new System.Web.UI.HtmlTextWriter(stringWrite); if (ctrl is WebControl) { Unit w = new Unit(691, UnitType.Pixel); ((WebControl)ctrl).Width = w; } Page pg = new Page(); pg.EnableEventValidation = false; if (Script != string.Empty) //if (Script == string.Empty) { pg.ClientScript.RegisterStartupScript(pg.GetType(), "PrintJavaScript", Script); } HtmlForm frm = new HtmlForm(); pg.Controls.Add(frm); frm.Attributes.Add("runat", "server"); frm.Controls.Add(ctrl);

How to align data in Chart legend in SSRS 2008?

Hi,I have created a chart of type 3D pie.  I put a String field for Category and Sum(numeric field) for Data.I wanted to show the legend as Category field and Data field and it's displaying as i set.Now how to make alignment of Data in legend, so that my numeric fields should align Right and String field should align Left.  I can make whole legend alignment but I want to make only the numeric field in the legend to align Right.Is it possible or there any work around?Please let me know.

Pie Chart - Fixed Value Legend

Hi All, I have a problem with Pie Charts in Reporting Services which i cant seem to find a solution for. My Pie chart is displaying the percentage of priorities for certain events for each month (See sample data below). As the priority bands are fixed (i.e an event can either be priority 1, 2 or 3), what i would like to do is show each priority in the Legend of each pie chart, regardless of whether that month contains and data for that priority. I would also like to specify a colour for each priority so that the legend for each months pie chart would show Priority 1 (Red), Priority 2 (Green) and Priority 3 (Blue).   Month - Priority 1 - Priority 2 - Priority 3 June - 5 - 2 - 3 July - 5 - 0 - 5 Aug - 0 - 10 - 0   Currently the legends for the above data would show:   June - Priority 1 (Red), Priority 2(Green), Priority 3(Blue) July - Priority 1 (Red), Priority 3(Green) August - Priority 2 (Red)   As mentioned above this omits the priorities which have a 0 value for that month, meaning when viewing the three rendered pie charts, the colours of each priority will potentially change. I hope ive explained the situation well enough, and if anyone can offer a solution or point me in the right direction id be very apprechiative.   Thanks, Sam.

GridView data to Chart Control


I have a GridView that is filled with databound data.  My problem is that I have a template field that uses the index + 1 for the gridview to give each record a unique number.  Then with this Gridview, with BoundFields and TemplateFields, I want to have this data to be the data for the chart control series.  How exactly is the best way to go about this?

Thanks in advance. :)

MS Chart control used in sharepoint webpart


Hello all,

I am using MS Chart control on sharepoint site. But i want to attach scrollbar to x and y axis .

Is there any way to attach scrollbar?

Chart Control getting numbers from GridView, but just duplicates


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 can't seem to find any resources to help me out with this.

Thanks in advance. :)

Chart Control - Dashboards


What is the status of Microsoft ehancing the Chart Control to do dashboards, easily.


how to show specific data label or legend in the line chart


I have a line chart with date (X axis) for average numbers. I wanted to show only one number for the month at the chart or legend area. But i can show or hide whole data labels. Is it possible to have an expression box in chart area?

Thanks in advance,


Chart Control


I have never been so frustrated. I have a Chart Control working that has one datapoint seies. However when I try to run one that has two series in the collection I keep getting the run time error "Additional information: A chart element with the name 'Week' could not be found in the 'SeriesCollection'." This is a problem because I have checked everything. I have named an item named Week in the SeriesCollections.Is there another setting that I need to be aware of . Please I need help. Thanks In Advance.

ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend