public class CustomCandleSeries : CandleSeries
{
public override void CreateSegments()
{
base.CreateSegments();
foreach (var segment in Segments)
{
var canvas = segment.GetRenderedVisual() as Canvas;
if (canvas is null) return; // before ready
(canvas.Children[0] as Rectangle).Fill = new SolidColorBrush(Colors.AliceBlue);
}
}
} |
<local:CustomCandleSeries ItemsSource="{Binding StockPriceDetails}"
XBindingPath="Date" High="High" Open="Open"
Close="Close" Low="Low"
Label="Candleseries" ShowTooltip="True"
chart:ChartTooltip.EnableAnimation="True"/>
|