turning off point labels

6 posts, 0 answers
  1. MacKenzie Mickelsen
    MacKenzie Mickelsen avatar
    8 posts
    Member since:
    Aug 2009

    Posted 16 Mar 2010 Link to this post

    Hello, I am hoping that you can help me here. We have a situation where we are using your Silverlight Chart control and displaying some information. In this case we want to turn off the point labels for certain points. Is there a way for us to do this? Or is there a way to position the label such that it is behind one of the bars?



    Thanks in advance
    MacKenzie
  2. Velin
    Admin
    Velin avatar
    391 posts

    Posted 18 Mar 2010 Link to this post

    Hi MacKenzie Mickelsen,

    I'm afraid that you can not turn off labels for certain points out-of-the-box. You can either turn off labels for the entire visual series or you could use MVVM like approach to do this. The latter is clearly demonstrated with the bar series of our online "Meteo Chart" example.

    Greetings,
    Velin
    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.
  3. MacKenzie Mickelsen
    MacKenzie Mickelsen avatar
    8 posts
    Member since:
    Aug 2009

    Posted 18 Mar 2010 Link to this post

    Thank you for your response. I am taking some of the ideas from the Demo that you suggested. I have developed a template for my SeriesItemLabel, however the text color is black instead of the bar color. Is there a way that I can use the bar color for my foreground color?

    Here is my Template sample, MacKenzie

    <

     

    Style x:Key="ChartSeriesItemLabelStyle" TargetType="chart:SeriesItemLabel">

     

     

     

    <Setter Property="Template" >

     

     

     

    <Setter.Value>

     

     

     

    <ControlTemplate TargetType="chart:SeriesItemLabel">

     

     

     

    <Canvas>

     

     

     

    <TextBlock x:Name="PART_TextContainer"

     

     

    Canvas.Top="{TemplateBinding TextContainerCanvasTop}"

     

     

    Canvas.Left="{TemplateBinding TextContainerCanvasLeft}"

     

     

    VerticalAlignment="Stretch"

     

     

    TextAlignment="Center"

     

     

    FontStyle="Italic"

     

     

    Text="{TemplateBinding Content}"

     

     

    Foreground="{TemplateBinding Foreground}" />

     

     

     

    </Canvas>

     

     

     

    </ControlTemplate>

     

     

     

    </Setter.Value>

     

     

     

    </Setter>

     

     

     

    </Style>

     

  4. Velin
    Admin
    Velin avatar
    391 posts

    Posted 24 Mar 2010 Link to this post

    Hi MacKenzie Mickelsen,

    I'm afraid that this is not supported by the control out of the box. You could again use the MVVM approach to set custom foreground color but you will need to handle this by hand.

    All the best,
    Velin
    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.
  5. MacKenzie Mickelsen
    MacKenzie Mickelsen avatar
    8 posts
    Member since:
    Aug 2009

    Posted 26 Mar 2010 Link to this post

    Thank you Velin, one more question if you dont mind. We have implemented the tempate for the point label on the chart. We have tried to use your new smart label stuff to control the positioning. When we select the "Outside" option now the label is showing up right in the middle of the top of the bar. If we take off the template "stuff" then it behaves as we would suspect. Any ideas on how we could fix the placement of the label with the template?

    Thanks again
    MacKenzie
  6. Velin
    Admin
    Velin avatar
    391 posts

    Posted 31 Mar 2010 Link to this post

    Hello MacKenzie Mickelsen,

    Could you, please, elaborate a bit further on what the problem is and why the result is different from what you expected. Also, it would be great if you provide a screenshot and/or a sample project. Thanks.

    Greetings,
    Velin
    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.
Back to Top