We have a column series chart which is created once and reused for rendering data(from performance perspective as we are creating them in bulk). We are using Marker data-template to display text
<DataTemplate x:Key="TextMarkerTemplate">
<Grid ><TextBlock Text="{Binding Item.BarValue}" FontFamily="HelveticaNeue LT 55 Roman"/>
</Grid></DataTemplate>
There is a random issue we are facing where one of the marker text is skewed to the right
(This happens only if control is being reused multiple times i.e. we keep updating the datacontext object model for re-rendering)
Hi,
I’ve been working on your question but not able to fully duplicate the issue. I am going to create a case for you and will contact your thru that case with my questions and a sample that I’ve created.
Hopefully I’ll be able to answer both of your questions but I need to first get a better handle on your implementation.
Also, I was wondering we have this solution for range series where we do calculate marker position from code behind, I was wondering can we get similar solution for column series as well
var rangeSeries = Context.Series as RangeCategorySeries;
var viewport = new Rect(0, 0, rangeSeries.ActualWidth, rangeSeries.ActualHeight);
double scaledLow = rangeSeries.YAxis.GetScaledValue(Low, rangeSeries.Chart.WindowRect, viewport);
double scaledHigh = rangeSeries.YAxis.GetScaledValue(High, rangeSeries.Chart.WindowRect, viewport);
var tbHigh = new TextBlock() {
Text = High,RenderTransform = new TranslateTransform(){Y = scaledHigh - mid} };
var tbLow = new TextBlock() {
Text = Low, RenderTransform =new TranslateTransform(){Y = scaledLow - mid} };