Page 1 of 1

Control of Generated 3D Graphs

Posted: Mon Aug 19, 2013 11:45 pm
by 16666664
Hi.

I am still attempting to control the generated output of a 3D bar chart. In the example that Yeray sent me the bar chart has a 3D effect applied to both the X-axis and to the Y-axis. When I invoke the 3D effect on the graph axes, I also get a line across the top of the chart and a line on the right side of the chart ("walls"?). I want to invoke the 3D effect on the X-axis and the Y-axis without requiring a line across the top or a line on the right side of the generated graph.

Is there a property that permits me to rotate the generated graph around the X-axis? The intended effect is that I show slightly less of the right side of the bars, making the 3D effect less pronounced.

I also wish to have a narrow black line outline the generated bars (which are colored blue). I have experimented with the .BarPen property with little success.
example: TChart.Series(0).asBar3D.BarPen.Width = 1
Should this also be accompanied by a color property for the BarPen ??

Is there any "master" listing of all the properties, methods, and events that are exposed by the ActiveX object? The docs I review have extensive details on the various interfaces exposed, but I have to dig through the numerous samples hoping to find code samples that detail the various properties available.

Re: Control of Generated 3D Graphs

Posted: Tue Aug 20, 2013 12:36 pm
by 10050769
Hello PrinterGuy,
I am still attempting to control the generated output of a 3D bar chart. In the example that Yeray sent me the bar chart has a 3D effect applied to both the X-axis and to the Y-axis. When I invoke the 3D effect on the graph axes, I also get a line across the top of the chart and a line on the right side of the chart ("walls"?). I want to invoke the 3D effect on the X-axis and the Y-axis without requiring a line across the top or a line on the right side of the generated graph.
I suggest you set walls Visible property to false and you can do something as next line of code:

Code: Select all

  TChart1.Walls.Back.Visible = False
Is there a property that permits me to rotate the generated graph around the X-axis? The intended effect is that I show slightly less of the right side of the bars, making the 3D effect less pronounced.
You can use the Bar DepthPercent property to change the depth size of bar, you can do something as next:

Code: Select all

 TChart1.Series(0).asBar3D.DepthPercent = 55
I also wish to have a narrow black line outline the generated bars (which are colored blue). I have experimented with the .BarPen property with little success.
example: TChart.Series(0).asBar3D.BarPen.Width = 1
Should this also be accompanied by a color property for the BarPen ??
I suggest you do something as next line of code to change the color of BarPen:

Code: Select all

 TChart1.Series(0).Pen.Color = vbBlue
On the other hand, I have added for you the complete example I have used. The example is based in suggested Yeray's code here.

Code: Select all

Private Sub Form_Load()
  TChart1.Legend.Visible = False
  
  Dim i As Integer
  TChart1.AddSeries scBar3D
  With TChart1.Series(0)
    .XValues.DateTime = True
    .Color = vbBlue
    .Marks.Visible = False
    .Pen.Visible = True
    'Change line pen
    .Pen.Width = 1
    .Pen.Color = vbBlue
    For i = 0 To 12
      .AddXY DateAdd("m", i, Today), 50 + Rnd * 50, "", vbBlue
    Next i
    'Change effect 3D of bars
    .asBar3D.DepthPercent = 55
  End With
  TChart1.Axis.Left.Labels.Font.Size = 12
  TChart1.Axis.Bottom.Labels.Font.Size = 12
  TChart1.Axis.Bottom.Labels.DateTimeFormat = "mmm"
  'Set visible Walls to false
  'Back
  TChart1.Walls.Back.Visible = False
End Sub
Could you tell us if previous solutions works in your end?
Is there any "master" listing of all the properties, methods, and events that are exposed by the ActiveX object? The docs I review have extensive details on the various interfaces exposed, but I have to dig through the numerous samples hoping to find code samples that detail the various properties available.
The Help of TeeChart ActiveX was built in this way and at the moment isn't exist a list of all properties, methods and events. In this case, a easy way to understand as works the events, methods and properties is using:
1.- Demo project
2.- The TeeChart Tutorial

I hope will helps.

Thanks,