Web Services
Top achievements
Rank 2
Web Services
asked on 01 Sep 2011, 10:03 PM
I'm trying to set a solid color in the bar graph but it always gives me a fading color. Any ideas why? Here is my code
Dim bar As New ChartSeriesItem
bar.YValue = 1
bar.Appearance.FillStyle.MainColor = Drawing.Color.ForestGreen
mySeries.Appearance.FillStyle.FillType = Styles.FillType.Solid
mySeries.AddItem(bar)
chart.Series.Add(mySeries)
Also, do you know of any way to pick a random color? I.e. where I have drawing.color.forestgreen, I'd just like a random color so each bar is a different color.
Dim bar As New ChartSeriesItem
bar.YValue = 1
bar.Appearance.FillStyle.MainColor = Drawing.Color.ForestGreen
mySeries.Appearance.FillStyle.FillType = Styles.FillType.Solid
mySeries.AddItem(bar)
chart.Series.Add(mySeries)
Also, do you know of any way to pick a random color? I.e. where I have drawing.color.forestgreen, I'd just like a random color so each bar is a different color.
6 Answers, 1 is accepted
0
Web Services
Top achievements
Rank 2
answered on 02 Sep 2011, 09:21 PM
Anyone have any ideas?
0
Bartholomeo Rocca
Top achievements
Rank 1
answered on 06 Sep 2011, 12:50 PM
Hello,
Have you tried setting bar.Appearance.FillStyle.FillType = Styles.FillType.Solid as well?
Greetings,
Bart.
Have you tried setting bar.Appearance.FillStyle.FillType = Styles.FillType.Solid as well?
Greetings,
Bart.
0
Web Services
Top achievements
Rank 2
answered on 07 Sep 2011, 08:43 PM
That kind of works, but the bars still have some opacity (transparency) to them. Is there any way to make them completely solid?
0
Hello Web Services,
We are unable to reproduce the problematic behavior in our local tests. These two snippets both work as expected:
Greetings,
Giuseppe
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.
We are unable to reproduce the problematic behavior in our local tests. These two snippets both work as expected:
Dim
mySeries
As
New
ChartSeries()
Dim
bar
As
New
ChartSeriesItem()
bar.YValue = 1
' individual bar appearance
bar.Appearance.FillStyle.MainColor = System.Drawing.Color.ForestGreen
bar.Appearance.FillStyle.FillType = Telerik.Charting.Styles.FillType.Solid
mySeries.AddItem(bar)
chart.Series.Add(mySeries)
Dim
mySeries
As
New
ChartSeries()
Dim
bar
As
New
ChartSeriesItem()
bar.YValue = 1
' bar series appearance
mySeries.Appearance.FillStyle.MainColor = System.Drawing.Color.ForestGreen
mySeries.Appearance.FillStyle.FillType = Telerik.Charting.Styles.FillType.Solid
mySeries.AddItem(bar)
chart.Series.Add(mySeries)
Greetings,
Giuseppe
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Sushobhit
Top achievements
Rank 2
answered on 13 Sep 2011, 01:42 PM
hi all
i have also face the problem i have done the following ---
i have also face the problem i have done the following ---
bar.Appearance.FillStyle.FillType = Telerik.Charting.Styles.FillType.Solid
but i also find the same problem .please solve my problem .
0
Hi Sushobhit,
We have already provided code snippets for two possible solutions that achieve the desired appearance in our previous post.
Regards,
Giuseppe
the Telerik team
We have already provided code snippets for two possible solutions that achieve the desired appearance in our previous post.
Regards,
Giuseppe
the Telerik team
Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal