To display dotted lines using LineSeriesDefinition

16 posts, 0 answers
  1. Manishkumar
    Manishkumar avatar
    240 posts
    Member since:
    Feb 2009

    Posted 31 Oct 2011 Link to this post

    Hi;
    We have an unsual requirement that using line series defination
    We have to display half line solid and towards end dotted line
    as shown in the attachment.
    Please let me know how can i achive this functionality as
    we have a client demo on 2/11/11
  2. Manishkumar
    Manishkumar avatar
    240 posts
    Member since:
    Feb 2009

    Posted 01 Nov 2011 Link to this post

    Hey ;
    please provide some solutions for my above post
  3. Sia
    Admin
    Sia avatar
    756 posts

    Posted 01 Nov 2011 Link to this post

    Hi Manishkumar,

    Unfortunately this is not possible. The only possible workaround is to use two different line series for the normal and the dashed line.

    Please excuse us for the inconvenience caused.
    Kind regards,
    Sia
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

  4. Manishkumar
    Manishkumar avatar
    240 posts
    Member since:
    Feb 2009

    Posted 01 Nov 2011 Link to this post

    Hi;
    Can I atleast show the box with some value as shown in the UI.
    If this is possible please provide me with sample code
  5. Sia
    Admin
    Sia avatar
    756 posts

    Posted 02 Nov 2011 Link to this post

    Hi Manishkumar,

    As I said in the other forum thread opened by you, we need clarification about the technology which you use in your application.

    Thank you in advance,
    Sia
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

  6. Manishkumar
    Manishkumar avatar
    240 posts
    Member since:
    Feb 2009

    Posted 03 Nov 2011 Link to this post

    Hi sia;
    It is in Silverlight and in that we are generating charts.
    In other formum I have posted only to get Quick response.Since I was running out of time
    Thanks in Advance for your response.
    Please  reply ASAp.
  7. Sia
    Admin
    Sia avatar
    756 posts

    Posted 08 Nov 2011 Link to this post

    Hello Manishkumar,

    You can have a canvas over RadChart and position additional elements there. Unfortunately there is no built-in support for labels as the one shown in your screenshot.

    I think that these methods could be of interest of you:
    - ConvertDataUnitsToPhysical
    - ConvertPhysicalUnitsToData

    Greetings,
    Sia
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

  8. Manishkumar
    Manishkumar avatar
    240 posts
    Member since:
    Feb 2009

    Posted 10 Nov 2011 Link to this post

    HI;
    I have tried to display label using smart label property by taking help from this link
    http://www.telerik.com/help/silverlight/radchart-features-smart-labels.html

    But my problem is that the label is displayed with background grey colour and in white font.
    how can i customiize this label to white colour background and red colour font or white colour font
    with red background.
    Please find the attachment for more details
    please reply ASAP as we have go live tommorrow.
  9. Sia
    Admin
    Sia avatar
    756 posts

    Posted 10 Nov 2011 Link to this post

    Hi Manishkumar,

    Please send us a sample project showing your implementation so that we can modify it for you.

    Thank you,
    Sia
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

  10. Manishkumar
    Manishkumar avatar
    240 posts
    Member since:
    Feb 2009

    Posted 11 Nov 2011 Link to this post

    HI
    Please find the sample code

     

     

    Style lineStyle4 = new Style(typeof(Telerik.Windows.Controls.Charting.SelfDrawingSeries));

     

    lineStyle4.Setters.Add(

     

    new Setter(SelfDrawingSeries.BorderLineStyleProperty, pathStyle4));

     


     

     

    Style pathStyle4 = new Style(typeof(System.Windows.Shapes.Path));

     

    pathStyle4.Setters.Add(

     

    new Setter(Shape.StrokeDashArrayProperty, "3"));

     

    pathStyle4.Setters.Add(

     

    new Setter(Shape.StrokeProperty, new SolidColorBrush(Colors.Purple)));

     

    pathStyle4.Setters.Add(

     

    new Setter(Shape.StrokeThicknessProperty, 1));

     


     

     

    LabelSettings settings = new LabelSettings() ;

     

    settings.Distance = 10;

    settings.ShowConnectors =

     

    true;

     

    dSeries8.Add(

     

    new Telerik.Windows.Controls.Charting.DataPoint() { YValue = data6[data6.Length - 1 - lintcount - 1], XCategory = xlabel[data6.Length - 1 - lintcount - 1] });

     

     

     

     

    dSeries8.Definition =

     

    new LineSeriesDefinition() { SeriesStyle = lineStyle4, LabelSettings = settings, ShowPointMarks = true, AxisName = "Percentage"};

     

     

    dSeries8.Definition.Appearance.Stroke =

     

    new SolidColorBrush(Colors.Red);

     

    dSeries8.Definition.AxisName =

     

    "Percentage";

     

    dSeries8.Definition.ItemLabelFormat =

     

    "#VAL{P2}";

     

    dSeries8.Definition.ItemToolTipFormat =

     

    "#VAL{P2}";

     

    radchartarea.DataSeries.Add(dSeries8);

    radchartarea.SmartLabelsEnabled =

     

    true;

     


    Please find. Please Reply it as we have Go-Live on Monday and we need to do ASAP

  11. Manishkumar
    Manishkumar avatar
    240 posts
    Member since:
    Feb 2009

    Posted 11 Nov 2011 Link to this post

     

     

    Please find the below code snippet as we have go-live on monday
    Please reply ASAP

    Style
    pathStyle4 = new Style(typeof(System.Windows.Shapes.Path));

     

    pathStyle4.Setters.Add(

     

    new Setter(Shape.StrokeDashArrayProperty, "3"));

     

    pathStyle4.Setters.Add(

     

    new Setter(Shape.StrokeProperty, new SolidColorBrush(Colors.Purple)));

     

    pathStyle4.Setters.Add(

     

    new Setter(Shape.StrokeThicknessProperty, 1));

     



     

     

    Style lineStyle4 = new Style(typeof(Telerik.Windows.Controls.Charting.SelfDrawingSeries));

     

    lineStyle4.Setters.Add(

     

    new Setter(SelfDrawingSeries.BorderLineStyleProperty, pathStyle4));

     

    dSeries8.Add(

     

    new Telerik.Windows.Controls.Charting.DataPoint() { YValue = data6[data6.Length - 1 - lintcount - 1], XCategory = xlabel[data6.Length - 1 - lintcount - 1] });

     

    RadChart1.DefaultView.ChartArea.SmartLabelsEnabled =

     

    true;


     

    dSeries8.Definition =

     

    new LineSeriesDefinition() { SeriesStyle = lineStyle4, LabelSettings = settings, ShowPointMarks = true, AxisName = "Percentage"};

     

     

    dSeries8.Definition.Appearance.Stroke =

     

    new SolidColorBrush(Colors.Red);

     

    dSeries8.Definition.AxisName =

     

    "Percentage";

     

    dSeries8.Definition.ItemLabelFormat =

     

    "#VAL{P2}";

     

    dSeries8.Definition.ItemToolTipFormat =

     

    "#VAL{P2}";

     



    radchartarea.DataSeries.Add(dSeries8);

    radchartarea.SmartLabelsEnabled =

     

    true;

     

  12. Manishkumar
    Manishkumar avatar
    240 posts
    Member since:
    Feb 2009

    Posted 16 Nov 2011 Link to this post

    Hey;
    Please reply to this ASAP
  13. Sia
    Admin
    Sia avatar
    756 posts

    Posted 16 Nov 2011 Link to this post

    Hello Manishkumar,

    Please excuse us for the late reply.

    You can use the following style and set it as SeriesItemLabelStyle to the Line series definition:
    <Style x:Key="CustomLabel" TargetType="telerikCharting:SeriesItemLabel">
        <Setter Property="Foreground" Value="Red" />
        <Setter Property="Fill" Value="White" />
    </Style>

    I hope this helps.

    Regards,
    Sia
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

  14. Manishkumar
    Manishkumar avatar
    240 posts
    Member since:
    Feb 2009

    Posted 22 Nov 2011 Link to this post

    Hi Sia;
    Thanks for your reply.

    dSeries8.Definition.Appearance.Foreground =

     

    new SolidColorBrush(Colors.Red);//Label Backgroud Color

     

    when i apply this then it does not work. Nor it colour get change can u pls suggest any other way to change the font color..
    and also we have one more requirement that Is it possible to display PointMarks on the lineserries in small dot.
    As shown in the attachment.Since when I use this property ShowPointMarks = true .
    It displays in big Dots.
    Please Reply ASAP as we are having GoLive on Monday
  15. Manishkumar
    Manishkumar avatar
    240 posts
    Member since:
    Feb 2009

    Posted 23 Nov 2011 Link to this post

    Hi sia;
    can u please reply to above post.
    We need to implemenent very soon as we have Go-Live on Monday
    Thanks in Advance
  16. Evgenia
    Admin
    Evgenia avatar
    1437 posts

    Posted 24 Nov 2011 Link to this post

    Hi Manishkumar,

      Take a look at our help topic where it is described how to cuztomize the PointMarks via templating the PointMark control. For the purpose you'll need to change the Size property's value which is set to 10 by default in the PointMarkStyle.

    Regards,
    Evgenia
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

Back to Top