Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
X and Y Axes font size
Message
From
04/05/2004 05:17:52
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
03/05/2004 19:49:15
Joao Godinho
Fredesenvolv, Lda
Lisbon, Portugal
General information
Forum:
Visual FoxPro
Category:
ActiveX controls in VFP
Miscellaneous
Thread ID:
00900545
Message ID:
00900625
Views:
39
>Thank´s Cetin
>
>i try this to change a few properties of the chart
>thisform.olegraph.Object.Application.Chart.ChartGroups(1).VaryByCategories = .t.
>thisform.olegraph.Object.Application.Chart.HasLegend = .t.
>thisform.olegraph.Object.Application.Chart.legend.Font.Size = 8
>
>and it work's
>
>
>when i try to do this (changing all axes font to 8 )
>
>thisform.olegraph.Object.Application.Chart.Axes(1).font.size = 8
>
>it doesn´t !
*** set the LOCALEID to English
nlLocaleId=Sys(3004)		&& Save local id
=Sys(3006,1033)				&& We will be sending instructions in English

* Part of xlChartType constants
#Define xlBubble3DEffect			87
#Define xlColumnClustered  51
#Define xlBarClustered  57

#Define xlCategory		1
#Define xlValue			2
#Define xlSeriesAxis	3

Select country,Cnt(*) As 'Count' ;
    from customer ;
    group By country ;
    into Cursor crsGraph

Wait Window Nowait "Filling cell values..."
MCGDATA = ""
nCols = Fcount()
For ix = 1 To nCols
    MCGDATA = MCGDATA + Iif(Empty(MCGDATA),"",Chr(9))+Field(ix)
Endfor
lcTemp = Sys(2015)+'.tmp'
Copy To (m.lcTemp) Delimited With "" With Tab
MCGDATA = MCGDATA + Chr(13)+Chr(10) + ;
    FileToStr(m.lcTemp)
Erase (m.lcTemp)

Create Cursor testgen (graphtest g)
Append Blank
Append General graphtest Class MSGraph.Chart Data MCGDATA

oForm = Createobject("Form")

With oForm
    .Height = 450
    .Width = 650
    .Show
    .Closable = .F.
    .AddObject("myQuit1","myQuit")
    .AddObject("myGraph","OleBoundControl")
    With .myGraph
        .Height = oForm.Height - 20
        .Width = oForm.Width
        .Left = 0
        .Top = 20
        .ControlSource = "testgen.graphtest"
        Wait Window Nowait "Plotting..."
        .ChartType=xlColumnClustered
        .Object.Application.plotby = 2 && Columns
        .haslegend = .F.
        With .Axes(xlCategory).TickLabels
            With .Font
                .Name = "Arial"
                .FontStyle = "Normal"
                .Color = Rgb(255,0,0)
                .Size = 8
            Endwith
            .Offset = 50
            .Orientation = 90
        Endwith
        With .Axes(xlValue).TickLabels
            With .Font
                .Name = "Arial"
                .FontStyle = "Normal"
                .Color = Rgb(0,0,255)
                .Size = 8
            Endwith
            .Offset = 50
            .Orientation = 45
        Endwith
        .Visible=.T.
    Endwith
    .myQuit1.Visible = .T.
Endwith
Wait Clear
**** Set the LocaleId to the previous value
=Sys(3006,Val(nlLocaleId))

Read Events

Define Class myquit As CommandButton
    Left=1
    Top=0
    AutoSize = .T.
    Caption="Close"
    Procedure Click
    Release All
    Clear Events
Endproc
Enddefine
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
Next
Reply
Map
View

Click here to load this message in the networking platform