Bonjour à tous,
j'ai récupére ce code pour réaliser un graph, Il fait partie d'une librairie de code permettant de faire des graphs tres sympas.
malheuresement ce code bug. Y aurait il un problème de référence ? Si vous avez une idée
Merci par avance
Sub createChart()
Dim viewer As Object
Dim img As String
Dim cd As New ChartDirector.API
'The data for the chart
Dim data()
data = Array(90, 60, 65, 75, 40)
'The labels for the chart
Dim labels()
labels = Array('Speed', 'Reliability', 'Comfort', 'Safety', 'Efficiency')
'Create a PolarChart object of size 450 x 350 pixels
Dim c As PolarChart
Set c = cd.PolarChart(450, 350)
'Set center of plot area at (225, 185) with radius 150 pixels
Call c.setPlotArea(225, 185, 150)
'Add an area layer to the polar chart
Call c.addAreaLayer(data, &H9999FF)
'Set the labels to the angular axis as spokes
Call c.angularAxis().setLabels(labels)
'output the chart
Set viewer.Picture = c.makePicture()
'include tool tip for the chart
viewer.ImageMap = c.getHTMLImageMap('clickable', '', _
'title='{label}: score = {value}'') [file name=testgraphradar.zip size=9462]http://www.excel-downloads.com/components/com_simpleboard/uploaded/files/testgraphradar.zip[/file]
j'ai récupére ce code pour réaliser un graph, Il fait partie d'une librairie de code permettant de faire des graphs tres sympas.
malheuresement ce code bug. Y aurait il un problème de référence ? Si vous avez une idée
Merci par avance
Sub createChart()
Dim viewer As Object
Dim img As String
Dim cd As New ChartDirector.API
'The data for the chart
Dim data()
data = Array(90, 60, 65, 75, 40)
'The labels for the chart
Dim labels()
labels = Array('Speed', 'Reliability', 'Comfort', 'Safety', 'Efficiency')
'Create a PolarChart object of size 450 x 350 pixels
Dim c As PolarChart
Set c = cd.PolarChart(450, 350)
'Set center of plot area at (225, 185) with radius 150 pixels
Call c.setPlotArea(225, 185, 150)
'Add an area layer to the polar chart
Call c.addAreaLayer(data, &H9999FF)
'Set the labels to the angular axis as spokes
Call c.angularAxis().setLabels(labels)
'output the chart
Set viewer.Picture = c.makePicture()
'include tool tip for the chart
viewer.ImageMap = c.getHTMLImageMap('clickable', '', _
'title='{label}: score = {value}'') [file name=testgraphradar.zip size=9462]http://www.excel-downloads.com/components/com_simpleboard/uploaded/files/testgraphradar.zip[/file]