Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
MS Graph
Message
De
11/07/2001 12:14:19
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
À
10/07/2001 11:31:06
Steven Dyke
Safran Seats USA
Texas, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Divers
Thread ID:
00528662
Message ID:
00529216
Vues:
18
>I am useing code on a form and OLE to create a dynamic chart. I am having trouble getting a handle to the gap width of the bars. Can someone help.

Steven,
Gapwidth applies to ChartGroups. ie :
*** 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
#include xlconstants.h
#Define TABULATE CHR(9)
Wait window nowait "Filling cell values..."

Select country,cnt(*) as 'Count' from customer group by country into cursor crsGraph
lcTempFile = sys(2015)+'.tmp'
Copy to (lcTempFile) type CSV
MCGDATA = chrtran(FileToStr(lcTempFile),',',TABULATE)
Erase (lcTempFile)

Create cursor testgen (graphtest g)
Append blank
Wait window nowait "Plotting..."
Append general graphtest class MSGraph.Chart data MCGDATA

oForm = createobject("myForm")
With oForm
  .show
  .addobject("myGraph","OleBoundControl")
  With .myGraph
    .height = oForm.height - 10
    .width = oForm.width - 10
    .left = 5
    .top = 5
    .ControlSource = "testgen.graphtest"
    .object.application.plotby = xlColumns
    .ChartGroups(1).Gapwidth = 300
  Endwith
  .myGraph.visible=.T.
Endwith
Wait clear
**** Set the LocaleId to the previous value
=sys(3006,val(nlLocaleId))

Read events

Define class myForm as Form
  Width=800
  Height=600
  Name='MyForm'
  BackColor = rgb(255,255,196)
  Procedure QueryUnload
  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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform