This project has moved. For the latest updates, please go here.

Bar Chart

Feb 9, 2010 at 2:30 PM

Hello,

I'm sorry for my english.

Great work.

It's possible to make a horizontal bar chart but  I would like to make a vertical bar chart.

It's possible ?

Coordinator
Feb 9, 2010 at 4:32 PM

Sure, use the AddChart method with Charttype Columnxxx, like this...

 var chart = ws.Drawings.AddChart("columnChart", eChartType.ColumnClustered);

or

var chart = ws.Drawings.AddChart("columnChart3D", eChartType.ColumnClustered3D);

Feb 10, 2010 at 8:08 AM

Thanks for your help, but whit this code :

<font size="2" color="#0000ff"><font size="2" color="#0000ff">

      Dim Chart

</font></font><font size="2" color="#0000ff">

 

</font>

As Object = Ws_CatProjet.Drawings.AddChart("JourProjet" , eChartType.ColumnClustered)

      I have a NotImplementedException "Chart type not implemented"

And with 

      Dim Chart As Object = Ws_CatProjet.Drawings.AddChart("JourProjet" , eChartType.ColumnClustered3D)

      Chart.View3D.Perspective = 0

      Chart.View3D.RotX=360

<font size="2">

      It's not possible to open then file.

 

 

</font>

 

Coordinator
Feb 10, 2010 at 8:44 AM

You are right, ColumnClustered don't work in this release, but i have fixed it. I'll try to check in the fix when i'm finished with the stuff i'm working on.

If you really need it now, just add the ColumnClustered to the GetChartNodeText-method in the ExcelChart class in the source.

Your second problem is that RotX is out of range. It spans from 0-90 max. I don't validate all values, so if you put them out of range Excel will give you an error when the workbook is opened.