3D Graphs
-
- Newbie
- Posts: 4
- Joined: Fri Aug 02, 2013 12:00 am
3D Graphs
I am using the 2013 version of the ActiveX object with Visual FoxPro.
I have successfully created the TeeChart object at runtime and been able to generate 3D graphs.
I wish to "tweak" the appearance of the generated graph at runtime by manipulating the properties of the TeeChart object.
I am able to browse the exposed properties, events, and methods of the TeeChart object, but there are a large number of properties, methods, etc.,
with not much in the way of documentation on what each property does or what the acceptable values are for each property.
I have several needs at present for graph manipulation. Any assistance regarding which TeeChart object properties to use at runtime to be able to manipulate the graph will be greatly appreciated!
1. I need to rotate the 3D Bar chart on its "Z" axis to achieve a "flatter" perspective.
2. I need to be able to control the depth of the generated 3D bars to make them appear "thinner" 3D-wise.
3. I need to be able to have a 3D-effect applied to the X-Axis and the Y-Axis to give additional 3D-looking perspective to the graph.
4. I need to be able to have the individual graph bars constructed/painted using a heavy black pen with a blue interior to each bar. We are currently able to build each bar using the blue color but now wish to add a heavy-pen black outline to each bar for clarity.
5. I wish to have the Y-axis of the graph depict the values displayed in thousands.
Re: 3D Graphs
Hi,
Of course, if you still find problems to achieve what you want, please don't hesitate to let us know.
And this is what I'm getting:
Or maybe you mean to manipulate the axis labels to draw a number that doesn't correspond to the value that position represents. In this case, you may want to use custom labels (ie showing 9000 where the axis value corresponds to 90):
I guess you just want to change the Chart3DPercent property. Ie:PrinterGuy wrote:1. I need to rotate the 3D Bar chart on its "Z" axis to achieve a "flatter" perspective.
Code: Select all
TChart1.Aspect.Chart3DPercent = 5
I think point #1 above also answers this.PrinterGuy wrote:2. I need to be able to control the depth of the generated 3D bars to make them appear "thinner" 3D-wise.
I'm not sure about what are you exactly trying to achieve here. Let me suggest you to set Orthogonal to false and play with the Elevation and Rotation:PrinterGuy wrote:3. I need to be able to have a 3D-effect applied to the X-Axis and the Y-Axis to give additional 3D-looking perspective to the graph.
Code: Select all
TChart1.AddSeries scBar
TChart1.Series(0).FillSampleValues
TChart1.Aspect.Orthogonal = False
TChart1.Aspect.Chart3DPercent = 40
TChart1.Aspect.Elevation = 340
TChart1.Aspect.Rotation = 340
By default the Pen is visible. Anyway, in the code below I'm forcing it to be visible:PrinterGuy wrote:4. I need to be able to have the individual graph bars constructed/painted using a heavy black pen with a blue interior to each bar. We are currently able to build each bar using the blue color but now wish to add a heavy-pen black outline to each bar for clarity.
Code: Select all
TChart1.Legend.Visible = False
Dim i As Integer
TChart1.AddSeries scBar
With TChart1.Series(0)
.XValues.DateTime = True
.Color = vbBlue
.Marks.Visible = False
.Pen.Visible = True
.Pen.Width = 3
For i = 0 To 12
.AddXY DateAdd("m", i, Today), 50 + Rnd * 50, "", vbBlue
Next i
End With
TChart1.Axis.Left.Labels.Font.Size = 12
TChart1.Axis.Bottom.Labels.Font.Size = 12
TChart1.Axis.Bottom.Labels.DateTimeFormat = "mmm"
I'm not sure if you want to format the axis labels as follows (ie 90 will be shown as 0.090):PrinterGuy wrote:5. I wish to have the Y-axis of the graph depict the values displayed in thousands.
Code: Select all
TChart1.Axis.Left.Labels.ValueFormat = "0,000.##"
Code: Select all
TChart1.Axis.Left.Labels.Clear
For i = 0 To 9
TChart1.Axis.Left.Labels.Add i * 10, Str$(i * 1000)
Next i
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |