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

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

Creating a new Chart Object Inherited from the base chart class with New Initial Settings

Posted By:      Posted Date: May 22, 2011    Points: 0   Category :Windows Application

I'm creating a new chart object andI want to modify some of the members based on ways that I perfer to use the tool.

At present when I drag and drop my new chart object onto a form, it comes in with the same initial values as the original chart object.

How do I change these initial values?

For example the ChartAreas Collection comes populated with "ChartArea1." I'd like to change this to always say "MyChartArea" along with my specific properties pre-populated (e.g. BorderWidth= 2).

Does anyone know how to do this?

View Complete Post

More Related Resource Links

Need help in creating a Waterfall Chart



I have a requirement where in which I need to create a waterfall chart. In this chart we need the sales value for a Brand for two years, (say 2010 and 2009) and also need to plot the growth of the various sub-brands that come under that brand. Some dummy data to explain my scenario follows.

  MAT 09 MAT 10
Brand 1400

Add a click event handler to a Chart object


Is it possible to add a click event handler to one object in an EXCEL chart?

I would like to run some code, when a user clicks on specific sector of a doughnut chart.


dougnutSectorOne_Click (object sender, eventargs e)

// runs if sector one is clicked


dougnutSectorTwo_Click (....)



is that possible in WPF?




Creating my first chart in asp.net 0_o


This is the query and a visual representation on that i want to it to look like but i cant seem to make it work right.

this is just to show a relationship to how 2009 sales are to 2010 sales via graph

I opened ASP.net and dragged a chart and sqldatasource. put my query in the sqldatasource, tied them together, and now im kind of lost, ive looked around and seen that you have to tie data to the x,y values but im not sure what values to tie.

i guess months to x value and load_year to y value?

but then i dont think it will show $ value correct 0_o im completely lost, anyone can help ??


chart object in toolbox vs 2010



I am trying to use the chart object provided in vs 2010. 

Specifically, I am trying to use the chart object to create a web part.

I noticed that the chart object did not appear in the toolbox when I opened it. I found a link that suggested I run an install program to add the chart object in. I now have the chart object appearing in the toolbox, but when I attempt to drag it onto the form I keep getting messages about "Error Creating Control" - Object reference not set to an instance of an object.

Where should I go from here? Is the chart a bit unstable? Do I need to reinstall from elsewhere?




.Net class hierarchy chart

I was wondering why a class hierarchy chart is no longer included with Microsoft help(as it was in C++/MFC days).  Does anyone know where there would be a .NET hierarchy chart ? Thanks

Creating a Simple Class in C#

The second article in the C# Object-Oriented Programming tutorial describes how classes are created in C# and how behaviour, in the form of publicly visible and private, hidden methods can be added. This demonstrates some of the uses of encapsulation

Chart Tutorial

The AxisTitle class declares properties that define the common appearance settings of a title which is displayed by a particular axis.

Properties exposed via the AxisTitle class allow you to customize common title attributes, such as:

* the axis title's text (Title.Text),
* the color and font settings of the title's text (TitleBase.TextColor and TitleBase.Font),
* apply antialising (smoothing) to the title's text (TitleBase.Antialiasing),
* the alignment of the axis title (Alignment),
* the visibility of the axis title (TitleBase.Visible).


How to change the default page base class?


I've tried setting the <pages pageBaseType="DynamicWebPage" /> value in web.config, but when I response.write out the page type, I'm still getting Microsoft.WebPages.WebPage.

I'm simply trying to sub-class WebPage and add some additional functionality such as a dynamic PageData dictionary similar to Phil Haack's dynamic ViewData dictionary.



Can I replace the EntityObject as base-class in Entity Designer 3.5 sp1?


I'm using EF3.5sp1 for a project, and I've been working around many of its problems... as such, my entity partial classes have a lot of logic in them for change-tracking and whatnot.  Obviously, I'd like to factor this logic out into a common base class, but of course all my objects must derive from EntityObject.  Is it possible to tell them to derive from some class of my own invention (which would actually likely derive from EntityObject themselves)?

I'd rather avoid editing the EDMX file unless the changes will be safe on entity-model-update, since I'm still making changes to the database schema in this early state of my project.


Also, is there any good workaround for the fact that the change isn't tracked when you change EntityReference.EntityKey?

crystal report -visual studio 2008 dual axis chart (bar & line)


dear all, 

i use crystal report integrated with  vs.2008, and i want to make chart with dual axis (bar & line).

i have used bar chart and input the data with 2 values..

then in chart options > template, i activated the dual axis..

my question is, how i can change the 2nd value with line chart not bar chart??

i'd tried to find the right settings in "chart options" but still can't find the solution.

for information in "chart options" there are 4 sub menu : template, general,titles,grid..

i read in a tutorial there's more sub menu called "series" in crystal report (stand alone version)..

is it possible doing it in Crystal Report VS. 2008?

please,, i need your advice and solution..

Thanx before..


OneNote 2010: Creating OneNote 2010 Extensions with the OneNote Object Model


Learn how to build applications and plug-ins that interoperate with data from OneNote 2007 and 2010 using the OneNote Object Model library freely available on CodePlex. Andy Gray demonstrates how easy it is to integrate information from OneNote notebooks, sections and pages into smart client and Web apps.

Andy Gray

MSDN Magazine July 2010

CLR Inside Out: What's New in the .NET Framework 4 Base Class Library


Just about everyone who uses Microsoft .NET uses the Base Class Libraries (BCL).When we make the BCL better, almost every managed developer benefits. This column will focus on the new additions to the BCL in .NET 4 beta 1.

Justin Van Patten

MSDN Magazine September 2009

Toolbox: Microsoft Chart Controls, Visual Studio Automatic Code Snippets, And More


In this installment we look at the Microsoft Chart Controls; Snippet Designer, a free, add-in for Visual Studio 2008 for creating and editing Code Snippets; refactoring SQL applications; and this month's favorite blog.

Scott Mitchell

MSDN Magazine April 2009

CLR Inside Out: Base Class Library Performance Tips and Tricks


The common language runtime (CLR) sits at the very heart of managed code. Indeed, it is the heart of managed code, so to understand managed code you need to understand the CLR.

Kit George

MSDN Magazine January 2006

Serial Comm: Use P/Invoke to Develop a .NET Base Class Library for Serial Device Communications


Out-of-the-box, the only way of coding RS232 serial communications applications in the .NET environment is to import the outdated and somewhat limited MSComm ActiveX control. This article describes the development of a lean, multithreaded, and modern RS232 base class library in C# managed code. The library uses Platform Invocation Services to interact with the Win32 API directly. Application programmers can use the library from any .NET language through inheritance; the article explores examples written in C# and Visual Basic .NET.

John Hind

MSDN Magazine October 2002

Building a Custom Data Grid: Performing Ad Hoc Web Reporting with a VBScript 5.0 Class Object


A flexible, customizable grid for displaying data is a useful tool for ASP developers. It allows Web visitors to customize their view of your data. This article takes the data grid presented in "Ad Hoc Web Reporting with ADO 2.0" by John Papa and Charles Caison (MIND, December 1998) and adds handy features such as a finds feature that supports multiple finds and a mode for adding and editing records. This version also improves response time by allowing asynchronous record download and it componentizes the code so it can be used as a standalone VBScript class object that can be reused in other pages.

Randall Kindig

MSDN Magazine July 2000

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