Hello Team,
I want to create one series and bound it to multiple items and with different colors for each item
take a look at my picture this what I select from database Day, Date and Total Time sheet.. My problem now like it seems in the picture
that the bars colors didnt change for each item and series in the the right of the chart just read the first date only.. so please can any one help me how can i achieve this programmatically by C#?
Here's my code:
RadChart1.PlotArea.XAxis.AutoScale = false;
RadChart1.PlotArea.XAxis.Items.Clear();
RadChart1.Series.Clear();
ChartSeries series = new ChartSeries(dt.Rows[0]["doc_date"].ToString(), ChartSeriesType.Bar);
for (int i = 0; i < dt.Rows.Count; i++)
{
//series = new ChartSeries(dt.Rows[i]["doc_date"].ToString(), ChartSeriesType.Bar);
series.Items.Add(new ChartSeriesItem(Convert.ToDouble(dt.Rows[i]["total_timesheet"])));
ChartAxisItem axisItem = new ChartAxisItem(dt.Rows[i]["day_name"].ToString());
RadChart1.PlotArea.XAxis.Items.Add(axisItem);
}
RadChart1.Series.Add(series);
I want to create one series and bound it to multiple items and with different colors for each item
take a look at my picture this what I select from database Day, Date and Total Time sheet.. My problem now like it seems in the picture
that the bars colors didnt change for each item and series in the the right of the chart just read the first date only.. so please can any one help me how can i achieve this programmatically by C#?
Here's my code:
RadChart1.PlotArea.XAxis.AutoScale = false;
RadChart1.PlotArea.XAxis.Items.Clear();
RadChart1.Series.Clear();
ChartSeries series = new ChartSeries(dt.Rows[0]["doc_date"].ToString(), ChartSeriesType.Bar);
for (int i = 0; i < dt.Rows.Count; i++)
{
//series = new ChartSeries(dt.Rows[i]["doc_date"].ToString(), ChartSeriesType.Bar);
series.Items.Add(new ChartSeriesItem(Convert.ToDouble(dt.Rows[i]["total_timesheet"])));
ChartAxisItem axisItem = new ChartAxisItem(dt.Rows[i]["day_name"].ToString());
RadChart1.PlotArea.XAxis.Items.Add(axisItem);
}
RadChart1.Series.Add(series);