Click here to Skip to main content
Email Password   helpLost your password?

Introduction

I want to begin with a special thanks to CodeProject for providing so many useful samples, and thanks especially to the author of this article: Customizing the .NET Panel control.

Background

If you know about the EBP products, then you'll remember their main board with a simple but cool isometric 3D chart. So, let's do the same here. All the code has been verified under Microsoft FxCop 1.35.

I'm not very comfortable in writing articles even in French, so English isn't better ;p.

Using the code

Let's see the creation code:

// Object declaration

Nolme.WinForms.Chart m_chartSample1;

// Create object

this.m_chartSample1 = new Nolme.WinForms.Chart(this.components);
this.m_chartSample1.BackColor = System.Drawing.Color.Silver;
this.m_chartSample1.BottomMargin = 20;
this.m_chartSample1.ColumnFont = new System.Drawing.Font(
                  "Arial", 8F, System.Drawing.FontStyle.Italic);
this.m_chartSample1.ColumnTitleFont = new System.Drawing.Font(
              "Arial", 10F, System.Drawing.FontStyle.Underline);
this.m_chartSample1.Curvature = 15;
this.m_chartSample1.DeltaDepth = 10;
this.m_chartSample1.DisplayHiddenSides = true;
this.m_chartSample1.DisplayTextOnColumns = true;
this.m_chartSample1.GradientMode = 
     System.Drawing.Drawing2D.LinearGradientMode.ForwardDiagonal;
this.m_chartSample1.LeftMargin = 50;
this.m_chartSample1.LegendFont = new System.Drawing.Font(
                    "Arial", 11F, System.Drawing.FontStyle.Bold);
this.m_chartSample1.Location = new System.Drawing.Point(8, 8);
this.m_chartSample1.MainTitle = "Main title";
this.m_chartSample1.MainTitleFont = new System.Drawing.Font(
    "Arial", 16F, 
    ((System.Drawing.FontStyle)((System.Drawing.FontStyle.Bold | 
                          System.Drawing.FontStyle.Underline))));
this.m_chartSample1.MarginBetweenColumn = 20;
this.m_chartSample1.Name = "m_chartSample1";
this.m_chartSample1.RightMargin = 20;
this.m_chartSample1.Size = new System.Drawing.Size(456, 304);
this.m_chartSample1.TabIndex = 4;
this.m_chartSample1.TopMargin = 20;
this.m_chartSample1.VerticalAxisMaxValue = 10000;
this.m_chartSample1.VerticalAxisStep = 1000;

Adding a column to the chart is done with the following code:

ChartColumn column1 = 
    m_chartSample1.AddColumn (1500, 210, 0, 500);

Each number represents a sub-value in the new column. You can pass an integer array if you have more values.

You can set the column title like this:

column1.Title = "January";

Other attributes like the margins, main title, etc., can be changed.

There were two choices on the legend of the graph. We could either integrate the legend into the current panel, or make another independent object. The main intention is to provide a centralized unique legend if multiple charts are used on the same page.

To summarize, a Chart (derived from CustomPanel) contains one or more CharColumns. A ChartLegend is composed of CharLegendItems. There are as many CharLegendItems as sub-values in a CharColumn.

Points of interest

I've tried to make the code as simple as possible so that anyone can upgrade it.

Bug report

Nothing actually.

History

You must Sign In to use this message board.
 
 
Per page   
 FirstPrevNext
GeneralIt's OK
bluealert455
16:44 13 Aug '09  
It's great for me!
Thank you!!
General3d chart plotting
Faysal
1:16 26 Mar '08  
Hi,
I want to plot some signal analysis data in a 3d chart for my student project and for that I need a free tool. No xml feature is required for my work and I want to do it with Nolme Chart tools. I am a beginer in C#- plz tell me how to start with this charting tools for serving my purpose.

Thanks in advance
Faysal
GeneralRe: 3d chart plotting
Vincent DUVERNET (Nolmë Informatique)
5:10 28 Mar '08  
Can you me more precise ? Have you done a screenshot or something like taht to see more what you want exactly ?

++
Vincent
GeneralRe: 3d chart plotting
Faysal
16:08 28 Mar '08  
I just want to put some (x,y,z type) data in a bar type chart- that will be enough for me. I try to work with Nolme chart but could not open the design view of various forms though the souce code pages could be opened. I try to omit the xml related lines from the source code and then some error message comes which I couldnot understand. Plz help me to figure this out.
GeneralRe: 3d chart plotting
Vincent DUVERNET (Nolmë Informatique)
4:40 29 Mar '08  
Hum, this code render 3D style view (isometric view) but from 2 axis.

So if your datas are coming from 3 axis (X, Y & Z), you'll have a big problem Poke tongue

What software are you using ?
If you are under Windows Operating system, you should download Microsoft Visual C# Express Edition 2008 which if free and all your compilation problems will be solved.

