This is a migrated thread and some comments may be shown as answers.

Custom marker template

1 Answer 14 Views
Sparkline
This is a migrated thread and some comments may be shown as answers.
Richard
Top achievements
Rank 1
Richard asked on 26 Jul 2016, 04:22 PM

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,

1 Answer, 1 is accepted

Sort by
0
Evgenia
Telerik team
answered on 29 Jul 2016, 02:59 PM
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.
Tags
Sparkline
Asked by
Richard
Top achievements
Rank 1
Answers by
Evgenia
Telerik team
Share this question
or