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

[Solved] How to insert texte anywhere in the Chart??

3 Answers 140 Views
Chart
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
1897
Top achievements
Rank 1
1897 asked on 07 Sep 2010, 10:51 AM
Hi,
I need to insert text in the Chart (where I need) like on image:
help me please

3 Answers, 1 is accepted

Sort by
0
Yavor
Telerik team
answered on 08 Sep 2010, 10:20 AM
Hello,

 You can put a Canvas on top of RadChart with transparent background and position your text blocks on absolute coordinates.

Regards,
Yavor Ivanov
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? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
1897
Top achievements
Rank 1
answered on 13 Sep 2010, 08:47 AM
Hi Yavor Ivanov ,
this will work only if my text wiil be static!
but I need that this text position to be depending on something (eg:point )
thank.
0
Yavor
Telerik team
answered on 15 Sep 2010, 01:55 PM
Hello 1897,

 You can use data bound ItemsControl instead of Canvas like this:

<ItemsControl x:Name="items">
            <ItemsControl.ItemTemplate>
                <DataTemplate>
                    <Path Fill="{Binding Path=Brush, Mode=OneWay}" >
                        <Path.Data>
                            <EllipseGeometry Center="{Binding Path=Point, Mode=OneWay}"
                                                     RadiusX="1.5"
                                                     RadiusY="1.5" />
                        </Path.Data>
                    </Path>
                </DataTemplate>
            </ItemsControl.ItemTemplate>
            <ItemsControl.ItemsPanel>
                <ItemsPanelTemplate>
                    <Grid />
                </ItemsPanelTemplate>
            </ItemsControl.ItemsPanel>
        </ItemsControl>

This will position ellipses on Point positions anywhere on the screen.

Kind regards,
Yavor Ivanov
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? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
Chart
Asked by
1897
Top achievements
Rank 1
Answers by
Yavor
Telerik team
1897
Top achievements
Rank 1
Share this question
or