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

[Solved] Bar chart label position and show connectors in metro

6 Answers 163 Views
Chart for XAML
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Nazia
Top achievements
Rank 1
Nazia asked on 18 Jul 2012, 09:14 AM
Hi All,

I am displaying the labels for the barchart and they appear at the top of each bar.

How can I rearrange it so that I can place it at the middle or bottom?

In silvelright, there is a labledefinitions property  like

<telerik:PieSeries.LabelDefinitions>

            <telerik:ChartSeriesLabelDefinition Margin="-30,0,0,0"/>

        </telerik:PieSeries.LabelDefinitions>

but in Metro app, it says that LabelDefinitions is read-only property.

Is there any other alternative to change the position of labels?

Another thing is using ShowConnectors property. It is also not available.

Is it supported in this version? If so, let me know the how to get it?



Thanks in advance.



6 Answers, 1 is accepted

Sort by
0
Tsvyatko
Telerik team
answered on 18 Jul 2012, 10:24 AM
Hello Nazia,

The error  you are getting for labeldefinitions might be related to design-time issue.

I have prepared sample project demonstrating LabelDefinition usage.

Regarding the ShowConnectors, we still have no support for this feature - however we will consider it, for our next official release.

All the best,
Tsvyatko
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
Nazia
Top achievements
Rank 1
answered on 18 Jul 2012, 11:07 AM
Hi Tsyvatko,

Thanks for the reply. But I am creating bar series in code behind(C#).

There is says that "Property or indexer 'Telerik.UI.Xaml.Controls.ChartSeries.LabelDefinitions' cannot be assigned to -- it is read only ".

Please let me know how to do it in code behind.
0
Sajida
Top achievements
Rank 1
answered on 18 Jul 2012, 11:43 AM
HI,



When I run your sample code I am getting an error "Could not find SDK "Telerik.UI.Xaml, Version=2012.1.0712". PLease help me solve this issue as I am new for using telerik charts and xaml.



Thanks in advance.
0
Accepted
Tsvyatko
Telerik team
answered on 18 Jul 2012, 12:02 PM
Hi Nazia,

you can have the same setup in code-behind using the following code:

var series = chart.Series[0] as PieSeries;
 
series.LabelDefinitions.Add(new ChartSeriesLabelDefinition { Margin = new Thickness(-30, 0, 0, 0) });


Sajida , it seems that you do not have our controls installed. You can download it from your account download section - Xaml Automatic Installation.
Kind regards,
Tsvyatko
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
Nazia
Top achievements
Rank 1
answered on 18 Jul 2012, 12:48 PM
Thanks Tsvyatko.



Thanks a lot.



I have one more question.

How to display legend to the charts?

In the sample apps provided at http://www.telerik.com/products/windows-metro/overview.aspx, a grid is used to show the legend.

Let me know whether default legend as in Silverlight is supported in Windows 8 also.





0
Tsvyatko
Telerik team
answered on 19 Jul 2012, 08:20 AM
Hello Nazia,

Currently, we do not have build-in legend. Howver, it is in our TODO list for our next official release.

As an alternative you can use the mentioned sample application (Teched demo), as guideline for legend setup.

Greetings,
Tsvyatko
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Tags
Chart for XAML
Asked by
Nazia
Top achievements
Rank 1
Answers by
Tsvyatko
Telerik team
Nazia
Top achievements
Rank 1
Sajida
Top achievements
Rank 1
Share this question
or