I also have the same requirement to add colors to the OHLC bars.
I wish there's styling and datatemplating support for each segment.
I was able to do modify the color of the HiLoOpenClose series by making overriding the CreateSegments() method.
I'm not sure how efficient this is but this is the easiest way I've found for now.
this works for me since the number of bars I display is not large.
public class HiLoOpenCloseCustomSeries:HiLoOpenCloseSeries
{
public override void CreateSegments()
{
base.CreateSegments();
foreach(var item in Segments)
{
var hiloseg = item as HiLoOpenCloseSegment;
if(hiloseg.Open == hiloseg.Close)
{
hiloseg.BearFillColor = Brushes.Yellow;
hiloseg.BullFillColor = Brushes.Yellow;
}
}
}
}
}
This would've been more efficient if there was a method exposed for after a segment was created. Like an OnSegmentCreated(HiLoOpenCloseSegment segment)