Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Changing Font in MSGraph.Chart.8
Message
From
04/08/1999 09:52:44
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
04/08/1999 08:50:59
General information
Forum:
Visual FoxPro
Category:
ActiveX controls in VFP
Miscellaneous
Thread ID:
00249150
Message ID:
00249696
Views:
140
>but if my graph is in OleBound control than I don't have any property like Axes..
>
>here is my code below :
>#DEFINE CRLF CHR(13)+CHR(10)
>#DEFINE TAB CHR(9)
>thisform.mousepointer = 99
>SET SAFETY OFF
>
>*!* DECLARING ARRAYS
>decl lArName[100],lArYards[100],lArAmount[100], lArContVal[100],lArConper[100]
>
>lcData = "FinGrCust1"
>
>select fldname from &lcData into Array lArName
>select fldvalue from &lcData into Array lArvalue
>
>
>store "" to mdata1,mdata2,mdata3
>ctr = alen(lArName)
>lnMax = Thisform.Bsspin1.Value
>for ctr = 1 to lnMax
> mdata2 = mdata2 + lArName[ctr]+ TAB + lArValue[ctr] + CRLF
>endfor
>mdata3 = mdata1 + mdata2
>create cursor too (gen1 g)
>SET SAFETY ON
>append blank
>append general gen1 class "msgraph.chart" DATA mdata3
>thisform.lockscreen = .F.
>ThisForm.Oleboundcontrol1.visible = .T.
>ThisForm.Oleboundcontrol1.controlsource = "gen1"
>thisform.refresh
>
>Please correct it..!!

But you have it :) It's "Thisform.OleboundControl1.axes". Make a little modification in your codes last 2 lines to see that you have many properties accessible :)
#DEFINE xl3DArea 					-4098
#DEFINE xl3DColumn					-4100
#DEFINE xl3DLine					-4101
#DEFINE xl3DPie						-4102
#DEFINE xlArea						1
#DEFINE xlBubble3DEffect			87
#DEFINE xlLine						4
#DEFINE xlPie						5
#DEFINE xlRadar						-4151
#DEFINE xlSurface					83

WITH ThisForm.Oleboundcontrol1
  .ControlSource = "testgen.Genfld1"
  .hasdatatable = .t.
  .DataTable.HasBorderOutline = .T.
  WITH .DataTable.font
    .name = "Arial"
    .size = 8
  ENDWITH

  WAIT window nowait "Plotting..."
  .hastitle = .t.
  .haslegend = .t.
  .ChartTitle.caption = "This is chart title"
  .ChartType=xl3DArea
  .object.application.plotby = 2 && Plot by columns
  #DEFINE xlCategory		1
  #DEFINE xlValue			2
  #DEFINE xlSeriesAxis	3
  WITH .Axes(xlCategory)
    .hastitle = .t.
    WITH .AxisTitle
      .Caption = "This is category title"
      WITH .Font
        .Name = "Arial"
        .Size = 10
        .Bold = .t.
      ENDWITH
    ENDWITH
  ENDWITH
  WITH .Axes(xlSeriesAxis)
    .hastitle = .T.
    WITH .AxisTitle
      .Caption = "This is SeriesAxis title"
      WITH .Font
        .Size = 8
        .Bold = .f.
      ENDWITH
      .Orientation = 90 && Show 90 degrees rotated
    ENDWITH
  ENDWITH
  WITH .Axes(xlValue)
    .hastitle = .T.
    with .AxisTitle
     .Caption = "This is Rotated Value title"
      with .Font
        .Size = 10
        .Bold = .f.
      endwith
      .Orientation = 90 && Show 90 degrees rotated - clockwise

      with .Characters(len("This is R"),len("Rotated")).Font
	.Italic = .t.
	.Bold = .t.
	.Color = rgb(255,0,255)
      endwith
    endwith
  ENDWITH
  WAIT clear
  .visible=.T.
ENDWITH
thisform.refresh
Help file is vbagrp8.hlp in ...\Microsoft Office\Office. Constants are excel constants. If you cannot download wc0993.exe from microsoft site I think it's also here on files section. In any case if you can't access those constants xlConstants can be found by :
-Open Excel
-Select tools\macro\VB editor
-Press F2 to bring up "Object browser"
-Find needed xlConstant type ie:xlChartType
-On right window click needed Constant ie: xl3DArea
-Below the window constant value is displayed
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Reply
Map
View

Click here to load this message in the networking platform