Custom marker template

2 posts, 0 answers
  1. Richard
    Richard avatar
    2 posts
    Member since:
    Dec 2011

    Posted 26 Jul Link to this post

    I want to have a MarkerBrush based on a property of the data object being bound to. For example,

     

    ```

    class MyDataPoint

    {

       public DateTime XValue {get;set;}

       public double YValue {get;set;}

       public bool IsRed {get; set;}

    }

    ```

     

    I want all points where IsRed=true to be rendered red, and blue when false. Is it possible? 

    I've made a Style with TargetType IndicatorItem and used DataTriggers but the style is always overridden with the default marker colour,

  2. Evgenia
    Admin
    Evgenia avatar
    1407 posts

    Posted 29 Jul Link to this post

    Hello Richard,

    You mind find a sample project attached that demonstrates your requirement. I'm using RadLinearSparkline for the test but you are free to try with any other sparkline type.
    Let me know how it works for you.

    Regards,
    Evgenia
    Telerik by Progress
    Do you need help with upgrading your AJAX, WPF or WinForms project? Check the Telerik API Analyzer and share your thoughts.
  3. UI for WPF is Visual Studio 2017 Ready
Back to Top