En vb.net estoy usando la herramienta chart y al momento de córrelo el grafio me da mas pequeño y no se aprecia bien.
este es el codigo:
Imports System.Windows.Forms.DataVisualization.Charting
Public Class Prueba
Dim query1
Private Sub Prueba_Load(sender As Object, e As EventArgs) Handles MyBase.Load
ChartColumnas()
'ChartNacionalidad()
query1 = "select distinct sede from DatosTabla"
CbSede.DataSource = Conexion.SelectQuery(query1)
CbSede.DisplayMember = "SEDE"
query1 = "select distinct NIVEL from DatosTabla"
CbNivel.DataSource = Conexion.SelectQuery(query1)
CbNivel.DisplayMember = "NIVEL"
query1 = "select distinct CATEGORIA from DatosTabla"
CbCategoria.DataSource = Conexion.SelectQuery(query1)
CbCategoria.DisplayMember = "CATEGORIA"
query1 = "select distinct PROGRAMA_EDUCATIVO from DatosTabla"
CbPrograma.DataSource = Conexion.SelectQuery(query1)
CbPrograma.DisplayMember = "PROGRAMA_EDUCATIVO"
query1 = "select distinct ESTADO_NACIMIENTO from DatosTabla"
CbEstadoNac.DataSource = Conexion.SelectQuery(query1)
CbEstadoNac.DisplayMember = "ESTADO_NACIMIENTO"
query1 = "select distinct ANIO from DatosTabla"
cbAño.DataSource = Conexion.SelectQuery(query1)
cbAño.DisplayMember = "ANIO"
End Sub
Sub ChartColumnas()
Dim query As String = "SELECT EDAD, COUNT(*) AS CANTIDAD_ALUMNOS FROM DatosTabla GROUP BY EDAD ORDER BY EDAD"
Dim dataTable As DataTable = Conexion.SelectQuery(query)
Dim chartArea1 As New ChartArea()
ChartE.ChartAreas.Add(chartArea1)
Dim series1 As New Series()
series1.Name = "Hombres"
series1.ChartType = SeriesChartType.Column
For Each row As DataRow In dataTable.Rows
series1.Points.AddXY(row("EDAD").ToString(), Convert.ToInt32(row("CANTIDAD_ALUMNOS")))
Next
Dim series2 As New Series()
series2.Name = "Mujeres"
series2.ChartType = SeriesChartType.Column
ChartE.Series.Add(series1)
ChartE.Series.Add(series2)
ChartE.Size = New Size(452, 178)
ChartE.Location = New Point(34, 516)
Me.Controls.Add(ChartE)
End Sub
End Class