How to position labels between ticks and how to display a grid for tooltip

6 posts, 1 answers
  1. Cameron
    Cameron avatar
    17 posts
    Member since:
    Jan 2011

    Posted 10 Feb 2011 Link to this post

    Hi All,

    I'm using a RadChart. Would like to position labels between ticks as shown on Y axis in the second chart displayed at http://www.telerik.com/help/silverlight/radchart-features-smart-labels.html using smart labels. I tried with LabelSettings but have not been able to get it. How do I do that? How to use LabelPositionGenerator, etc.?

    Also, tooltips are strings. I would like to show a grid not a string when users hover over bubbles in my chart. How do you do that?

    Thanks,

    Cameron
  2. Answer
    Evgenia
    Admin
    Evgenia avatar
    1437 posts

    Posted 16 Feb 2011 Link to this post

    Hello Cameron,

    You can control the distance between the label and the respective point by using the Distance property of the LabelSettings. This is described in our help topic (Configure the Smart Labels Feature) as well as in our demo with full source code.
    As for the tooltips - you can use our FirstLook demo from version Q2 2010. The source code for the demo can be found  locally on your computer as soon as you download the Q2 version of our controls (by default it is: C:\Program Files\Telerik\RadControls for Silverlight Q2 2010\Demos). The demo shows how you can add Chart as ToolTip on Bar Item Hover. The approach for the Grid is the same. 

    Regards,
    Evgenia
    the Telerik team
    Let us know about your Windows Phone 7 application built with RadControls and we will help you promote it. Learn more>>
  3. Cameron
    Cameron avatar
    17 posts
    Member since:
    Jan 2011

    Posted 17 Feb 2011 Link to this post


    Hi Evgenia,

    Thanks for your help.

    Regarding the Y axis labels what I said was "Would like to position labels between ticks as shown on Y axis...". I'm interested in X and Y axis labels not the chart itself. I think I have to use the styling axis label.

    Regarding the tooltip, I did not download Q2 2010 demo but I did search the online doc and figured out what I have to do. For those who might come across this post here is what I had to do:

    Add the follwoing line to you RadChar in xaml

     

     

     

    <telerik:ChartDefaultView.ChartArea>

     

     

     

     

    <telerik:ChartArea ItemToolTipOpening="ChartArea_ItemToolTipOpening" />

     

     

     

     

    </telerik:ChartDefaultView.ChartArea>

     


    Add/navigate to the method with code like this

     

     

    private void ChartArea_ItemToolTipOpening(ItemToolTip2D tooltip, ItemToolTipEventArgs e)

     

     

    {

     

       RadChart ttChart = new RadChart();

     

       tooltip.Content = ttchart;

     

     

     

     

    }



    Thanks

    Cameron
  4. Evgenia
    Admin
    Evgenia avatar
    1437 posts

    Posted 23 Feb 2011 Link to this post

    Hello Cameron,

    We are glad that you managed to address the issue by using our Help documentation.
    As for the Y Axis Labels - there is no direct way to force the Label to appear between Ticks especially if you want to position the Label between MinorTicks. However knowing the series Item's YValue you can use it as respective point and set Distance for the Label as I mentioned in my previous post. This way you can force the Labels to appear between MajorTicks. For more information about the Ticks and the difference between Major and MinorTicks you can review our help topic.

    Greetings,
    Evgenia
    the Telerik team
    Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
  5. Cameron
    Cameron avatar
    17 posts
    Member since:
    Jan 2011

    Posted 23 Feb 2011 Link to this post


    Thanks for your reply.

    It would be nice to be able to create custom labels in addition to tick labels (kind of like XCategory) for both axes. My scenario is that I need to display additional labels along both axes and want to be able to control where along the axes they would appear. It could be that I want to show something right at ticks (parallel to tick labels) or perhaps show them between ticks.
    I know it won't be there (even if you decide to add that feature) in time for me to ship.

    Cameron 
  6. Evgenia
    Admin
    Evgenia avatar
    1437 posts

    Posted 01 Mar 2011 Link to this post

    Hello Cameron,

    Currently there is no direct way to control the position of the labels according to the Axes. However we tank you for your feedback which was sent to our developers. They will decide whether and when it will be made for our future releases but I can not give you a definite timeframe.

    Regards,
    Evgenia
    the Telerik team
    Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
Back to Top