Esempio n. 1
0
        void InitRadChart()
        {
            #region pregunta 1

            RadChart1.Clear();
            SetXAxis("1.- ¿Te Gustan Los VideoJuegos??", 3500, RadChart1);
            RadChart1.PlotArea.XAxis.LayoutMode = ChartAxisLayoutMode.Between;

            RadChart1.PlotArea.YAxis.AutoScale = false;
            SetYAxis(500);

            ChartSeries series1 = new ChartSeries("Si", ChartSeriesType.Bar);
            series1.ActiveRegionUrl = "#P2";
            SetSeriesAppearance(series1);
            RadChart1.Series.Add(series1);

            ChartSeries series2 = new ChartSeries("No", ChartSeriesType.Bar);
            series2.ActiveRegionUrl = "#P3";
            SetSeriesAppearance(series2);
            RadChart1.Series.Add(series2);

            ChartSeries series3 = new ChartSeries("Un poco", ChartSeriesType.Bar);
            series3.ActiveRegionUrl = "#P4";
            SetSeriesAppearance(series3);
            RadChart1.Series.Add(series3);

            series1.AddItem(1300);
            series2.AddItem(1200);
            series3.AddItem(1000);

            #endregion


            #region pregunta 2

            RadChart2.Clear();
            SetXAxis(" 2.- ¿Que tiempo te la pasas jugando al día?", 3500, RadChart2);
            RadChart2.PlotArea.XAxis.LayoutMode = ChartAxisLayoutMode.Between;

            RadChart2.PlotArea.YAxis.AutoScale = false;
            SetYAxis(500);

            ChartSeries series1G2 = new ChartSeries("2 hrs al día", ChartSeriesType.Bar);
            SetSeriesAppearance(series1G2);
            RadChart2.Series.Add(series1G2);

            ChartSeries series2G2 = new ChartSeries("Entre 4 y 6 horas", ChartSeriesType.Bar);
            SetSeriesAppearance(series2G2);
            RadChart2.Series.Add(series2G2);

            ChartSeries series3G2 = new ChartSeries("Todo el día", ChartSeriesType.Bar);
            SetSeriesAppearance(series3G2);
            RadChart2.Series.Add(series3G2);

            series1G2.AddItem(1100);
            series2G2.AddItem(1300);
            series3G2.AddItem(1100);

            #endregion



            #region pregunta 2

            RadChart3.Clear();
            SetXAxis("3.- ¿Por que no te gustan?", 3500, RadChart3);
            RadChart3.PlotArea.XAxis.LayoutMode = ChartAxisLayoutMode.Between;

            RadChart3.PlotArea.YAxis.AutoScale = false;
            SetYAxis(500);

            ChartSeries series1G3 = new ChartSeries("Es una perdida de tiempo", ChartSeriesType.Bar);
            SetSeriesAppearance(series1G3);
            RadChart3.Series.Add(series1G3);

            ChartSeries series2G3 = new ChartSeries("No tengo una consola", ChartSeriesType.Bar);
            SetSeriesAppearance(series2G3);
            RadChart3.Series.Add(series2G3);

            ChartSeries series3G3 = new ChartSeries("No me gustan", ChartSeriesType.Bar);
            SetSeriesAppearance(series3G3);
            RadChart3.Series.Add(series3G3);

            series1G3.AddItem(700);
            series2G3.AddItem(800);
            series3G3.AddItem(2000);

            #endregion


            #region pregunta 2

            RadChart4.Clear();
            SetXAxis(" 4.- ¿Que Juego te gusta mas?", 3500, RadChart4);
            RadChart4.PlotArea.XAxis.LayoutMode = ChartAxisLayoutMode.Between;

            RadChart4.PlotArea.YAxis.AutoScale = false;
            SetYAxis(500);

            series1G4 = new ChartSeries("Mario", ChartSeriesType.Bar);
            SetSeriesAppearance(series1G4);
            RadChart4.Series.Add(series1G4);

            ChartSeries series2G4 = new ChartSeries("Fifa 11", ChartSeriesType.Bar);
            SetSeriesAppearance(series2G4);
            RadChart4.Series.Add(series2G4);

            ChartSeries series3G4 = new ChartSeries("Stars wars", ChartSeriesType.Bar);
            SetSeriesAppearance(series3G4);
            RadChart4.Series.Add(series3G4);

            series1G4.AddItem(600);
            series2G4.AddItem(800);
            series3G4.AddItem(2100);

            #endregion
        }
Esempio n. 2
0
 protected void btCleare_Click(object sender, EventArgs e)
 {
     RadChart1.Clear();
 }