ASE Home Page Products Download Purchase Support About ASE
ChartDirector General
Forum HomeForum Home   SearchSearch

Message ListMessage List     Post MessagePost Message

  3D Column Chart
Posted by Lars Berger on Jan-16-2020 17:36

Im looking for a way to create a 3D column Chart (see picture). The nearest chart type which I found is  the scattered surface chart or 3D scattered group.

Any ideas ...


  Re: 3D Column Chart
Posted by Peter Kwan on Jan-16-2020 23:04
Hi Lars,

Yes. The "Depth Bar Chart" is an example:

In the above example, the bars are tightly packed in the "depth" dimension. In your attached image, there is some gaps between bars in the "depth" dimension. In ChartDirector, the gap can be configured using the Layer.set3D API.

As I am not sure of your programming langauge, I will just use C#/Java as an example:

BarLayer layer0 = c->addBarLayer(barDataArray0, barColor0, layerName0);
layer0->setBorderColor(Chart.SameAsMainColor);   // no border color
layer0->set3D(10, 5);   // 10 pixels 3D depth, plus 5 pixels 3D gap

BarLayer layer1 = c->addBarLayer(barDataArray1, barColor1, layerName1);
layer1->setBorderColor(Chart.SameAsMainColor);   // no border color
layer1->set3D(10, 5);   // 10 pixels 3D depth, plus 5 pixels 3D gap

.... repeat for other layers ....

In practice, instead of repeating the code for other layers, you can use a loop to add all the layers, as the code are all the same. Only the data/color/name are different.

Hope this can help.

Peter Kwan

  Re: 3D Column Chart
Posted by Lars Berger on Jan-21-2020 16:42
Hi Peter,

Thx for the answer and the test code. I will try this out with Perl.