++
vincent
GeneralWonderful !
JulienV
3:02 3 Sep '07  
Thank you for this control ! I'm going to test it now ! Big Grin
Generallmd
kurnikov
7:36 11 Apr '07  
lmd supports 3d charts in c#
http://lmd.de/products/dotnet/lmdchartpack.net/
GeneralRe: lmd
Vincent DUVERNET (Nolmë Informatique)
9:24 13 Apr '07  
seems their free .net edition look very sexy, Ok I give up you win Poke tongue
GeneralAdding control to VS?
mikemohr
8:30 3 Nov '06  
Is there a way add the control to toolbox?
I mean to drag and drop the chart into a project.
GeneralRe: Adding control to VS?
Vincent DUVERNET (Nolmë Informatique)
12:30 3 Nov '06  
I think but I've haven't tested yet.
Maybe you'll need to write a few more code.

You can have a look at this article (in french sorry but with english screenshots & code)
http://morpheus.developpez.com/usercontrols/

(I don't have time for the moment to add this functionality.
QuestionWhat about a web based solution?
Marcus D
7:22 18 Oct '06  
Have you ever thought about modifying this to work ASP.NET. Could you not take the graphic options save them as png and then link it to a web page control like iChart. I would like to work on it but the code contains not License or copyright notices.
AnswerRe: What about a web based solution?
Vincent DUVERNET (Nolmë Informatique)
8:16 18 Oct '06  
Well, I haven't got any experience in ASP.NET technology.
There's no license or copyright notice with this code because it's free code, you can distribute it, change it, you can do every thing with it.

I'm working on another version but it's hard to find time to work on it.
GeneralOne Suggession
jayvardhanpatil
23:48 28 Sep '06  
You may use following line of code in your chart control whereever you are showing a slanted text. ( I mean where the text is not horizontal and not vertical, but actually in between diagonal)

GraphicsObject.TextRenderingHint = System.Drawing.Text.TextRenderingHint.AntiAlias;

You will see a great text quality

Jayvardhan Patil
QuestionCool
techno_adi
21:14 29 Aug '06  
Hi,
Can we have some demo apps relating to other reporting tools like say Gauges or may be some new innovative and attractive way to show reports.Smile


AnswerRe: Cool
Vincent DUVERNET (Nolmë Informatique)
22:09 29 Aug '06  
A new version is being produced which will work a bit differently.
Rendering is done into bitmap to be used with iTextSharp for example during PDF generation.
There is no designer like this topic :
http://www.codeproject.com/useritems/myneoreportintro.asp
but full source code Poke tongue
just wait a bit or mail me if you want a bitmap of rendering Poke tongue
GeneralImpressive!
Danilo Corallo
4:16 20 Jul '06  
I really like it!
Best Regards Smile Smile Smile
GeneralNice Try
Sendilkumar.M
19:27 24 May '06  
Good Presentation. Smile

M.Sendilkumar

GeneralVery Nice
Paul Conrad
17:53 24 May '06  

Very nicely done article. Found it to be useful.

Paul
GeneralSave & Print
Chestah
0:27 18 May '06  
Any chance you could add the ability to save the chart (to multiple formats eg, PNG, BMP, GIF, JPEG) or print the chart in a future version Smile ?
GeneralRe: Save & Print
Vincent DUVERNET (Nolmë Informatique)
1:26 18 May '06  
hum... that's a good question. Saving the chart, I will think about it. Maybe this week ? I'll try.
JokeRe: Save & Print
Chestah
12:04 18 May '06  
Thankyou Smile
Questionlicensing / usage query
SimonS
6:18 11 Apr '06  
Great controls!

If I include this in my commercial apps, will a link to this article and your name in my About Box suffice?

Cheers,
Simon

> blog:: brokenkeyboards > what I think of the OPTIONAL keyword in VB.NET? :: here > CV :: PDF > skype :: SimonMStewart
AnswerRe: licensing / usage query
Vincent DUVERNET (Nolmë Informatique)
8:04 11 Apr '06  
A link to source code and/or compagny site (www.nolme.com) , I won't say no Poke tongue
Or beta version of your commercial apps to see what it looks like in a final program Smile

++
Vincent
GeneralRe: licensing / usage query
SimonS
8:15 11 Apr '06  
I'm about to release V2 of my yoga studio management product.
Unfortunately I don't have a website for it yet. I know, I know. Blush

Will include link to your company site.

Thanks

Cheers,
Simon

> blog:: brokenkeyboards > what I think of the OPTIONAL keyword in VB.NET? :: here > CV :: PDF > skype :: SimonMStewart
GeneralRe: licensing / usage query
Vincent DUVERNET (Nolmë Informatique)
8:38 11 Apr '06  
no web site... shame on you Poke tongue
Thanks for the link


Last Updated 24 May 2006 | Advertise | Privacy | Terms of Use | Copyright © CodeProject, 1999-2010