Preciso gerar um gráfico de barras, pode ser simples, a partir de dados recuperados de um banco de dados, e depois preciso imprimir esse gráfico. No VB.Net
A parte de recuperar os dados é tranquilo, eu sei legal, mas os gráficos e a impressão que estão pegando, quem puder me ajudar, agradeco.
Valeu pessoal.

Como Faço Para Gerar Um Gráfico De Barras E Imprim
Started By cacfs, 31/03/2005, 17:41
2 replies to this topic
#1
Posted 31/03/2005, 17:41
#2
Posted 01/04/2005, 10:18
estou trabalhando para publicação desse artigo, mas ai vai algumas referências...
essa é apenas uma forma simples e inteligente:
http://www.superasp....artigo_360.asp#
vc pode utilizar dos gráficos do office, utilizando a OWASP
Dim catnom(3), valor(3)
catnom(0)='A'
catnom(2)='B'
catnom(3)='C'
valor(1)=1
valor(2)=2
valor(3)=3
With Server.CreateObject("OWC.Chart")
set c = .constants
With .charts.add
.haslegend=true
.HasTitle=True
if .HasTitle then
.Title.Caption = "Valor Utilizado (R$)"
.Title.Font.Size = 14
.Title.Font.Name = "Tahoma"
.Title.Font.Bold = True
.Title.Font.Italic = False
.Title.Font.Underline = False
end if
.HasLegend = false
if .HasLegend then
.Legend.Font.Size = 10
.Legend.Font.Name = "Tahoma"
.Legend.Font.Bold = False
.Legend.Font.Italic = False
.Legend.Font.Underline = False
.Legend.Position =2
end if
.Type =c.chChartTypeLineMarkers
With .seriescollection.add
.setdata c.chDimCategories,c.chDataLiteral, catnom
.setdata c.chDimValues,c.chDataLiteral, valor
End With
.Axes(0).NumberFormat= "###,##0"
if VarInd > 40 then
.Axes(1).MinorUnit = 3
else
.Axes(1).MinorUnit = 2
end if
.Axes(c.chAxisPositionLeft).Scaling.HasAutoMinimum = False
.Axes(c.chAxisPositionLeft).Scaling.HasAutoMaximum=false
.Axes(c.chAxisPositionLeft).Scaling.Minimum = 0
essa é apenas uma forma simples e inteligente:
http://www.superasp....artigo_360.asp#
vc pode utilizar dos gráficos do office, utilizando a OWASP
Dim catnom(3), valor(3)
catnom(0)='A'
catnom(2)='B'
catnom(3)='C'
valor(1)=1
valor(2)=2
valor(3)=3
With Server.CreateObject("OWC.Chart")
set c = .constants
With .charts.add
.haslegend=true
.HasTitle=True
if .HasTitle then
.Title.Caption = "Valor Utilizado (R$)"
.Title.Font.Size = 14
.Title.Font.Name = "Tahoma"
.Title.Font.Bold = True
.Title.Font.Italic = False
.Title.Font.Underline = False
end if
.HasLegend = false
if .HasLegend then
.Legend.Font.Size = 10
.Legend.Font.Name = "Tahoma"
.Legend.Font.Bold = False
.Legend.Font.Italic = False
.Legend.Font.Underline = False
.Legend.Position =2
end if
.Type =c.chChartTypeLineMarkers
With .seriescollection.add
.setdata c.chDimCategories,c.chDataLiteral, catnom
.setdata c.chDimValues,c.chDataLiteral, valor
End With
.Axes(0).NumberFormat= "###,##0"
if VarInd > 40 then
.Axes(1).MinorUnit = 3
else
.Axes(1).MinorUnit = 2
end if
.Axes(c.chAxisPositionLeft).Scaling.HasAutoMinimum = False
.Axes(c.chAxisPositionLeft).Scaling.HasAutoMaximum=false
.Axes(c.chAxisPositionLeft).Scaling.Minimum = 0
*************** M ** A ** C ** U ** L ***************
*************************************************
*************************************************
#3
Posted 01/04/2005, 17:50
Eu preciso fazer é em VB.Net.
1 user(s) are reading this topic
0 membro(s), 1 visitante(s) e 0 membros anônimo(s)