Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
FoxCharts Exploded Pie
Message
De
28/12/2012 15:54:32
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
VFPX/Sedna
Titre:
FoxCharts Exploded Pie
Versions des environnements
Visual FoxPro:
VFP 9 SP2
Divers
Thread ID:
01560845
Message ID:
01560845
Vues:
86
Hi,

I am trying to create an exploded pie chart (where all the pie pieces are separated from each other) using FoxCharts 1.20 but not having any luck. This chart is produced without any user intervention, so the user is not able to click on the slice to detach it. Anyone can see what I am doing wrong?
LPARAMETERS toWord, toDoc, tcFileName

m.lcChartFile = FORCEEXT(m.tcFileName + "-Expense", "PNG")

LOCAL loFoxChart as FoxCharts OF "FoxCharts.vcx"
m.loFoxChart = NEWOBJECT("FoxCharts", "FoxCharts.vcx")

CREATE CURSOR c_Chart (nValue n(8,2) null, Legend c(30), Color i, Detach l, Hide l)
INSERT INTO c_Chart ;
SELECT ExpenseAmount, typ_name, 0, .T., .F. FROM c_ExpenseBreakdown order by ExpenseAmount desc 

WITH m.loFoxChart as FoxCharts OF "FoxCharts.vcx"
	.PieDetachPixels = 50
	
	.ChartsCount = 1

	.ChartType = 1
	
	.Depth = 30 && the 3D effect - 0 = plain chart

	* Inform the class where the data will be found
	.SourceAlias = "c_Chart"
	.FieldAxis2  = "Legend" && name of the field
*	.FieldColor = "Color" && name of the field - used when you choose custom colors
	.FieldLegend = "Legend" && name of the field

	.Fields(1).FieldValue = "nValue"

	* Setting the captions for the other legends
	.Title.Caption = "Claims Expense Breakdown"
	.Subtitle.Caption = ""

	* The backcolor
	.BackColor = RGB(0,0,0) && black
	
	* Setting the colors
	.ColorType = 2 && 0=basic, 1=custom, 2=Random colors
	
	.Title.ForeColor = RGB(255,255,255)
	.SideLegend.ForeColor = RGB(255,255,255)
	.ShowValuesOnShapes = .T.
	.LegendPosition = 8

	.DrawChart() && update the chart with the current settings
	
	.SaveToFile(m.lcChartFile, 100)
ENDWITH

this.AddChartToWord(m.toWord, m.toDoc, "ExpenseChart", m.lcChartFile)

RETURN
Frank.

Frank Cazabon
Samaan Systems Ltd.
www.samaansystems.com
Répondre
Fil
Voir

Click here to load this message in the networking platform