4 Answers, 1 is accepted
0
Princy
Top achievements
Rank 2
answered on 23 Apr 2013, 08:25 AM
Hi,
Please check the following help documentation.
How Do I Assign Individual Colors to Bars?
Thanks,
Princy.
Please check the following help documentation.
How Do I Assign Individual Colors to Bars?
Thanks,
Princy.
0
Gokul
Top achievements
Rank 1
answered on 23 Apr 2013, 08:40 AM
hi
i get this error what should i do
Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
i get this error what should i do
Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
0
Accepted
Princy
Top achievements
Rank 2
answered on 29 Apr 2013, 05:25 AM
Hi Gokul,
Unfortunately I couldn't replicate the issue. Here is my full code snippet.
ASPX:
C#:
Thanks,
Princy.
Unfortunately I couldn't replicate the issue. Here is my full code snippet.
ASPX:
<telerik:RadChart ID="RadChart1" SkinsOverrideStyles="true" runat="server"> <PlotArea> <XAxis MaxValue="5" MinValue="1" Step="1"> </XAxis> <YAxis MaxValue="3" Step="0.5" AxisMode="Extended"> </YAxis> <YAxis2 MaxValue="5" MinValue="1" Step="1"> </YAxis2> </PlotArea> <Series> <telerik:ChartSeries Name="Series 1"> <Items> <telerik:ChartSeriesItem YValue="1" Name="Item 1"> </telerik:ChartSeriesItem> <telerik:ChartSeriesItem YValue="2" Name="Item 2"> </telerik:ChartSeriesItem> <telerik:ChartSeriesItem YValue="1" Name="Item 3"> </telerik:ChartSeriesItem> <telerik:ChartSeriesItem YValue="3" Name="Item 4"> </telerik:ChartSeriesItem> <telerik:ChartSeriesItem YValue="2" Name="Item 5"> </telerik:ChartSeriesItem> </Items> </telerik:ChartSeries> </Series></telerik:RadChart>C#:
protected void Page_Load(object sender, EventArgs e) { RadChart1.PlotArea.XAxis.AxisLabel.Visible = false; Color[] barColors = new Color[5]{ Color.Purple, Color.Red, Color.Aqua, Color.Yellow, Color.Green }; if (!IsPostBack) { int i = 0; foreach (ChartSeriesItem item in RadChart1.Series[0].Items) { item.Appearance.FillStyle.MainColor = barColors[i++]; } }}Thanks,
Princy.
0
Gokul
Top achievements
Rank 1
answered on 29 Apr 2013, 09:23 AM
hi,
thanks princy for ur valuble feedback,
i have another doubt i'm using DATABIND option to fiil values in radchart using Stoterd Procedure ,here i pass a single input parameter
and that will get six values from the Stored Procedure and that will displayed on chart and for that bars i want to change the color for each bar.....................
thanks
thanks princy for ur valuble feedback,
i have another doubt i'm using DATABIND option to fiil values in radchart using Stoterd Procedure ,here i pass a single input parameter
and that will get six values from the Stored Procedure and that will displayed on chart and for that bars i want to change the color for each bar.....................
thanks