Hello
I Need to combine a bar chart with a stacked bar, I tried to do it with the code I show you below
In the first series the bars are generated fine, but when I add the stacked bar that are placed next to the first bar and I need the stacked bar to be placed at the fourth position
I also attach a graph to show you what generates the code and what I need
Could you please help me?
Thanks
Best regards
Marcos J. Perez
Here is the code:
I Need to combine a bar chart with a stacked bar, I tried to do it with the code I show you below
In the first series the bars are generated fine, but when I add the stacked bar that are placed next to the first bar and I need the stacked bar to be placed at the fourth position
I also attach a graph to show you what generates the code and what I need
Could you please help me?
Thanks
Best regards
Marcos J. Perez
Here is the code:
RadChart graExpediente = new RadChart(); |
graExpediente.ChartTitle.TextBlock.Text = "Expedientes"; |
graExpediente.PlotArea.XAxis.AutoScale = false; |
graExpediente.PlotArea.XAxis.AddRange(1, 4, 1); |
graExpediente.PlotArea.XAxis.Appearance.TextAppearance.TextProperties.Font = new System.Drawing.Font("Arial", 8, System.Drawing.FontStyle.Regular); |
graExpediente.PlotArea.XAxis[0].TextBlock.Text = "Asignados"; |
graExpediente.PlotArea.XAxis[1].TextBlock.Text = "En Proceso"; |
graExpediente.PlotArea.XAxis[2].TextBlock.Text = "A Vencer"; |
graExpediente.PlotArea.XAxis[3].TextBlock.Text = "Dependientes"; |
graExpediente.PlotArea.XAxis.IsZeroBased = false; |
graExpediente.PlotArea.YAxis.AxisMode = ChartYAxisMode.Extended; |
graExpediente.PlotArea.YAxis.AxisLabel.TextBlock.Text = "Asignados"; |
graExpediente.Skin = "Vista"; |
// Crea la series y las barras para el Supervisor |
ChartSeries Supervisor = new ChartSeries("Supervisor", ChartSeriesType.Bar); |
Supervisor.Appearance.TextAppearance.TextProperties.Font = new System.Drawing.Font("Tahoma", 7, System.Drawing.FontStyle.Regular); |
Supervisor.Appearance.Border.Color = System.Drawing.Color.Black; |
Supervisor.Appearance.LegendDisplayMode = ChartSeriesLegendDisplayMode.Nothing; |
// Define las barras en la serie |
Supervisor.AddItem(50, string.Empty, System.Drawing.Color.Yellow); |
Supervisor.AddItem(30, string.Empty, System.Drawing.Color.Green); |
Supervisor.AddItem(20, string.Empty, System.Drawing.Color.Red); |
// Crea la serie y la seccion para los Dependientes |
ChartSeries AsignadosDep = new ChartSeries("AsignadosDep", ChartSeriesType.StackedBar); |
AsignadosDep.Appearance.Border.Color = System.Drawing.Color.Black; |
AsignadosDep.Appearance.LegendDisplayMode = ChartSeriesLegendDisplayMode.Nothing; |
// Define la seccion en la serie |
AsignadosDep.AddItem(11, string.Empty, System.Drawing.Color.Yellow); |
ChartSeries EnProcesoDep = new ChartSeries("EnProcesoDep", ChartSeriesType.StackedBar); |
EnProcesoDep.Appearance.Border.Color = System.Drawing.Color.Black; |
EnProcesoDep.Appearance.LegendDisplayMode = ChartSeriesLegendDisplayMode.Nothing; |
EnProcesoDep.AddItem(6, string.Empty, System.Drawing.Color.Green); |
ChartSeries AVencerDep = new ChartSeries("AVencerDep", ChartSeriesType.StackedBar); |
AVencerDep.Appearance.Border.Color = System.Drawing.Color.Black; |
AVencerDep.Appearance.LegendDisplayMode = ChartSeriesLegendDisplayMode.Nothing; |
AVencerDep.AddItem(5, string.Empty, System.Drawing.Color.Red); |
// Add the series to the chart, chart to page. |
graExpediente.Series.Add(Supervisor); |
graExpediente.Series.Add(AsignadosDep); |
graExpediente.Series.Add(EnProcesoDep); |
graExpediente.Series.Add(AVencerDep); |
this.Page.Controls.Add(graExpediente); |