C
Carlos Vazquez
Hello,
I did a chart wtih OWC but I want to change the font of this chart, How can
I do that?
I'm using Visual Studio .NET 2003 thank you!
CarlosV
The code is the next:
'Put user code to initialize the page here
Response.Buffer = True
Response.ContentType = "image/gif"
Dim conSybase As New Odbc.OdbcConnection
conSybase.ConnectionString = conexion
conSybase.Open()
Dim strSQL As String
strSQL = "select anio_mes, sum(liquidaciones) as Liquidaciones,
sum(renov_provocada) as Provocada ,sum(renov_inmediata) as Inmediata,
sum(renov_diferida) as Diferida from renovaciones group by anio_mes"
Dim daRenovaciones As New Odbc.OdbcDataAdapter(strSQL, conSybase)
Dim dsRenovaciones As New DataSet
daRenovaciones.Fill(dsRenovaciones)
Dim cuantos As Short = dsRenovaciones.Tables(0).Rows.Count
Dim aCategorias(cuantos - 1)
Dim aLiquidaciones(cuantos - 1)
Dim aProvocada(cuantos - 1)
Dim aInmediata(cuantos - 1)
Dim aDiferida(cuantos - 1)
Dim i As Short
For i = 0 To cuantos - 1
aCategorias(i) =
FechaCorta(dsRenovaciones.Tables(0).Rows(i).Item(0))
aLiquidaciones(i) = dsRenovaciones.Tables(0).Rows(i).Item(1)
aProvocada(i) = dsRenovaciones.Tables(0).Rows(i).Item(2)
aInmediata(i) = dsRenovaciones.Tables(0).Rows(i).Item(3)
aDiferida(i) = dsRenovaciones.Tables(0).Rows(i).Item(4)
Next
daRenovaciones.Dispose()
dsRenovaciones.Dispose()
Dim Chart1
Dim Chart1_Series1, Chart1_Series2, Chart1_Series3, Chart1_Series4
ChartSpace1 = New OWC.ChartSpace
Chart1 = ChartSpace1.Charts.Add(0)
Chart1_Series1 = Chart1.SeriesCollection.Add(0)
Chart1_Series2 = Chart1.SeriesCollection.Add(0)
Chart1_Series3 = Chart1.SeriesCollection.Add(0)
Chart1_Series4 = Chart1.SeriesCollection.Add(0)
Chart1.Type = ChartSpace1.Constants.chChartTypeColumn3D
Chart1_Series1.SetData(OWC.ChartDimensionsEnum.chDimSeriesNames,
OWC.ChartSpecialDataSourcesEnum.chDataLiteral, "Liquidaciones")
Chart1_Series2.SetData(OWC.ChartDimensionsEnum.chDimSeriesNames,
OWC.ChartSpecialDataSourcesEnum.chDataLiteral, "Provocada")
Chart1_Series3.SetData(OWC.ChartDimensionsEnum.chDimSeriesNames,
OWC.ChartSpecialDataSourcesEnum.chDataLiteral, "Inmediata")
Chart1_Series4.SetData(OWC.ChartDimensionsEnum.chDimSeriesNames,
OWC.ChartSpecialDataSourcesEnum.chDataLiteral, "Diferida")
Chart1_Series1.SetData(OWC.ChartDimensionsEnum.chDimCategories,
OWC.ChartSpecialDataSourcesEnum.chDataLiteral, aCategorias)
Chart1_Series2.SetData(OWC.ChartDimensionsEnum.chDimCategories,
OWC.ChartSpecialDataSourcesEnum.chDataLiteral, aCategorias)
Chart1_Series3.SetData(OWC.ChartDimensionsEnum.chDimCategories,
OWC.ChartSpecialDataSourcesEnum.chDataLiteral, aCategorias)
Chart1_Series4.SetData(OWC.ChartDimensionsEnum.chDimCategories,
OWC.ChartSpecialDataSourcesEnum.chDataLiteral, aCategorias)
Chart1_Series1.SetData(OWC.ChartDimensionsEnum.chDimValues,
OWC.ChartSpecialDataSourcesEnum.chDataLiteral, aLiquidaciones)
Chart1_Series2.SetData(OWC.ChartDimensionsEnum.chDimValues,
OWC.ChartSpecialDataSourcesEnum.chDataLiteral, aProvocada)
Chart1_Series3.SetData(OWC.ChartDimensionsEnum.chDimValues,
OWC.ChartSpecialDataSourcesEnum.chDataLiteral, aInmediata)
Chart1_Series4.SetData(OWC.ChartDimensionsEnum.chDimValues,
OWC.ChartSpecialDataSourcesEnum.chDataLiteral, aDiferida)
With ChartSpace1
.Border.Color = ChartSpace1.Constants.chColorNone
End With
With Chart1
'Optional layout elements
.SeriesCollection(0).Interior.Color = "Rosybrown"
' .PlotArea.Interior.Color = "Wheat"
.HasTitle = True
.Title.Caption = "Renovaciones"
.HasLegend = True
.Legend.Position =
OWC.ChartLegendPositionEnum.chLegendPositionBottom
'These chart types have Category and Value axes
.Axes(0).HasTitle = True
.Axes(0).Title.Caption = "Renovaciones"
.Axes(1).HasTitle = True
.Axes(1).Title.Caption = "Renovaciones"
End With
Response.BinaryWrite(ChartSpace1.GetPicture("gif", 350, 280))
Response.End()
End Sub
End Class
and the graph was this
I did a chart wtih OWC but I want to change the font of this chart, How can
I do that?
I'm using Visual Studio .NET 2003 thank you!
CarlosV
The code is the next:
'Put user code to initialize the page here
Response.Buffer = True
Response.ContentType = "image/gif"
Dim conSybase As New Odbc.OdbcConnection
conSybase.ConnectionString = conexion
conSybase.Open()
Dim strSQL As String
strSQL = "select anio_mes, sum(liquidaciones) as Liquidaciones,
sum(renov_provocada) as Provocada ,sum(renov_inmediata) as Inmediata,
sum(renov_diferida) as Diferida from renovaciones group by anio_mes"
Dim daRenovaciones As New Odbc.OdbcDataAdapter(strSQL, conSybase)
Dim dsRenovaciones As New DataSet
daRenovaciones.Fill(dsRenovaciones)
Dim cuantos As Short = dsRenovaciones.Tables(0).Rows.Count
Dim aCategorias(cuantos - 1)
Dim aLiquidaciones(cuantos - 1)
Dim aProvocada(cuantos - 1)
Dim aInmediata(cuantos - 1)
Dim aDiferida(cuantos - 1)
Dim i As Short
For i = 0 To cuantos - 1
aCategorias(i) =
FechaCorta(dsRenovaciones.Tables(0).Rows(i).Item(0))
aLiquidaciones(i) = dsRenovaciones.Tables(0).Rows(i).Item(1)
aProvocada(i) = dsRenovaciones.Tables(0).Rows(i).Item(2)
aInmediata(i) = dsRenovaciones.Tables(0).Rows(i).Item(3)
aDiferida(i) = dsRenovaciones.Tables(0).Rows(i).Item(4)
Next
daRenovaciones.Dispose()
dsRenovaciones.Dispose()
Dim Chart1
Dim Chart1_Series1, Chart1_Series2, Chart1_Series3, Chart1_Series4
ChartSpace1 = New OWC.ChartSpace
Chart1 = ChartSpace1.Charts.Add(0)
Chart1_Series1 = Chart1.SeriesCollection.Add(0)
Chart1_Series2 = Chart1.SeriesCollection.Add(0)
Chart1_Series3 = Chart1.SeriesCollection.Add(0)
Chart1_Series4 = Chart1.SeriesCollection.Add(0)
Chart1.Type = ChartSpace1.Constants.chChartTypeColumn3D
Chart1_Series1.SetData(OWC.ChartDimensionsEnum.chDimSeriesNames,
OWC.ChartSpecialDataSourcesEnum.chDataLiteral, "Liquidaciones")
Chart1_Series2.SetData(OWC.ChartDimensionsEnum.chDimSeriesNames,
OWC.ChartSpecialDataSourcesEnum.chDataLiteral, "Provocada")
Chart1_Series3.SetData(OWC.ChartDimensionsEnum.chDimSeriesNames,
OWC.ChartSpecialDataSourcesEnum.chDataLiteral, "Inmediata")
Chart1_Series4.SetData(OWC.ChartDimensionsEnum.chDimSeriesNames,
OWC.ChartSpecialDataSourcesEnum.chDataLiteral, "Diferida")
Chart1_Series1.SetData(OWC.ChartDimensionsEnum.chDimCategories,
OWC.ChartSpecialDataSourcesEnum.chDataLiteral, aCategorias)
Chart1_Series2.SetData(OWC.ChartDimensionsEnum.chDimCategories,
OWC.ChartSpecialDataSourcesEnum.chDataLiteral, aCategorias)
Chart1_Series3.SetData(OWC.ChartDimensionsEnum.chDimCategories,
OWC.ChartSpecialDataSourcesEnum.chDataLiteral, aCategorias)
Chart1_Series4.SetData(OWC.ChartDimensionsEnum.chDimCategories,
OWC.ChartSpecialDataSourcesEnum.chDataLiteral, aCategorias)
Chart1_Series1.SetData(OWC.ChartDimensionsEnum.chDimValues,
OWC.ChartSpecialDataSourcesEnum.chDataLiteral, aLiquidaciones)
Chart1_Series2.SetData(OWC.ChartDimensionsEnum.chDimValues,
OWC.ChartSpecialDataSourcesEnum.chDataLiteral, aProvocada)
Chart1_Series3.SetData(OWC.ChartDimensionsEnum.chDimValues,
OWC.ChartSpecialDataSourcesEnum.chDataLiteral, aInmediata)
Chart1_Series4.SetData(OWC.ChartDimensionsEnum.chDimValues,
OWC.ChartSpecialDataSourcesEnum.chDataLiteral, aDiferida)
With ChartSpace1
.Border.Color = ChartSpace1.Constants.chColorNone
End With
With Chart1
'Optional layout elements
.SeriesCollection(0).Interior.Color = "Rosybrown"
' .PlotArea.Interior.Color = "Wheat"
.HasTitle = True
.Title.Caption = "Renovaciones"
.HasLegend = True
.Legend.Position =
OWC.ChartLegendPositionEnum.chLegendPositionBottom
'These chart types have Category and Value axes
.Axes(0).HasTitle = True
.Axes(0).Title.Caption = "Renovaciones"
.Axes(1).HasTitle = True
.Axes(1).Title.Caption = "Renovaciones"
End With
Response.BinaryWrite(ChartSpace1.GetPicture("gif", 350, 280))
Response.End()
End Sub
End Class
and the graph was this