The reason for this behavior is in the ways RadChart databinding works. You have two options:
Create the series you need -- in this case you have to set their DataYColumn property with the name of the column/field you need to plot.
Let the chart create the series for you - it will create series for every numeric column/field in the underlying datasource.
In this case, you have created the series, but their DataYColumn property is not set. So, RadChart will clear them and it will create new ones. That is why the ShowLabels setting is lost. You will need to either set the DataYColumn for each series or remove them completely and wire DataBound event. There you will be able to loop through the actual series in RadChart and hide their labels.
the Telerik team
Do you want to have your say when we set our development plans?
Do you want to know when a feature you care about is added or when a bug fixed?
Telerik Public Issue Tracking
system and vote to affect the priority of the items.
Are you kidding? You can't simply set the stupid, idiotic labels that completely destroy the appearance of the chart to invisible? What were you thinking? Is there any fix for this other than the convoluted explanation provided here? We try to use these controls to save time, not add unnecessary time.
I am struggling just to understand the basics of how RadChart works with SQL data... but I stumbled across Marcus's example and it helped a LOT! I'm about 80% of the way there already, vs maybe 15% before I saw your example.
I got the labels to go away following the advice given.
J2R, I don't think it's as bad as you think.
If you just add a property for DataYColumn to each of the ChartSeries definitions... with the same name as the field name... the labels go away.
I'm completely with you on tools making less work, not more... but this isn't too bad...
I'm with J2K.
I've been using Telerik controls for .NET for years. There has always been a learning curve.
But Reporting has some misses that are inexcusable. This is one.
EVER single person who views the line charts I'm producing first words are 'can you hide the values'. And yes, I can get it working building the series dynamically, which took days to puzzle out.
The fact that this thread started 2 years ago and is still not on Telerik's radar suggests that who ever is building the tools doesn't actually build real graphs. This issue of labels making the chart virtually unreadable is pretty easy to see if you actually build one.
OK, here is another 2 years later on this post.
Is this still an issue? I know I have spent the last 2 hours trying to find out how to --hide those darn labels-- as stated before. I need to perform this via code behind (the above samples do not work). I am using the last "Q" of 2014 version.
answered on 13 Jan 2015, 09:30 AM
The RadChart control has already been obsoleted as of Q1 2014 and we strongly suggest to use the newer RadHtmlChart controls which renders entirely on the client-side and has many features. More information on the matter is available in this blog post. You may also find useful the following articles on the matter: