Exemplo n.º 1
0
        private void CargarFormularioChartPorEdades()
        {
            rcView.Series.Clear();

            BarSeries barSeries = new BarSeries("Performance", "RepresentativeName");
            barSeries.Name = "Q1";
            BarSeries barSeries2 = new BarSeries("Performance", "RepresentativeName");
            barSeries2.Name = "Q2";
            BarSeries barSeries3 = new BarSeries("Performance", "RepresentativeName");
            barSeries3.Name = "Q2";
            SisOxibariterapiaDataSetTableAdapters.spr_ReporteEnfermedadesPorRangoEdadesTableAdapter da = new SisOxibariterapiaDataSetTableAdapters.spr_ReporteEnfermedadesPorRangoEdadesTableAdapter();
            SisOxibariterapiaDataSet.spr_ReporteEnfermedadesPorRangoEdadesDataTable dt = new WinUI.SisOxibariterapiaDataSet.spr_ReporteEnfermedadesPorRangoEdadesDataTable();
            da.Connection.ConnectionString = cadenaConexion;
            da.Fill(dt);
            foreach (DataRow dr in dt.Rows)
            {
                barSeries.DataPoints.Add(new CategoricalDataPoint(Convert.ToDouble(dr["EdadMin"].ToString()), dr["nombre"].ToString()));

                barSeries.ShowLabels = true;
                barSeries2.DataPoints.Add(new CategoricalDataPoint(Convert.ToDouble(dr["Promedio"].ToString()), dr["nombre"].ToString()));
                barSeries2.ShowLabels = true;
                barSeries3.DataPoints.Add(new CategoricalDataPoint(Convert.ToDouble(dr["EdadMax"].ToString()), dr["nombre"].ToString()));
                barSeries3.ShowLabels = true;
            }

            rcView.View.Palette = KnownPalette.Cold;

            this.rcView.Series.Add(barSeries);
            this.rcView.Series.Add(barSeries2);
            this.rcView.Series.Add(barSeries3);
            pbLeyenda.Image = global::SisOxi.WinUI.Properties.Resources.LeyendaEdad;

        }
Exemplo n.º 2
0
        private void CargarFormularioChartPorEdades()
        {
            
            rcView.Series.Clear();
            
            BarSeries barSeries = new BarSeries("Performance", "RepresentativeName");
            barSeries.Name = "Q1";
            BarSeries barSeries2 = new BarSeries("Performance", "RepresentativeName");
            barSeries2.Name = "Q2";
            BarSeries barSeries3 = new BarSeries("Performance", "RepresentativeName");
            barSeries3.Name = "Q2";
            SisOxibariterapiaDataSetTableAdapters.spr_ReporteEnfermedadesPorRangoEdadesTableAdapter da = new SisOxibariterapiaDataSetTableAdapters.spr_ReporteEnfermedadesPorRangoEdadesTableAdapter();
            SisOxibariterapiaDataSet.spr_ReporteEnfermedadesPorRangoEdadesDataTable dt = new WinUI.SisOxibariterapiaDataSet.spr_ReporteEnfermedadesPorRangoEdadesDataTable();
            da.Connection.ConnectionString = cadenaConexion;
            da.Fill(dt);
            foreach (DataRow dr in dt.Rows)
            {
                barSeries.DataPoints.Add(new CategoricalDataPoint(Convert.ToDouble(dr["EdadMin"].ToString()), dr["nombre"].ToString()));
                barSeries.LegendTitle = "Edad Minima";
                barSeries.ShowLabels = true;
                barSeries2.DataPoints.Add(new CategoricalDataPoint(Convert.ToDouble(dr["Promedio"].ToString()), dr["nombre"].ToString()));
                barSeries2.ShowLabels = true;
                barSeries2.LegendTitle = "Edad Promedio";
                barSeries3.DataPoints.Add(new CategoricalDataPoint(Convert.ToDouble(dr["EdadMax"].ToString()), dr["nombre"].ToString()));
                barSeries3.ShowLabels = true;
                barSeries3.LegendTitle = "Edad Maxima";
            }

            rcView.View.Palette = KnownPalette.Cold;
            
            CargarCboEnfermedad(new EnfermedadBUS().ReporteEnfermedadesPorRangoEdadesII());
            this.rcView.Series.Add(barSeries);
            this.rcView.Series.Add(barSeries2);
            this.rcView.Series.Add(barSeries3);
            this.rcView.ShowLegend = true;
            //this.rcView.Controllers.Add(new SmartLabelsController());
            this.rcView.ShowSmartLabels = true;
            this.rcView.LegendTitle = "Leyenda";
            this.rcView.ChartElement.LegendElement.TitleElement.Font = new Font(rcView.ChartElement.Font.FontFamily.Name, 18);
            foreach (LegendItemElement item in this.rcView.ChartElement.LegendElement.StackElement.Children)
            {
                item.Font = new Font(rcView.ChartElement.Font.FontFamily.Name, 14);
                
            }
           // pbLeyenda.Image = global::SisOxi.WinUI.Properties.Resources.LeyendaEdad;

        }