Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
1015
My Legend doesn't display the DashArray of my series
posted

I have series that are completely solid and some that may be dashed in various different DashArray styles. But my legend doesn't reflect the dashed line of my series.

Parents
No Data
Reply
  • 16495
    Verified Answer
    Offline posted

    Hello Ed,

     

    Thank you for your post.

     

    I have been looking into it and the functionality that you are looking for. What I can suggest is to create a DataTemplate for the  Legend. You can bind the LegendItemTemplate property of the each Series to your DataTemplate. In it you can add a Path and bind its StrokeThickness, StrokeDashArray and Stroke properties to the same properties of the Series. By doing this the line in the legend will be same as the one of the Series. I created short sample application based on your scenario to show you how you can achieve the appearance that you are looking for. 

    If you are not able to reproduce the issue with the attached sample application, would you please modify it with the functionality, that you are using, so it reproduces the issue. This way I would be able to further investigate this for you and provide you with more detailed information on this matter.  Please let me know if I am missing something about your scenario. 

     

     Please let me know if you need any further assistance on the matter.

    LegendItemTemplate.zip
Children