Hola, yo utilizo el OWC funciona muy bien
aqui hay on code funciona bien.
www link
chart.asp
<%
Option Explicit
Response.ContentType = "image/gif"
%>
<%
'declare our variables
Dim strSQL, rst, strConnectionString
Dim objConstants, objFont, objChart, objCSpace, objAxis
Dim objBinaryFile, FSO
'the connection string
strConnectionString = "provider=microsoft.jet.oledb.4.0;" _
& "data source=C:\db.mdb"
'create the recordset object
set rst = Server.CreateObject("ADODB.Recordset")
%>
<%
'the SQL query
strSQL = "select categoria, count(*) as num from table1 group by categoria"
'get the data with a client side cursor, and static dataset
rst.open strSQL, strConnectionString, 3, 3
'Now create the chart object
set objCSpace = Server.CreateObject("OWC.Chart")
%>
<%
'set up chart and properties
set objChart = objCSpace.Charts.Add()
set objConstants = objCSpace.Constants
'create a clustered column chart
objChart.Type = objConstants.chChartTypeColumnClustered
'add a legend
objChart.HasLegend = false
%>
<%
'set the data source to the recordset
set objCSpace.DataSource = rst
'set the data points and categories
objChart.SetData objConstants.chDimSeriesNames, 0, "num"
objChart.SetData objConstants.chDimCategories, 0, "categoria"
objChart.SetData objConstants.chDimValues, 0, "num"
'set up some additional properties
'add and format the chart title
objChart.HasTitle = True
objChart.Title.Caption = "Acciones Correctivas por CATEGORIAS"
set objFont = objChart.Title.Font
objFont.Name = "Tahoma"
objFont.Size = 12
objFont.Bold = True
'add and format a title to the category axis
set objAxis = objChart.Axes(objConstants.chAxisPositionBottom)
objAxis.HasTitle = True
objAxis.Title.Caption = "Categorias"
set objFont = objAxis.Title.Font
objFont.Name = "Tahoma"
objFont.Size = 10
objFont.Bold = True
'add and format a title to the value axis
set objAxis = objChart.Axes(objConstants.chAxisPositionLeft)
'objAxis.NumberFormat = "Currency"
objAxis.HasTitle = True
objAxis.Title.Caption = "Numero de Acciones Correctivas"
set objFont = objAxis.Title.Font
objFont.Name = "Tahoma"
objFont.Size = 8
objFont.Bold = True
%>
<%
'Save the current chart to a GIF file with a temporary
'filename using the FSO
set fso = Server.CreateObject("Scripting.FileSystemObject")
Dim strFileName
strFileName = Server.MapPath(".") & "\" & fso.GetTempName()
objCSpace.ExportPicture strFileName, "gif", 950, 400
'Use On Error Resume Next to make sure we eventually delete
'the temporary GIF file even if something fails in the next
'couple of functions
on error resume next
'The GIF file has been created. Return the contents of the
'GIF file as binary data using the BinaryFileStream COM object
set objBinaryFile = Server.CreateObject("BinaryFileStream.Object")
Response.BinaryWrite objBinaryFile.GetFileBytes(CStr(strFileName))
'Delete the GIF file since it is no longer needed
objBinaryFile.DeleteFile CStr(sFullFileName)
'clear variables
set objBinaryFile = nothing
set FSO = nothing
set objCSpace = nothing
%><body bgcolor="#000000">