This is a migrated thread and some comments may be shown as answers.

Chart and Collection of objects

4 Answers 74 Views
Chart
This is a migrated thread and some comments may be shown as answers.
GM72
Top achievements
Rank 1
GM72 asked on 28 Jan 2010, 01:16 PM
Hi,

I am setting the itemssource to a custom collection. This is great as works well.

I am just trying to fine tune things a bit:

How do I change the x axis values (ie it uses numbers but I want it to use the property name Status)??
As it is calling a wcf service there is a slight lag from the wcf - is there an easy way i can stop the no data series from displaying.??

I have tried the help but I can't find anything obvious.

Thanks

4 Answers, 1 is accepted

Sort by
0
GM72
Top achievements
Rank 1
answered on 28 Jan 2010, 03:58 PM
I've worked out the item mappings but I can't find out how to format my x axis labels (they are too large so overlap)... any ideas
0
Nathan
Top achievements
Rank 2
answered on 28 Jan 2010, 10:29 PM
Hey Graeme,

I ran into similar issues since my x axis names are too long to fit very nicely in a chart. Also they default as centered and I haven't found the properties I'm looking for to format those labels or alignment yet. 

What I did in the meantime was to put the names of the data points as tool tip text instead.

Just ran across an example of how to style the bar (and series labels) in xaml:
http://demos.telerik.com/silverlight/#Chart/NegativeValues
0
GM72
Top achievements
Rank 1
answered on 29 Jan 2010, 10:08 AM
Nathan,

Cheers for the reply.

I found the label rotation property was good enough for what I needed to do (once i'd worked out that it was the default view I needed to manipulate!) chart.defaultview.chartarea.axisx.labelrotationangle =45. Don't know if this helps you.

The only thing I need to work out now is how to stop the no data from showing while my wcf service is getting the data... i'm guessing that'll be somewhere in the default view too!

Thanks
0
Dwight
Telerik team
answered on 03 Feb 2010, 02:53 PM
Hi Graeme,

The best way is to simply re-template the NoDataControl, setting empty template:
<Style x:Key="noDataControl" TargetType="telerikCharting:NoDataControl">
  <Setter Property="Template">
    <Setter.Value>
      <ControlTemplate />
    </Setter.Value>
  </Setter>
</Style>

Then, in the code-behind set:
this.RadChart1.DefaultView.ChartArea.NoDataControlStyle = this.LayoutRoot.Resources["noDataControl"] as Style;

Best,
Evtim
the Telerik team

Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Follow the status of features or bugs in PITS and vote for them to affect their priority.
Tags
Chart
Asked by
GM72
Top achievements
Rank 1
Answers by
GM72
Top achievements
Rank 1
Nathan
Top achievements
Rank 2
Dwight
Telerik team
Share this question
or